Documentation ¶
Index ¶
- Variables
- func AnnotateServiceAccountObject(object *manifest.Object, gsa string) (*manifest.Object, error)
- func ApplyContainerRateLimit(m *manifest.Objects, targetControllerName string, ...) error
- func ApplyContainerResourceCustomization(isNamespaced bool, m *manifest.Objects, controllerName string, ...) error
- func BuildScheme() *runtime.Scheme
- func DeleteObject(ctx context.Context, c client.Client, obj client.Object) error
- func EnsureOperatorFinalizer(o metav1.Object) (found bool)
- func FindDuplicateStrings(strs []string) []string
- func GetConfigConnector(ctx context.Context, client client.Client, nn types.NamespacedName) (*corev1beta1.ConfigConnector, error)
- func GetControllerResource(ctx context.Context, c client.Client, name string) (*customizev1beta1.ControllerResource, error)
- func GetMutatingWebhookConfigurationCustomization(ctx context.Context, c client.Client, name string) (*customizev1beta1.MutatingWebhookConfigurationCustomization, error)
- func GetNamespacedControllerReconciler(ctx context.Context, c client.Client, namespace, name string) (*customizev1alpha1.NamespacedControllerReconciler, error)
- func GetNamespacedControllerResource(ctx context.Context, c client.Client, namespace, name string) (*customizev1beta1.NamespacedControllerResource, error)
- func GetValidatingWebhookConfigurationCustomization(ctx context.Context, c client.Client, name string) (*customizev1beta1.ValidatingWebhookConfigurationCustomization, error)
- func IsControllerManagerService(obj *manifest.Object) bool
- func IsControllerManagerStatefulSet(obj *manifest.Object) bool
- func ListControllerResources(ctx context.Context, c client.Client) ([]customizev1beta1.ControllerResource, error)
- func ListMutatingWebhookConfigurationCustomizations(ctx context.Context, c client.Client) ([]customizev1beta1.MutatingWebhookConfigurationCustomization, error)
- func ListNamespacedControllerReconcilers(ctx context.Context, c client.Client, namespace string) ([]customizev1alpha1.NamespacedControllerReconciler, error)
- func ListNamespacedControllerResources(ctx context.Context, c client.Client, namespace string) ([]customizev1beta1.NamespacedControllerResource, error)
- func ListValidatingWebhookConfigurationCustomizations(ctx context.Context, c client.Client) ([]customizev1beta1.ValidatingWebhookConfigurationCustomization, error)
- func RemoveOperatorFinalizer(o metav1.Object) (found bool)
- type CustomizationWatcher
- type CustomizationWatcherOptions
Constants ¶
This section is empty.
Variables ¶
var ( // CustomizationCRsToWatch contains all the customization CRs to watch CustomizationCRsToWatch = []schema.GroupVersionResource{ corekcck8s.ToGVR(customizev1beta1.ControllerResourceGroupVersionKind), corekcck8s.ToGVR(customizev1beta1.ValidatingWebhookConfigurationCustomizationGroupVersionKind), corekcck8s.ToGVR(customizev1beta1.MutatingWebhookConfigurationCustomizationGroupVersionKind), } // NamespacedCustomizationCRsToWatch contains all the namspaced customization CRs to watch NamespacedCustomizationCRsToWatch = []schema.GroupVersionResource{ corekcck8s.ToGVR(customizev1beta1.NamespacedControllerResourceGroupVersionKind), corekcck8s.ToGVR(customizev1alpha1.NamespacedControllerReconcilerGroupVersionKind), } )
var (
ValidConfigConnectorNamespacedName = types.NamespacedName{Name: k8s.ConfigConnectorAllowedName}
)
Functions ¶
func ApplyContainerRateLimit ¶ added in v1.119.0
func ApplyContainerResourceCustomization ¶ added in v1.106.0
func ApplyContainerResourceCustomization(isNamespaced bool, m *manifest.Objects, controllerName string, controllerGVK schema.GroupVersionKind, containers []customizev1beta1.ContainerResourceSpec, replicas *int64) error
ApplyContainerResourceCustomization applies container resource customizations specified in ControllerResource / NamespacedControllerResource CR.
func BuildScheme ¶ added in v1.114.0
func DeleteObject ¶
func EnsureOperatorFinalizer ¶
func FindDuplicateStrings ¶ added in v1.111.0
func GetConfigConnector ¶
func GetConfigConnector(ctx context.Context, client client.Client, nn types.NamespacedName) (*corev1beta1.ConfigConnector, error)
func GetControllerResource ¶ added in v1.106.0
func GetControllerResource(ctx context.Context, c client.Client, name string) (*customizev1beta1.ControllerResource, error)
func GetMutatingWebhookConfigurationCustomization ¶ added in v1.109.0
func GetMutatingWebhookConfigurationCustomization(ctx context.Context, c client.Client, name string) (*customizev1beta1.MutatingWebhookConfigurationCustomization, error)
func GetNamespacedControllerReconciler ¶ added in v1.119.0
func GetNamespacedControllerReconciler(ctx context.Context, c client.Client, namespace, name string) (*customizev1alpha1.NamespacedControllerReconciler, error)
func GetNamespacedControllerResource ¶ added in v1.108.0
func GetNamespacedControllerResource(ctx context.Context, c client.Client, namespace, name string) (*customizev1beta1.NamespacedControllerResource, error)
func GetValidatingWebhookConfigurationCustomization ¶ added in v1.109.0
func GetValidatingWebhookConfigurationCustomization(ctx context.Context, c client.Client, name string) (*customizev1beta1.ValidatingWebhookConfigurationCustomization, error)
func ListControllerResources ¶ added in v1.106.0
func ListControllerResources(ctx context.Context, c client.Client) ([]customizev1beta1.ControllerResource, error)
ListControllerResources lists all ControllerResources.
func ListMutatingWebhookConfigurationCustomizations ¶ added in v1.109.0
func ListMutatingWebhookConfigurationCustomizations(ctx context.Context, c client.Client) ([]customizev1beta1.MutatingWebhookConfigurationCustomization, error)
ListMutatingWebhookConfigurationCustomizations lists all MutatingWebhookConfigurationCustomization CRs.
func ListNamespacedControllerReconcilers ¶ added in v1.119.0
func ListNamespacedControllerReconcilers(ctx context.Context, c client.Client, namespace string) ([]customizev1alpha1.NamespacedControllerReconciler, error)
ListNamespacedControllerReconcilers lists all NamespacedControllerReconcilers CRs in the given namespace.
func ListNamespacedControllerResources ¶ added in v1.108.0
func ListNamespacedControllerResources(ctx context.Context, c client.Client, namespace string) ([]customizev1beta1.NamespacedControllerResource, error)
ListNamespacedControllerResources lists all NamespacedControllerResource CRs in the given namespace.
func ListValidatingWebhookConfigurationCustomizations ¶ added in v1.109.0
func ListValidatingWebhookConfigurationCustomizations(ctx context.Context, c client.Client) ([]customizev1beta1.ValidatingWebhookConfigurationCustomization, error)
ListValidatingWebhookConfigurationCustomizations lists all ValidatingWebhookConfigurationCustomization CRs.
func RemoveOperatorFinalizer ¶
Types ¶
type CustomizationWatcher ¶ added in v1.106.0
type CustomizationWatcher struct {
// contains filtered or unexported fields
}
CustomizationWatcher setup watches on 'triggerGVRs'. It is used by the CC / CCC operator.
For ConfigConnector operator, CustomizationWatcher setups a cluster-scoped watch on the customization CRs. Any changes to the customization CRs raises a watch event on the ConfigConnector object, which then triggers a reconciliation.
For ConfigConnectorContext operator, CustomizationWatcher setups a cluster-scoped watch, despite the fact that the CRs being watched are namespaced. This is to keep the number of watches low when there are large number of namespaces managed by Config Connector. Any changes to the namespaced customization CRs raises a watch event on the ConfigConnectorContext object in the same namespace.
The raised watch events are sent to "events" channel, which is watched by CC / CCC operator.
func NewWithDynamicClient ¶ added in v1.106.0
func NewWithDynamicClient(dc dynamic.Interface, opts CustomizationWatcherOptions) *CustomizationWatcher
func (*CustomizationWatcher) EnsureWatchStarted ¶ added in v1.106.0
func (w *CustomizationWatcher) EnsureWatchStarted(ctx context.Context, targetNN types.NamespacedName) error
EnsureWatchStarted starts watches on triggerGVRs if not already done so.
func (*CustomizationWatcher) Events ¶ added in v1.106.0
func (w *CustomizationWatcher) Events() chan event.GenericEvent
Events returns a channel with events raised on target.
type CustomizationWatcherOptions ¶ added in v1.108.0
type CustomizationWatcherOptions struct { TriggerGVRs []schema.GroupVersionResource Log logr.Logger }