Skip to content

Commit

Permalink
support crd-specific annotations
Browse files Browse the repository at this point in the history
Signed-off-by: Adam Walford <[email protected]>
  • Loading branch information
Adam Walford committed Dec 14, 2023
1 parent 0a0a48c commit c214ff8
Show file tree
Hide file tree
Showing 6 changed files with 13 additions and 9 deletions.
2 changes: 1 addition & 1 deletion keda/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ kubeVersion: ">=v1.23.0-0"

# This is the chart version. This version number should be incremented each time you make changes
# to the chart and its templates, including the app version.
version: 2.12.1
version: 2.12.2

# This is the version number of the application being deployed. This version number should be
# incremented each time you make changes to the application.
Expand Down
4 changes: 2 additions & 2 deletions keda/templates/crds/crd-clustertriggerauthentications.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ kind: CustomResourceDefinition
metadata:
annotations:
controller-gen.kubebuilder.io/version: v0.13.0
{{- if .Values.additionalAnnotations }}
{{- toYaml .Values.additionalAnnotations | nindent 4 }}
{{- if (or .Values.crds.additionalAnnotations .Values.additionalAnnotations) }}
{{- toYaml (merge .Values.crds.additionalAnnotations .Values.additionalAnnotations) | nindent 4 }}
{{- end }}
labels:
app.kubernetes.io/name: {{ .Values.operator.name }}
Expand Down
4 changes: 2 additions & 2 deletions keda/templates/crds/crd-scaledjobs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ kind: CustomResourceDefinition
metadata:
annotations:
controller-gen.kubebuilder.io/version: v0.13.0
{{- if .Values.additionalAnnotations }}
{{- toYaml .Values.additionalAnnotations | nindent 4 }}
{{- if (or .Values.crds.additionalAnnotations .Values.additionalAnnotations) }}
{{- toYaml (merge .Values.crds.additionalAnnotations .Values.additionalAnnotations) | nindent 4 }}
{{- end }}
labels:
app.kubernetes.io/name: {{ .Values.operator.name }}
Expand Down
4 changes: 2 additions & 2 deletions keda/templates/crds/crd-scaledobjects.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ kind: CustomResourceDefinition
metadata:
annotations:
controller-gen.kubebuilder.io/version: v0.13.0
{{- if .Values.additionalAnnotations }}
{{- toYaml .Values.additionalAnnotations | nindent 4 }}
{{- if (or .Values.crds.additionalAnnotations .Values.additionalAnnotations) }}
{{- toYaml (merge .Values.crds.additionalAnnotations .Values.additionalAnnotations) | nindent 4 }}
{{- end }}
labels:
app.kubernetes.io/name: {{ .Values.operator.name }}
Expand Down
4 changes: 2 additions & 2 deletions keda/templates/crds/crd-triggerauthentications.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ kind: CustomResourceDefinition
metadata:
annotations:
controller-gen.kubebuilder.io/version: v0.13.0
{{- if .Values.additionalAnnotations }}
{{- toYaml .Values.additionalAnnotations | nindent 4 }}
{{- if (or .Values.crds.additionalAnnotations .Values.additionalAnnotations) }}
{{- toYaml (merge .Values.crds.additionalAnnotations .Values.additionalAnnotations) | nindent 4 }}
{{- end }}
labels:
app.kubernetes.io/name: {{ .Values.operator.name }}
Expand Down
4 changes: 4 additions & 0 deletions keda/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,10 @@ crds:
# -- Defines whether the KEDA CRDs have to be installed or not.
install: true

additionalAnnotations:
{}
# foo: bar

# -- Defines Kubernetes namespaces to watch to scale their workloads. Default watches all namespaces
watchNamespace: ""

Expand Down

0 comments on commit c214ff8

Please sign in to comment.