diff --git a/helm/aws-load-balancer-controller/crds/crds.yaml b/helm/aws-load-balancer-controller/crds/crds.yaml index 048d51e84..52fbcf18c 100644 --- a/helm/aws-load-balancer-controller/crds/crds.yaml +++ b/helm/aws-load-balancer-controller/crds/crds.yaml @@ -1,8 +1,15 @@ +{{- if .Values.crds.install }} apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: controller-gen.kubebuilder.io/version: v0.14.0 + {{- if .Values.crds.keep }} + "helm.sh/resource-policy": keep + {{- end }} + {{- with .Values.crds.annotations }} + {{- toYaml . | nindent 4 }} + {{- end }} name: ingressclassparams.elbv2.k8s.aws spec: group: elbv2.k8s.aws @@ -244,6 +251,12 @@ kind: CustomResourceDefinition metadata: annotations: controller-gen.kubebuilder.io/version: v0.14.0 + {{- if .Values.crds.keep }} + "helm.sh/resource-policy": keep + {{- end }} + {{- with .Values.crds.annotations }} + {{- toYaml . | nindent 4 }} + {{- end }} name: targetgroupbindings.elbv2.k8s.aws spec: group: elbv2.k8s.aws @@ -657,3 +670,4 @@ spec: storage: true subresources: status: {} +{{- end }} \ No newline at end of file diff --git a/helm/aws-load-balancer-controller/values.yaml b/helm/aws-load-balancer-controller/values.yaml index a33542b8b..389e0a858 100644 --- a/helm/aws-load-balancer-controller/values.yaml +++ b/helm/aws-load-balancer-controller/values.yaml @@ -430,3 +430,12 @@ loadBalancerClass: # creator will disable helm default labels, so you can only add yours # creator: "me" + +# custom resource definitions configuration +crds: + # retain CRDs upon chart uninstall + keep: true + # install CRDs + install: true + # pass in annotations to CRDs + annotations: {} \ No newline at end of file