Explorar o código

Fix the issue for non deleting one/more key-value pair

The issue is that the `dataMap` from the provider returns only the remaining data
and we were updating partially the current `secretMap` only for the keys included
in the new value.

Ticket: #315
Spiros Economakis %!s(int64=5) %!d(string=hai) anos
pai
achega
73ec3a5368

+ 1 - 3
pkg/controllers/externalsecret/externalsecret_controller.go

@@ -194,9 +194,7 @@ func (r *Reconciler) Reconcile(ctx context.Context, req ctrl.Request) (ctrl.Resu
 
 		// no template: copy data and return
 		if externalSecret.Spec.Target.Template == nil {
-			for k, v := range dataMap {
-				secret.Data[k] = v
-			}
+			secret.Data = dataMap
 			return nil
 		}