cert-manager
cert-manager copied to clipboard
[feat] when helm set `installCRDs: true`. crds.yaml file must be pre-install and pre-upgrade
Pull Request Motivation
When cert-manager as sub-charts and set installCRDs: true . crds.yaml file must be pre-install and pre-upgrade
like: https://craftech.io/blog/release-lifecycle-management-with-helm/
Kind
/kind feature
Release Note
When helm set `installCRDs: true`. crds.yaml file must be `pre-install` and `pre-upgrade`
Hi @dongjiang1989. Thanks for your PR.
I'm waiting for a cert-manager member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.
Once the patch is verified, the new status will be reflected by the ok-to-test label.
I understand the commands that are listed here.
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.
@inteon PTAL
xref: https://github.com/cert-manager/cert-manager/pull/5777
Issues go stale after 90d of inactivity.
Mark the issue as fresh with /remove-lifecycle stale.
Stale issues rot after an additional 30d of inactivity and eventually close.
If this issue is safe to close now please do so with /close.
Send feedback to jetstack.
/lifecycle stale
/remove-lifecycle stale
Bump. Came across this today.
Bump. Came across this today.
Can you use this PR to solve your problem? @KrisJohnstone
[APPROVALNOTIFIER] This PR is NOT APPROVED
This pull-request has been approved by: Once this PR has been reviewed and has the lgtm label, please ask for approval from inteon. For more information see the Kubernetes Code Review Process.
The full list of commands accepted by this bot can be found here.
Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment
@dongjiang1989 I did some experimentation based on your PR. It does not seem to be possible to use the cert-manager CRDs when cert-manager is a dependency of your Helm chart, even with these changes applied.
I get the following error:
$ helm install test .
Error: INSTALLATION FAILED: unable to build kubernetes objects from release manifest: resource mapping not found for name: "example-com" namespace: "" from "": no matches for kind "Certificate" in version "cert-manager.io/v1"
ensure CRDs are installed first
My Chart.yaml looks like this:
apiVersion: v2
name: example_chart
description: A Helm chart with cert-manager as subchart
type: application
version: 0.1.0
appVersion: "0.1.0"
dependencies:
- name: cert-manager
version: v1.14.0
repository: "file://./cert-manager"
alias: cert-manager
condition: cert-manager.enabled
And the chart contains a single Certificate resource.
Is there another reason why you would add these annotations other than trying to use created CR objects of the type defined in the CRD?
NOTE: we have solved this problem in the past by using Helmfile https://github.com/helmfile/helmfile
@inteon In your environment, what is the certmanager version?
Please execute kubectl api-versions | grep "certmanager"
@inteon In your environment, what is the certmanager version? Please execute
kubectl api-versions | grep "certmanager"
I was just installing from master. Before installation, I do not have any CRDs installed, after installation, I have the following CRDs:
$ kubectl api-versions | grep "cert-manager"
acme.cert-manager.io/v1
cert-manager.io/v1
Could you explain what this PR tries to fix, eg. using a sample chart that has this problem and for which the problem is fixed after making the provided changes?
PR needs rebase.
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.
Will close this PR as it does not seem to fix the issue. Feel free to share an example chart that is able to install CRs thanks to this PR, then I'll re-open this PR.