smallstep / helm-charts

Helm packages for Kubernetes
Apache License 2.0
49 stars 72 forks source link

step-issuer fails because of helm annotation validation error #164

Closed zegerius closed 10 months ago

zegerius commented 12 months ago

Subject of the issue

The changes introduced for step-issuer at 0.8.0/0.8.0+1 broke our (very simple) local developmet setup.

 helm upgrade --install --wait \
        --set deployment.args.enableLeaderElection=false \
        --set stepClusterIssuer.create=true \
        --set stepClusterIssuer.caBundle=$(kubectl get -n infra -o jsonpath="{.data['root_ca\.crt']}" configmaps/step-certificates-certs | base64 | tr -d '\n') \
        --set stepClusterIssuer.provisioner.name=$(kubectl get -n infra -o jsonpath="{.data['ca\.json']}" configmaps/step-certificates-config | jq -r .authority.provisioners\[0\].name | tr -d '\n') \
        --set stepClusterIssuer.provisioner.kid=$(kubectl get -n infra -o jsonpath="{.data['ca\.json']}" configmaps/step-certificates-config | jq -r .authority.provisioners\[0\].key.kid | tr -d '\n') \
        --set stepClusterIssuer.provisioner.passwordRef.name=step-certificates-provisioner-password \
        --set stepClusterIssuer.provisioner.passwordRef.namespace=infra \
        --set stepClusterIssuer.provisioner.passwordRef.key=password \
        -n infra --create-namespace\
        step-issuer smallstep/step-issuer

now results in

Error: Unable to continue with install: CustomResourceDefinition "stepclusterissuers.certmanager.step.sm" in namespace "" exists and cannot be imported into the current release: invalid ownership metadata; label validation error: missing key "app.kubernetes.io/managed-by": must be set to "Helm"; annotation validation error: missing key "meta.helm.sh/release-name": must be set to "step-issuer"; annotation validation error: missing key "meta.helm.sh/release-namespace": must be set to "infra"

There might be some context missing in the CRDs now that was previously there. It works when I install with --version 0.7.0. I tried both versions 0.8.0 and 0.8.0+1.

Your environment

This is in a fresh cluster with:

Steps to reproduce

Run commands above.

maraino commented 10 months ago

This PR has solved this issue https://github.com/smallstep/helm-charts/issues/168