Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

OCPBUGS-14049: Add secret informer #187

Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 4 additions & 0 deletions pkg/operator/starter.go
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ const (
func RunOperator(ctx context.Context, controllerConfig *controllercmd.ControllerContext) error {
kubeClient := kubeclient.NewForConfigOrDie(rest.AddUserAgent(controllerConfig.KubeConfig, operatorName))
kubeInformersForNamespaces := v1helpers.NewKubeInformersForNamespaces(kubeClient, util.OperatorNamespace, util.OperandNamespace, util.CloudConfigNamespace, "")
secretInformer := kubeInformersForNamespaces.InformersFor(util.OperatorNamespace).Core().V1().Secrets()
configMapInformer := kubeInformersForNamespaces.InformersFor(util.OperandNamespace).Core().V1().ConfigMaps()
nodeInformer := kubeInformersForNamespaces.InformersFor("").Core().V1().Nodes()

Expand Down Expand Up @@ -137,7 +138,9 @@ func RunOperator(ctx context.Context, controllerConfig *controllercmd.Controller
configInformers,
[]factory.Informer{
nodeInformer.Informer(),
secretInformer.Informer(),
configMapInformer.Informer()},
csidrivercontrollerservicecontroller.WithSecretHashAnnotationHook(util.OperatorNamespace, util.CloudCredentialSecretName, secretInformer),
csidrivercontrollerservicecontroller.WithObservedProxyDeploymentHook(),
csidrivercontrollerservicecontroller.WithCABundleDeploymentHook(
util.OperandNamespace,
Expand All @@ -152,6 +155,7 @@ func RunOperator(ctx context.Context, controllerConfig *controllercmd.Controller
kubeClient,
kubeInformersForNamespaces.InformersFor(util.OperandNamespace),
nil,
csidrivernodeservicecontroller.WithSecretHashAnnotationHook(util.OperatorNamespace, util.CloudCredentialSecretName, secretInformer),
csidrivernodeservicecontroller.WithObservedProxyDaemonSetHook(),
csidrivernodeservicecontroller.WithCABundleDaemonSetHook(
util.OperandNamespace,
Expand Down