Cert-manager: `helm upgrade --set installCRDs=true` getting an error

Created on 27 May 2020  路  6Comments  路  Source: jetstack/cert-manager

Describe the bug:
I'm having an issue while trying to do an helm upgrade with the new version v0.15.1 with --set installCRDs=true.

The error I have is:

failed to upgrade chart for release [cert-manager]: rendered manifests contain a new resource that already exists. Una
ble to continue with update: existing resource conflict: kind: CustomResourceDefinition, namespace: , name: issuers.cert-manager.io"

Is there any known issue with the --set installCRDs=true while upgrading the helm chart?

Expected behaviour:
If the CRDs are already installed, it shouldn't complain?

Steps to reproduce the bug:

helm repo add jetstack https://charts.jetstack.io
helm repo update
helm upgrade \
    cert-manager \
    jetstack/cert-manager \
    --install \
    -n cert-manager \
    --create-namespace \
    --version v0.15.1 \
    --set installCRDs=true

I previously and successfully ran this exact same command with --version v0.15.0 and without the --set installCRDs=true but with kubectl apply --validate=false -f https://github.com/jetstack/cert-manager/releases/download/v0.15.0/cert-manager.crds.yaml.

Environment details::

  • Kubernetes version (e.g. v1.10.2): 1.16.7
  • Cloud-provider/provisioner (e.g. GKE, kops AWS, etc): AKS
  • cert-manager version (e.g. v0.4.0): v0.15.1
  • Install method (e.g. helm or static manifests): helm

/kind bug

kinbug

Most helpful comment

If you installed it the first time using installCRDs=true keep it on true, if you ever used kubectl apply --validate=false -f https://github.com/jetstack/cert-manager/releases/download/v0.15.0/cert-manager.crds.yaml keep doing that and set installCRDs=false

/close

All 6 comments

This is the expected behavior as installCRDs installs them like a normal Helm resource which Helm will error for if they exist, this is why it is marked experimental. This is done as Helm does not allow changes in their CRD handling (see https://github.com/helm/helm/issues/7735)

oh ok good to know @meyskens, thanks for the info. So I should set --installCRDs=false for further upgrades?

If you installed it the first time using installCRDs=true keep it on true, if you ever used kubectl apply --validate=false -f https://github.com/jetstack/cert-manager/releases/download/v0.15.0/cert-manager.crds.yaml keep doing that and set installCRDs=false

/close

@meyskens: Closing this issue.

In response to this:

If you installed it the first time using installCRDs=true keep it on true, if you ever used kubectl apply --validate=false -f https://github.com/jetstack/cert-manager/releases/download/v0.15.0/cert-manager.crds.yaml keep doing that and set installCRDs=false

/close

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

Got it and makes sense, thanks @meyskens for the clarifications!

Sorry, but so, how to fix the error ?

Was this page helpful?
0 / 5 - 0 ratings