configurator

package
v0.8.0-alpha.3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 13, 2020 License: Apache-2.0 Imports: 22 Imported by: 0

Documentation

Index

Constants

View Source
const (
	MaximumRetries = 20
	AgentName      = "configurator"
)

Variables

This section is empty.

Functions

func IsSecretNotPopulatedError

func IsSecretNotPopulatedError(err error) bool

Types

type Cluster

type Cluster struct {
	KubeClient         kubernetes.Interface
	ShipperClient      shipperclientset.Interface
	ApiExtensionClient apiextensionclientset.Interface
	Host               string
}

func NewClusterConfigurator

func NewClusterConfigurator(clusterConfiguration *config.ClusterConfiguration, kubeConfigFile string) (*Cluster, error)

func (*Cluster) ApproveShipperCSR added in v0.3.0

func (c *Cluster) ApproveShipperCSR() error

func (*Cluster) CopySecret

func (c *Cluster) CopySecret(cluster *shipper.Cluster, newNamespace string, secret *corev1.Secret) error

func (*Cluster) CreateCertificateSigningRequest added in v0.3.0

func (c *Cluster) CreateCertificateSigningRequest(csr []byte) error

func (*Cluster) CreateClusterFromConfig

func (c *Cluster) CreateClusterFromConfig(configuration *config.ClusterConfiguration) error

func (*Cluster) CreateClusterRole

func (c *Cluster) CreateClusterRole(domain, name string) error

func (*Cluster) CreateClusterRoleBinding

func (c *Cluster) CreateClusterRoleBinding(domain, clusterRoleBindingName, clusterRoleName, subjectName, subjectNamespace string) error

func (*Cluster) CreateCrd

func (*Cluster) CreateNamespace

func (c *Cluster) CreateNamespace(namespace string) error

func (*Cluster) CreateOrUpdateCRD

func (c *Cluster) CreateOrUpdateCRD(crd *apiextensionv1beta1.CustomResourceDefinition) error

func (*Cluster) CreateOrUpdateClusterWithConfig

func (c *Cluster) CreateOrUpdateClusterWithConfig(configuration *config.ClusterConfiguration) error

func (*Cluster) CreateOrUpdateValidatingWebhookConfiguration added in v0.7.0

func (c *Cluster) CreateOrUpdateValidatingWebhookConfiguration(caBundle []byte, namespace string) error

func (*Cluster) CreateOrUpdateValidatingWebhookService added in v0.7.0

func (c *Cluster) CreateOrUpdateValidatingWebhookService(namespace string) error

func (*Cluster) CreateServiceAccount

func (c *Cluster) CreateServiceAccount(domain, namespace string, name string) error

func (*Cluster) CreateValidatingWebhookSecret added in v0.3.0

func (c *Cluster) CreateValidatingWebhookSecret(privateKey, certificate []byte, namespace string) error

func (*Cluster) FetchCertificateFromCSR added in v0.3.0

func (c *Cluster) FetchCertificateFromCSR() ([]byte, error)

FetchCertificateFromCSR continually fetches the Shipper CSR until it is populated with a certificate and then returns the PEM-encoded certificate from the Status. This is a blocking function.

Note that the returned certificate is already PEM-encoded.

func (*Cluster) FetchCluster

func (c *Cluster) FetchCluster(clusterName string) (*shipper.Cluster, error)

func (*Cluster) FetchKubernetesCABundle added in v0.3.0

func (c *Cluster) FetchKubernetesCABundle() ([]byte, error)

func (*Cluster) FetchSecretForServiceAccount

func (c *Cluster) FetchSecretForServiceAccount(name, namespace string) (*corev1.Secret, error)

FetchSecretForServiceAccount polls the server 10 times with a 1 second delay between each. If there is still no secret, it returns a SecretNotPopulated error.

func (*Cluster) ShouldCopySecret

func (c *Cluster) ShouldCopySecret(name, namespace string) (bool, error)

func (*Cluster) ValidatingWebhookSecretExists added in v0.3.0

func (c *Cluster) ValidatingWebhookSecretExists(namespace string) (bool, error)

type SecretNotPopulatedError

type SecretNotPopulatedError struct {
	ServiceAccount *corev1.ServiceAccount
}

func NewSecretNotPopulatedError

func NewSecretNotPopulatedError(serviceAccount *corev1.ServiceAccount) *SecretNotPopulatedError

func (SecretNotPopulatedError) Error

func (s SecretNotPopulatedError) Error() string

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL