Charts: cert-manager - add crd-install hook

Created on 10 Nov 2018  Â·  9Comments  Â·  Source: helm/charts

Is this a request for help?:

No

Is this a BUG REPORT or FEATURE REQUEST? (choose one):
Bug

Version of Helm and Kubernetes:

Which chart:
cert-manager

What happened:

  • added cert-manager as a dependency to umbrella chart
  • ran helm upgrade
  • ran kubectl get crds with no response

What you expected to happen:

  • CRDs should get generated as if this were a root install chart rather than a subchart

How to reproduce it (as minimally and precisely as possible):

# requirements.yaml
dependencies:
  - name: cert-manager
    version: 0.5.0
    repository: https://kubernetes-charts.storage.googleapis.com # stable

# values.yaml
cert-manager:
  ingressShim:
    defaultIssuerName: letsencrypt-prod
    defaultIssuerKind: ClusterIssuer

# cert-cluster-issuer.yaml
apiVersion: certmanager.k8s.io/v1alpha1
kind: ClusterIssuer
metadata:
  name: letsencrypt-prod
spec:
  acme:
    server: https://acme-v02.api.letsencrypt.org/directory
    email: me@consotocom
    privateKeySecretRef:
      name: letsencrypt-prod
    http01: {}

#---
helm create
helm install .
lifecyclstale

Most helpful comment

I still have issues with v0.6.2. Can this be re-opened?

All 9 comments

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Any further update will cause the issue/pull request to no longer be considered stale. Thank you for your contributions.

Installation using crd-install is broken as of helm 2.12.0. Same as #9941

⎈ 8h7hd:system:/src$ helm version
Client: &version.Version{SemVer:"v2.12.0", GitCommit:"d325d2a9c179b33af1a024cdb5a4472b6288016a", GitTreeState:"clean"}
Server: &version.Version{SemVer:"v2.12.0", GitCommit:"d325d2a9c179b33af1a024cdb5a4472b6288016a", GitTreeState:"clean"}
⎈ 8h7hd:system:/src$ kubectl version
Client Version: version.Info{Major:"1", Minor:"13", GitVersion:"v1.13.0", GitCommit:"ddf47ac13c1a9483ea035a79cd7c10005ff21a6d", GitTreeState:"clean", BuildDate:"2018-12-03T21:04:45Z", GoVersion:"go1.11.2", Compiler:"gc", Platform:"linux/amd64"}
Server Version: version.Info{Major:"1", Minor:"12", GitVersion:"v1.12.3", GitCommit:"435f92c719f279a3a67808c80521ea17d5715c66", GitTreeState:"clean", BuildDate:"2018-11-26T12:46:57Z", GoVersion:"go1.10.4", Compiler:"gc", Platform:"linux/amd64"}
⎈ 8h7hd:default:/src$ helm install stable/cert-manager -n c109-cert-manager  --version 0.5.2
Error: customresourcedefinitions.apiextensions.k8s.io "certificates.certmanager.k8s.io" already exists
⎈ 8h7hd:system:/src$ kubectl get crd certificates.certmanager.k8s.io -o yaml
apiVersion: apiextensions.k8s.io/v1beta1
kind: CustomResourceDefinition
metadata:
  annotations:
    helm.sh/hook: crd-install
...

I just ran into an issue (this one?) while trying to go from cert-manger 0.5.0 -> 0.5.2 on the latest helm.

➜  ~ helm version                                           
Client: &version.Version{SemVer:"v2.12.0", GitCommit:"d325d2a9c179b33af1a024cdb5a4472b6288016a", GitTreeState:"clean"}
Server: &version.Version{SemVer:"v2.12.0", GitCommit:"d325d2a9c179b33af1a024cdb5a4472b6288016a", GitTreeState:"clean"}
➜  ~ helm list                                              
NAME            REVISION    UPDATED                     STATUS      CHART                               APP VERSION NAMESPACE     
cert-manager    4           Wed Dec 19 19:41:54 2018    FAILED      cert-manager-v0.5.2                 v0.5.2      cert-manager  

➜  ~ helm upgrade cert-manager stable/cert-manager          
Error: UPGRADE FAILED: no CustomResourceDefinition with the name "certificates.certmanager.k8s.io" found

➜  ~ k -n cert-manager get CustomResourceDefinition
NAME                                          CREATED AT
certificates.certmanager.k8s.io               2018-09-18T20:33:01Z
...

Possibly related to this: https://github.com/helm/helm/issues/3275. I really don't want to re-create cert-manager/request all certs again.

I can confirm @hobti01 's statement above.
I will try to investigate.

@munnerz Meanwhile, would you have any clue / pointers?

Thanks!

Edit: #5054 seems to address the problem.

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Any further update will cause the issue/pull request to no longer be considered stale. Thank you for your contributions.

This issue is being automatically closed due to inactivity.

I still have issues with v0.6.2. Can this be re-opened?

This issue means you can not fully reproduce a cert-manager install with just helm, and it makes me sad.

Was this page helpful?
0 / 5 - 0 ratings