So, I read up the issues regarding different Helm versions and annotation “helm.sh/hook”: crd-install.
I am using Helm version 2.9.1 (< 2.10).
Deleting CRDs and Istio Configuration
Istio, by design, expects Istio’s Custom Resources contained within CRDs to leak into the Kubernetes environment. CRDs contain the runtime configuration set by the operator. Because of this, we consider it better for operators to explicitly delete the runtime configuration data rather than unexpectedly lose it.
But based on the CRD information, I am expecting CRDs to “leak” into k8s cluster. But they are not leaking. They are getting removed when I perform kubectl delete.
Is there a way, for me to retain the CRDs?
The workaround I was able to do was to manually modify install/kubernetes/helm/istio/values.yaml, to set crds: false
# Include the crd definition when generating the template.
# For 'helm template' and helm install > 2.10 it should be true.
# For helm < 2.9, crds must be installed ahead of time with
# 'kubectl apply -f install/kubernetes/helm/istio/templates/crds.yaml
# and this options must be set off.
crds: false <-- line # 189
I am looking to find if there is an automated way of doing this, in Helm?
I did try –set crds=false in helm template …, but it didn’t work.
Any help on this is appreciated!