Documentation
¶
Overview ¶
Package certconfigmapgenerator contains generator logic of add cert configmap resource in user namespaces
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ConfigMapChangedPredicate = predicate.Funcs{ UpdateFunc: func(e event.UpdateEvent) bool { oldCM, _ := e.ObjectOld.(*corev1.ConfigMap) newCM, _ := e.ObjectNew.(*corev1.ConfigMap) return !reflect.DeepEqual(oldCM.Data, newCM.Data) }, }
View Source
var NamespaceCreatedPredicate = predicate.Funcs{ CreateFunc: func(e event.CreateEvent) bool { namespace, isNamespaceObject := e.Object.(*corev1.Namespace) if !isNamespaceObject { return false } return trustedcabundle.ShouldInjectTrustedBundle(namespace) }, UpdateFunc: func(e event.UpdateEvent) bool { oldNamespace, _ := e.ObjectOld.(*corev1.Namespace) newNamespace, _ := e.ObjectNew.(*corev1.Namespace) oldNsAnnValue, oldNsAnnExists := oldNamespace.GetAnnotations()[annotation.InjectionOfCABundleAnnotatoion] newNsAnnValue, newNsAnnExists := newNamespace.GetAnnotations()[annotation.InjectionOfCABundleAnnotatoion] if newNsAnnExists && !oldNsAnnExists { return true } else if newNsAnnExists && oldNsAnnExists && oldNsAnnValue != newNsAnnValue { return true } return false }, DeleteFunc: func(deleteEvent event.DeleteEvent) bool { return false }, }
Functions ¶
This section is empty.
Types ¶
type CertConfigmapGeneratorReconciler ¶
CertConfigmapGeneratorReconciler holds the controller configuration.
func (*CertConfigmapGeneratorReconciler) Reconcile ¶
func (r *CertConfigmapGeneratorReconciler) Reconcile(ctx context.Context, req ctrl.Request) (ctrl.Result, error)
Reconcile will generate new configmap, odh-trusted-ca-bundle, that includes cluster-wide trusted-ca bundle and custom ca bundle in every new namespace created.
func (*CertConfigmapGeneratorReconciler) SetupWithManager ¶
func (r *CertConfigmapGeneratorReconciler) SetupWithManager(ctx context.Context, mgr ctrl.Manager) error
SetupWithManager sets up the controller with the Manager.
Click to show internal directories.
Click to hide internal directories.