Skip to content

Commit

Permalink
add crd resource keep
Browse files Browse the repository at this point in the history
Signed-off-by: Adam Buran <[email protected]>
  • Loading branch information
aburan28 committed Nov 21, 2024
1 parent 13538cb commit ec4a99c
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 0 deletions.
14 changes: 14 additions & 0 deletions helm/aws-load-balancer-controller/crds/crds.yaml
Original file line number Diff line number Diff line change
@@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -657,3 +670,4 @@ spec:
storage: true
subresources:
status: {}
{{- end }}
9 changes: 9 additions & 0 deletions helm/aws-load-balancer-controller/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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: {}

0 comments on commit ec4a99c

Please sign in to comment.