Repository navigation
Conversation
- add crds - add podsecuritypolicy - add crds cleanup Signed-off-by: Andrii Nasinnyk <[email protected]>
Signed-off-by: Andrii Nasinnyk <[email protected]>
|
@anasinnyk: Adding the "do-not-merge/release-note-label-needed" label because no release-note block was detected, please follow our release note process to remove it. DetailsInstructions 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. |
|
Hi @anasinnyk. Thanks for your PR. I'm waiting for a jetstack or cert-manager member to verify that this patch is reasonable to test. If it is, they should reply with Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. DetailsInstructions 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. |
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: anasinnyk If they are not already assigned, you can assign the PR to them by writing The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
| @@ -0,0 +1,154 @@ | |||
| {{- if and .Release.IsInstall .Values.crds.create -}} | |||
There was a problem hiding this comment.
This would delete crds on upgrade.
There was a problem hiding this comment.
Hm... I don't think so. That install only once and not modify it after upgrade. I checked it.
There was a problem hiding this comment.
| kubectl delete clusterissuers --all; | ||
| kubectl delete orders --all; | ||
| kubectl delete challenges --all; | ||
| sleep 10; |
There was a problem hiding this comment.
This is hacky. Shouldn't it suffice to delete the crds?
There was a problem hiding this comment.
That's optionally and disable by default. I found it in stable/prometheus-operator
There was a problem hiding this comment.
|
After the debacle with the crd-install hook in the past, I'm not really comfortable introducing this option back into our chart until we're sure it will behave well in recent versions of Helm. We have users on pre-2.9 versions, and when this is installed the hook will actually be ignored. There seems to be a lot of code here that's effectively working around Helm's own deficiencies in CRD management in charts - when considering the full test matrix of helm versions, as well as users upgrading from/to different cert-manager chart versions, I don't think any homegrown solution that isn't an actual, official & supported method is going to bite us at some point. The reason for moving the CRDs out of the chart altogether is that a lot of users experienced their CRDs being deleted upon upgrade, deleting important configuration and also breaking those users upgrade paths. I really want to enforce a separation between "cert-manager API types" and cert-manager itself, as from a kubernetes perspective they are quite distinct things (think: kube-apiserver vs kube-controller-manager). Unless someone from the upstream Helm project can comment as to how this situation has improved over the last few months (I may have missed some movement!), I am inclined to not accept this PR until we are certain we won't have destructive behaviour again. |
|
@munnerz I can describe some workaround like that: https://github.com/helm/charts/tree/master/stable/prometheus-operator#helm-210-workaround in our case it's more easier we just should disable |
|
@munnerz what do you think about the previous comment? |
|
@munnerz please answer to my comment. |
|
The pre-flight manual set of needing to inject CRDs really makes it painful to use this chart with the terraform helm provider. Doubly so when tf is also provisioning the k8s cluster. @munnerz Would you consider adding a |
My concern is more the additional burden/overhead on us as maintainers to ensure users can upgrade safely. Adding it as an option implies that we will support that installation mechanism moving forward (and if we don't commit to this, then I think it's a short-return if we were to add it in). So far there's not been that much movement in the upstream Helm project to properly resolve the issues we had before, so I'm not comfortable supporting this installation/upgrade mechanism without seeing that addressed.
With regards to terraform, you should be able to add an explicit |
|
The terraform kubernetes provider has no support for CRDs as under the current model, a new resource type would have to be added for each CRD. This is why charts are often used to package up the kubernetes resources and tf handles ordering and introspection, which helm can not provide. |
|
That makes sense, but I don't think it precludes you using Terraform's DAG to specify "this resource must exist before this one". This could either be two different Helm chart resources, one of them explicitly declaring a I understand it may be easier from a first-time-install point of view to bundle them all into one, but we lose the ability to upgrade the CustomResourceDefinition resources in future, as well as introduce behaviour that is unpredictable between Helm/Tiller versions. Given that the Helm project still doesn't have a good answer to these problems, I don't think we should switch back to this model until we can be certain that we can continue to maintain/upgrade user's cert-manager installations long term. I'm going to close this now, as I think any attempt to add CRDs back into our Helm chart is going to need to be accompanied by an analysis/document detailing:
I appreciate this isn't the answer you're hoping for, but adding an additional installation mechanism makes supporting users twice as hard, as we have an entire new matrix of installation problems that can be encountered - and we've already been burnt by a lot of these installation problems in the past, and made a decision to move away from this model for that reason. Thanks for putting this together though - and for the insight into problems Terraform users face with cert-manager 🙈 |
|
Why not provide this as a If you don't want to support user installations using this feature then make it clear in the docs and hide it behind a flag? |
What this PR does / why we need it: We need to install all chart by helm
Which issue this PR fixes (optional, in
fixes #<issue number>(, fixes #<issue_number>, ...)format, will close that issue when PR gets merged): fixes helm/charts#10949Special notes for your reviewer:
Release note: