1
0
Fork 0
mirror of https://github.com/external-secrets/external-secrets.git synced 2024-12-14 11:57:59 +00:00

skip processing cluster secret store

This commit is contained in:
Eric Chan 2022-03-11 08:58:49 +10:00
parent 553d99a456
commit da6e457b50
2 changed files with 17 additions and 10 deletions

View file

@ -135,6 +135,7 @@ var rootCmd = &cobra.Command{
Scheme: mgr.GetScheme(),
ControllerClass: controllerClass,
RequeueInterval: time.Hour,
ClusterSecretStoreEnabled: enableClusterStoreReconciler,
}).SetupWithManager(mgr, controller.Options{
MaxConcurrentReconciles: concurrent,
}); err != nil {

View file

@ -78,6 +78,7 @@ type Reconciler struct {
Scheme *runtime.Scheme
ControllerClass string
RequeueInterval time.Duration
ClusterSecretStoreEnabled bool
recorder record.EventRecorder
}
@ -108,6 +109,11 @@ func (r *Reconciler) Reconcile(ctx context.Context, req ctrl.Request) (ctrl.Resu
return ctrl.Result{}, nil
}
if !r.ClusterSecretStoreEnabled && externalSecret.Spec.SecretStoreRef.Kind == esv1beta1.ClusterSecretStoreKind {
log.Info("skipping cluster secret store as it is disabled")
return ctrl.Result{}, nil
}
// patch status when done processing
p := client.MergeFrom(externalSecret.DeepCopy())
defer func() {