Documentation ¶
Index ¶
- Constants
- func ClientConfig(kubeConfig string, context string) (clientcmd.ClientConfig, *rest.Config, error)
- func IsSecretNotPopulatedError(err error) bool
- func NewKubeClientFromKubeConfig(kubeConfigFile, context string) (kubernetes.Interface, error)
- func NewShipperClientFromKubeConfig(kubeConfigFile, context string) (shipperclientset.Interface, error)
- type Cluster
- func (c *Cluster) ApproveShipperCSR() error
- func (c *Cluster) CopySecret(cluster *shipper.Cluster, newNamespace string, secret *corev1.Secret) error
- func (c *Cluster) CreateApplicationClusterRole(name, domain string) error
- func (c *Cluster) CreateCertificateSigningRequest(csr []byte) error
- func (c *Cluster) CreateClusterRoleBinding(...) error
- func (c *Cluster) CreateManagementClusterRole(name, domain string) error
- func (c *Cluster) CreateNamespace(namespace string) error
- func (c *Cluster) CreateOrUpdateCRD(crd *apiextensionv1beta1.CustomResourceDefinition) error
- func (c *Cluster) CreateOrUpdateCluster(cluster *shipper.Cluster) error
- func (c *Cluster) CreateOrUpdateValidatingWebhookConfiguration(caBundle []byte, namespace string, setToIgnore bool) error
- func (c *Cluster) CreateOrUpdateValidatingWebhookService(namespace string) error
- func (c *Cluster) CreateServiceAccount(domain, namespace string, name string) error
- func (c *Cluster) CreateValidatingWebhookSecret(privateKey, certificate []byte, namespace string) error
- func (c *Cluster) FetchCertificateFromCSR() ([]byte, error)
- func (c *Cluster) FetchCluster(clusterName string) (*shipper.Cluster, error)
- func (c *Cluster) FetchKubernetesCABundle() ([]byte, error)
- func (c *Cluster) FetchSecretForServiceAccount(name, namespace string) (*corev1.Secret, error)
- func (c *Cluster) ShouldCopySecret(name, namespace string) (bool, error)
- func (c *Cluster) UpdateValidatingWebhookConfigurationFailurePolicyToFail() error
- func (c *Cluster) ValidatingWebhookSecretExists(namespace string) (bool, error)
- type SecretNotPopulatedError
Constants ¶
View Source
const ( MaximumRetries = 20 AgentName = "configurator" )
Variables ¶
This section is empty.
Functions ¶
func ClientConfig ¶ added in v0.10.1
func NewKubeClientFromKubeConfig ¶ added in v0.10.0
func NewKubeClientFromKubeConfig(kubeConfigFile, context string) (kubernetes.Interface, error)
func NewShipperClientFromKubeConfig ¶ added in v0.10.0
func NewShipperClientFromKubeConfig(kubeConfigFile, context string) (shipperclientset.Interface, error)
Types ¶
type Cluster ¶
type Cluster struct { KubeClient kubernetes.Interface ShipperClient shipperclientset.Interface ApiExtensionClient apiextensionclientset.Interface Host string }
func NewClusterConfigurator ¶
func NewClusterConfiguratorFromKubeConfig ¶ added in v0.10.0
func (*Cluster) ApproveShipperCSR ¶ added in v0.3.0
func (*Cluster) CopySecret ¶
func (*Cluster) CreateApplicationClusterRole ¶ added in v0.10.9
func (*Cluster) CreateCertificateSigningRequest ¶ added in v0.3.0
func (*Cluster) CreateClusterRoleBinding ¶
func (*Cluster) CreateManagementClusterRole ¶ added in v0.10.9
func (*Cluster) CreateNamespace ¶
func (*Cluster) CreateOrUpdateCRD ¶
func (c *Cluster) CreateOrUpdateCRD(crd *apiextensionv1beta1.CustomResourceDefinition) error
func (*Cluster) CreateOrUpdateCluster ¶ added in v0.10.0
func (*Cluster) CreateOrUpdateValidatingWebhookConfiguration ¶ added in v0.7.0
func (*Cluster) CreateOrUpdateValidatingWebhookService ¶ added in v0.7.0
func (*Cluster) CreateServiceAccount ¶
func (*Cluster) CreateValidatingWebhookSecret ¶ added in v0.3.0
func (*Cluster) FetchCertificateFromCSR ¶ added in v0.3.0
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 (*Cluster) FetchKubernetesCABundle ¶ added in v0.3.0
func (*Cluster) FetchSecretForServiceAccount ¶
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 (*Cluster) UpdateValidatingWebhookConfigurationFailurePolicyToFail ¶ added in v0.10.0
type SecretNotPopulatedError ¶
type SecretNotPopulatedError struct {
ServiceAccount *corev1.ServiceAccount
}
func NewSecretNotPopulatedError ¶
func NewSecretNotPopulatedError(serviceAccount *corev1.ServiceAccount) *SecretNotPopulatedError
func (SecretNotPopulatedError) Error ¶
func (s SecretNotPopulatedError) Error() string
Click to show internal directories.
Click to hide internal directories.