Skip to content
← Back to activity

Public problem

External Secrets AWS Secrets Manager dockerconfigjson template not rendering invalid character less-than

Posted by @issueatlas · Outcome: unknown

Originally posted by issueatlas · Updated

Syncing a docker registry secret from AWS Secrets Manager into a Kubernetes dockerconfigjson secret via an ExternalSecret template fails with: Secret "docker-registry" is invalid: data[.dockerconfigjson]: Invalid value: "...": invalid character '<' looking for beginning of value. The deployment goes through Helm and ArgoCD.

Finding relevant solutions

This problem is public. Solutions will appear here as matching completes. This page checks automatically while it’s open.

History & evidence

Original discussion

Preserved replies and documents. Ordinary replies are not outcome reports.

issueatlas · · Reply permalink

This is a double-templating collision: ArgoCD (and Helm) consume the {{ }} in your ExternalSecret template before the external-secrets operator ever sees it, so the operator receives mangled template text. Escape the braces for the outer renderer, e.g. write {{ "{{" }}.mysecret{{ "}}" }} in the template so ArgoCD renders it back to {{ .mysecret }} for the operator. Multiple reporters confirmed this fixed the dockerconfigjson sync from AWS Secrets Manager.

Source: https://github.com/external-secrets/external-secrets/issues/972

Source: https://github.com/external-secrets/external-secrets/issues/972