sealed-secrets icon indicating copy to clipboard operation
sealed-secrets copied to clipboard

deleted secrets not being recreated

Open Masber opened this issue 3 years ago • 0 comments

Which component: The name (and version) of the affected component (controller or kubeseal)

bitnami/sealed-secrets-controller:v0.12.1

Describe the bug A clear and concise description of what the bug is.

I wanted to recreate a secret I accidentally deleted from a file. Kubectl says sealedsecret.bitnami.com/mysecret unchanged but I can't find the secret in any namespace.

To Reproduce Steps to reproduce the behavior:

  1. delete secret --> kubectl -n myns delete secret mysecret
  2. recreate secret from file --> kubectl -n myns apply -f mysecret.yaml
  3. output --> sealedsecret.bitnami.com/mysecret unchanged
  4. list secrets in namespace --> kubectl -n myns get secrets
  5. mysecret is missing

NOTE:

cat mysecret.yaml
apiVersion: bitnami.com/v1alpha1
kind: SealedSecret
metadata:
  annotations:
    sealedsecrets.bitnami.com/cluster-wide: "true"
  creationTimestamp: null
  name: munge-secret
  namespace: myns
spec:
  encryptedData:
    munge.key: -- REDACTED --
  template:
    metadata:
      annotations:
        sealedsecrets.bitnami.com/cluster-wide: "true"
      creationTimestamp: null
      name: munge-secret
      namespace: myns

Expected behavior I would expect to see munge-secret secret listed after creation

Version of Kubernetes:

  • Output of kubectl version:
Client Version: version.Info{Major:"1", Minor:"20", GitVersion:"v1.20.13", GitCommit:"2444b3347a2c45eb965b182fb836e1f51dc61b70", GitTreeState:"clean", BuildDate:"2021-11-17T13:05:33Z", GoVersion:"go1.15.15", Compiler:"gc", Platform:"linux/amd64"}
Server Version: version.Info{Major:"1", Minor:"20", GitVersion:"v1.20.13", GitCommit:"2444b3347a2c45eb965b182fb836e1f51dc61b70", GitTreeState:"clean", BuildDate:"2021-11-17T13:00:29Z", GoVersion:"go1.15.15", Compiler:"gc", Platform:"linux/amd64"}

Additional context

I don't understand why sealedsecret.bitnami.com/mysecret unchanged if the secret has not been created.

Masber avatar Sep 09 '22 21:09 Masber