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

make reconciling stop if es is synced and immutable

This commit is contained in:
Arthur 2021-09-08 20:44:23 -03:00
parent e32353c8a4
commit 8417b34d26

View file

@ -166,6 +166,12 @@ func (r *Reconciler) Reconcile(ctx context.Context, req ctrl.Request) (ctrl.Resu
log.V(1).Info("skipping refresh", "rv", getResourceVersion(externalSecret))
return ctrl.Result{RequeueAfter: refreshInt}, nil
}
if externalSecret.Status.SyncedResourceVersion != "" && externalSecret.Spec.Target.Immutable {
return ctrl.Result{
RequeueAfter: 0,
Requeue: false,
}, nil
}
secret := &v1.Secret{
ObjectMeta: metav1.ObjectMeta{