Documentation ¶
Index ¶
- Constants
- func Clean(ctx context.Context, cl client.Client, namespace string, stsName string)
- func GetSecretAnnotations(validFrom, validUpto, duration string) map[string]string
- type Fetcher
- type KubeFetcher
- type KubePersister
- type Persister
- type Resource
- type TLSSecret
- func (s *TLSSecret) CA() []byte
- func (s *TLSSecret) CAKey() []byte
- func (s *TLSSecret) IsRotationRequired(duration time.Duration, cronStr string) (bool, string)
- func (s *TLSSecret) Ready() bool
- func (s *TLSSecret) ReadyCA() bool
- func (s *TLSSecret) Secret() *corev1.Secret
- func (s *TLSSecret) TLSCert() []byte
- func (s *TLSSecret) TLSPrivateKey() []byte
- func (s *TLSSecret) UpdateCASecret(cakey []byte, caCert []byte, annotations map[string]string) error
- func (s *TLSSecret) UpdateTLSSecret(cert, key, ca []byte, annotations map[string]string) error
- func (s *TLSSecret) ValidateAnnotations() bool
Constants ¶
View Source
const ( CaCert = "ca.crt" CaKey = "ca.key" CertValidFrom = "certificate-valid-from" CertValidUpto = "certificate-valid-upto" CertDuration = "certificate-duration" SecretDataHash = "secret-data-hash" )
Variables ¶
This section is empty.
Functions ¶
func GetSecretAnnotations ¶
Types ¶
type Persister ¶
type Persister interface {
Persist(obj client.Object, mutateFn func() error) (upserted bool, err error)
}
Persister creates or updates the object in Kubernetes after calling the mutation function.
type TLSSecret ¶
type TLSSecret struct { Resource // contains filtered or unexported fields }
func CreateTLSSecret ¶
func CreateTLSSecret(name string, secretType corev1.SecretType, r Resource) *TLSSecret
CreateTLSSecret returns a TLSSecret struct that is used to store the certs via secrets.
func LoadTLSSecret ¶
LoadTLSSecret fetches secret from the API server
func (*TLSSecret) IsRotationRequired ¶
IsRotationRequired validates if all the required annotations are present
func (*TLSSecret) TLSPrivateKey ¶
func (*TLSSecret) UpdateCASecret ¶
func (s *TLSSecret) UpdateCASecret(cakey []byte, caCert []byte, annotations map[string]string) error
UpdateCASecret updates CA key and CA Cert
func (*TLSSecret) UpdateTLSSecret ¶
UpdateTLSSecret updates three different certificates at the same time. It save the TLSCert, the CA, and the TLSPrivateKey in a secret.
func (*TLSSecret) ValidateAnnotations ¶
ValidateAnnotations validates if all the required annotations are present
Click to show internal directories.
Click to hide internal directories.