Documentation
¶
Index ¶
- func PatchCABundleOnMutatingWebhooks(ctx context.Context, logger log.Logger, kubeClient kubernetes.Interface, ...) error
- func PatchCABundleOnValidatingWebhooks(ctx context.Context, logger log.Logger, kubeClient kubernetes.Interface, ...) error
- type Certificate
- type FileCertProvider
- type KubeSecretPersistedCertProvider
- type Provider
- type SelfSignedProvider
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func PatchCABundleOnMutatingWebhooks ¶ added in v0.5.0
func PatchCABundleOnMutatingWebhooks(ctx context.Context, logger log.Logger, kubeClient kubernetes.Interface, namespace string, caPEM []byte) error
PatchCABundleOnMutatingWebhooks patches the CA bundle of all mutating webhook configurations that have the specified labels in the cluster. Webhook configurations should have the following labels: "grafana.com/inject-rollout-operator-ca": "true", "grafana.com/namespace": <specified namespace>,
func PatchCABundleOnValidatingWebhooks ¶
func PatchCABundleOnValidatingWebhooks(ctx context.Context, logger log.Logger, kubeClient kubernetes.Interface, namespace string, caPEM []byte) error
PatchCABundleOnValidatingWebhooks patches the CA bundle of all validating webhook configurations that have the specified labels in the cluster. Webhook configurations should have the following labels: "grafana.com/inject-rollout-operator-ca": "true", "grafana.com/namespace": <specified namespace>,
Types ¶
type Certificate ¶
type FileCertProvider ¶
func NewFileCertProvider ¶
func NewFileCertProvider(certFile, keyFile string) (FileCertProvider, error)
NewFileCertProvider creates a new certificate provider that reads the certificate and key from the given files.
func (FileCertProvider) Certificate ¶
func (cp FileCertProvider) Certificate(context.Context) (Certificate, error)
type KubeSecretPersistedCertProvider ¶
type KubeSecretPersistedCertProvider struct {
// contains filtered or unexported fields
}
func NewKubeSecretPersistedCertProvider ¶
func NewKubeSecretPersistedCertProvider(provider Provider, logger log.Logger, kubeClient kubernetes.Interface, namespace, secretName string) KubeSecretPersistedCertProvider
NewKubeSecretPersistedCertProvider returns a new Provider that wraps another Provider and persists the certificate in a Kubernetes secret.
func (KubeSecretPersistedCertProvider) Certificate ¶
func (cp KubeSecretPersistedCertProvider) Certificate(ctx context.Context) (Certificate, error)
type Provider ¶
type Provider interface {
Certificate(context.Context) (Certificate, error)
}
A Provider either provides or creates certificates.
type SelfSignedProvider ¶
type SelfSignedProvider struct {
// contains filtered or unexported fields
}
func NewSelfSignedCertProvider ¶
func NewSelfSignedCertProvider(commonName string, dnsNames []string, orgs []string, expiration time.Duration) SelfSignedProvider
NewSelfSignedCertProvider creates a new certificate provider that creates a self-signed certificate.
func (SelfSignedProvider) Certificate ¶
func (p SelfSignedProvider) Certificate(context.Context) (Certificate, error)