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

Merge pull request #761 from mbillow/fix-configmap-templates

Fix template fallback logic to handle TemplateFrom syntax
This commit is contained in:
paul-the-alien[bot] 2022-02-24 17:23:14 +00:00 committed by GitHub
commit c9832b8e2a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -67,7 +67,7 @@ func (r *Reconciler) applyTemplate(ctx context.Context, es *esv1beta1.ExternalSe
// if no data was provided by template fallback // if no data was provided by template fallback
// to value from the provider // to value from the provider
if len(es.Spec.Target.Template.Data) == 0 { if len(es.Spec.Target.Template.Data) == 0 && len(es.Spec.Target.Template.TemplateFrom) == 0 {
secret.Data = dataMap secret.Data = dataMap
} }
secret.Annotations[esv1beta1.AnnotationDataHash] = utils.ObjectHash(secret.Data) secret.Annotations[esv1beta1.AnnotationDataHash] = utils.ObjectHash(secret.Data)