Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func SecretCertificateAnnotations ¶ added in v1.7.0
func SecretCertificateAnnotations(crt *cmapi.Certificate, data SecretData) (map[string]string, error)
SecretCertificateAnnotations returns a map which should be set on all Certificate Secret's Annotations, containing information about the Issuer and Certificate.
Types ¶
type SecretData ¶
type SecretData struct {
PrivateKey, Certificate, CA []byte
}
SecretData is a structure wrapping private key, Certificate and CA data
type SecretsManager ¶
type SecretsManager struct {
// contains filtered or unexported fields
}
SecretsManager creates and updates secrets with certificate and key data.
func New ¶
func New( secretClient coreclient.SecretsGetter, secretLister corelisters.SecretLister, restConfig *rest.Config, enableSecretOwnerReferences bool, ) *SecretsManager
New returns a new SecretsManager. Setting enableSecretOwnerReferences to true will mean that secrets will be deleted when the corresponding Certificate is deleted.
func (*SecretsManager) UpdateData ¶
func (s *SecretsManager) UpdateData(ctx context.Context, crt *cmapi.Certificate, data SecretData) error
UpdateData will ensure the Secret resource contains the given secret data as well as appropriate metadata using an Apply call. If the Secret resource does not exist, it will be created on Apply. UpdateData will also update deprecated annotations if they exist.