Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't create managed secret for a project's root config #59

Open
jv4n5e opened this issue Feb 27, 2024 · 1 comment
Open

Can't create managed secret for a project's root config #59

jv4n5e opened this issue Feb 27, 2024 · 1 comment

Comments

@jv4n5e
Copy link

jv4n5e commented Feb 27, 2024

Logs say:
ERROR controllers.DopplerSecret Unable to update dopplersecret {"dopplersecret": "namespace/dopplersecret-root", "error": "Cannot change existing managed secret type from Opaque to . Delete the managed secret and re-apply the DopplerSecret."}

DopplerSecret manifest:
apiVersion: secrets.doppler.com/v1alpha1
kind: DopplerSecret
metadata:
annotations:
helm.sh/hook: pre-install,pre-upgrade
helm.sh/resource-policy: keep
meta.helm.sh/release-name: namespace
labels:
app.kubernetes.io/name: app
name: dopplersecret-root
namespace: namespace
spec:
config: root
managedSecret:
name: dopplersecrets-root
namespace: namespace
project: project
tokenSecret:
name: dopplertoken-root

Status of DopplerSecret object:
status:
conditions:

  • lastTransitionTime: "2024-02-27T21:24:09Z"
    message: 'Secret update failed: Cannot change existing managed secret type from
    Opaque to . Delete the managed secret and re-apply the DopplerSecret.'
    reason: Error
    status: "False"
    type: secrets.doppler.com/SecretSyncReady
  • lastTransitionTime: "2024-02-27T21:24:09Z"
    message: Deployment reload has been stopped due to secrets sync failure
    reason: Stopped
    status: "False"
    type: secrets.doppler.com/DeploymentReloadReady

I am not sure why it states that the managed secret exists, as it is the DopplerSecret itself that is creating it and then complaining about an incorrect secret type (which is not being expanded correctly since it says 'from Opaque to .').
I tried recreating the DopplerSecret multiple times, but it did not help.

@watsonian
Copy link
Contributor

@jv4n5e It sounds like you need to update your CRDs. Another user ran into this in #51. Essentially, what you need to do is this:

# Update doppler Helm repo
helm repo update

# Update the dopplersecrets CRD, which is not automatically upgraded by Helm
helm pull doppler/doppler-kubernetes-operator --untar
kubectl apply -f doppler-kubernetes-operator/crds/all.yaml

# Update the chart
helm upgrade <release_name> doppler/doppler-kubernetes-operator

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants