Home > other >  ArgoCD : resource already exists and is not managed by SealedSecret
ArgoCD : resource already exists and is not managed by SealedSecret

Time:07-03

I create sealedsecret from dockercondigjson secret. Created secret displayed in kubectl sealed secrets. But, I have message in ArgoCD, in events of sealedsecret:

failed update: Resource "mysecret" already exists and not managed by SealedSecret

K8s-manifests(such as sealedsecret.yaml) pulled by ArgoCD from gitlab repository. What is my mistake?

CodePudding user response:

Correct, sealed-secrets controller will not decrypt a sealedsecret into an already existing secret as a precaution. If you want that, annotate the existing secret with:

sealedsecrets.bitnami.com/managed: "true"

before creating the sealedsecret.

See docs: https://github.com/bitnami-labs/sealed-secrets/#managing-existing-secrets

CodePudding user response:

I solved issue by remove dockerconfigjson secret. After, that secret automatically recreated and error message is gone.

  • Related