Documentation ¶
Index ¶
- Constants
- Variables
- func GetSecretCA(c client.Client, secretName string, secretNamespace string) ([]byte, error)
- func NewEnqueueRequestForReferecingObject(config *rest.Config, gvk schema.GroupVersionKind) *enqueueRequestForReferecingObject
- func ValidateConfigMapName(configMapNamespacedName string) error
- func ValidateSecretName(secretNamespacedName string) error
Constants ¶
View Source
const AnnotationBase = "cert-utils-operator.redhat-cop.io"
View Source
const CA = "ca.crt"
View Source
const CABundle = "ca-bundle.crt"
View Source
const Cert = "tls.crt"
View Source
const CertAnnotationSecret = AnnotationBase + "/injectca-from-secret"
View Source
const Key = "tls.key"
View Source
const TLSSecret = "kubernetes.io/tls"
Variables ¶
View Source
var IsAnnotatedForSecretCAInjection = predicate.Funcs{ UpdateFunc: func(e event.UpdateEvent) bool { oldSecret, _ := e.ObjectOld.GetAnnotations()[CertAnnotationSecret] newSecret, _ := e.ObjectNew.GetAnnotations()[CertAnnotationSecret] return oldSecret != newSecret }, CreateFunc: func(e event.CreateEvent) bool { _, ok1 := e.Object.GetAnnotations()[CertAnnotationSecret] return ok1 }, }
View Source
var IsCAContentChanged = predicate.Funcs{ UpdateFunc: func(e event.UpdateEvent) bool { oldSecret, ok := e.ObjectOld.(*corev1.Secret) if !ok { return false } newSecret, ok := e.ObjectNew.(*corev1.Secret) if !ok { return false } if newSecret.Type != TLSSecret { return false } return !reflect.DeepEqual(newSecret.Data[CA], oldSecret.Data[CA]) }, CreateFunc: func(e event.CreateEvent) bool { secret, ok := e.Object.(*corev1.Secret) if !ok { return false } if secret.Type != TLSSecret { return false } return true }, }
Functions ¶
func GetSecretCA ¶
func NewEnqueueRequestForReferecingObject ¶
func NewEnqueueRequestForReferecingObject(config *rest.Config, gvk schema.GroupVersionKind) *enqueueRequestForReferecingObject
func ValidateConfigMapName ¶
func ValidateSecretName ¶
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.