diff --git a/keda/README.md b/keda/README.md index b979d50c..c0de0233 100644 --- a/keda/README.md +++ b/keda/README.md @@ -71,6 +71,7 @@ their default values. | `certificates.secretName` | string | `"kedaorg-certs"` | Secret name to be mounted with KEDA TLS certificates | | `clusterDomain` | string | `"cluster.local"` | Kubernetes cluster domain | | `clusterName` | string | `"kubernetes-default"` | Kubernetes cluster name. Used in features such as emitting CloudEvents | +| `crds.additionalAnnotations` | object | `{}` | Custom annotations specifically for CRDs | | `crds.install` | bool | `true` | Defines whether the KEDA CRDs have to be installed or not. | | `env` | list | `[]` | Additional environment variables that will be passed onto all KEDA components | | `extraObjects` | list | `[]` | Array of extra K8s manifests to deploy | diff --git a/keda/templates/crds/crd-clustertriggerauthentications.yaml b/keda/templates/crds/crd-clustertriggerauthentications.yaml index 792a7d18..b60728d1 100644 --- a/keda/templates/crds/crd-clustertriggerauthentications.yaml +++ b/keda/templates/crds/crd-clustertriggerauthentications.yaml @@ -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 }} diff --git a/keda/templates/crds/crd-scaledjobs.yaml b/keda/templates/crds/crd-scaledjobs.yaml index 8473b6f8..886efbb4 100644 --- a/keda/templates/crds/crd-scaledjobs.yaml +++ b/keda/templates/crds/crd-scaledjobs.yaml @@ -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 }} diff --git a/keda/templates/crds/crd-scaledobjects.yaml b/keda/templates/crds/crd-scaledobjects.yaml index 05f98ce1..f473db61 100644 --- a/keda/templates/crds/crd-scaledobjects.yaml +++ b/keda/templates/crds/crd-scaledobjects.yaml @@ -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 }} diff --git a/keda/templates/crds/crd-triggerauthentications.yaml b/keda/templates/crds/crd-triggerauthentications.yaml index 4facbdba..5d787c3c 100644 --- a/keda/templates/crds/crd-triggerauthentications.yaml +++ b/keda/templates/crds/crd-triggerauthentications.yaml @@ -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 }} diff --git a/keda/values.yaml b/keda/values.yaml index cbe2f70c..f64216de 100644 --- a/keda/values.yaml +++ b/keda/values.yaml @@ -42,6 +42,11 @@ crds: # -- Defines whether the KEDA CRDs have to be installed or not. install: true + # -- Custom annotations specifically for CRDs + additionalAnnotations: + {} + # foo: bar + # -- Defines Kubernetes namespaces to watch to scale their workloads. Default watches all namespaces watchNamespace: ""