From 788fcfdfbce63d327f7a62fb2cef40a2daf9970c Mon Sep 17 00:00:00 2001 From: Adam Walford Date: Thu, 14 Dec 2023 14:26:05 +0000 Subject: [PATCH 1/3] support crd-specific annotations Signed-off-by: Adam Walford --- keda/Chart.yaml | 2 +- keda/templates/crds/crd-clustertriggerauthentications.yaml | 4 ++-- keda/templates/crds/crd-scaledjobs.yaml | 4 ++-- keda/templates/crds/crd-scaledobjects.yaml | 4 ++-- keda/templates/crds/crd-triggerauthentications.yaml | 4 ++-- keda/values.yaml | 4 ++++ 6 files changed, 13 insertions(+), 9 deletions(-) diff --git a/keda/Chart.yaml b/keda/Chart.yaml index 00c4e2ed..04a08f97 100644 --- a/keda/Chart.yaml +++ b/keda/Chart.yaml @@ -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. 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..a8ba6199 100644 --- a/keda/values.yaml +++ b/keda/values.yaml @@ -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: "" From 03e5a846bfd16f8f6468735c3022808d9da808d2 Mon Sep 17 00:00:00 2001 From: Adam Walford Date: Thu, 14 Dec 2023 14:29:15 +0000 Subject: [PATCH 2/3] update readme Signed-off-by: Adam Walford --- keda/README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/keda/README.md b/keda/README.md index b979d50c..ff057519 100644 --- a/keda/README.md +++ b/keda/README.md @@ -72,6 +72,7 @@ their default values. | `clusterDomain` | string | `"cluster.local"` | Kubernetes cluster domain | | `clusterName` | string | `"kubernetes-default"` | Kubernetes cluster name. Used in features such as emitting CloudEvents | | `crds.install` | bool | `true` | Defines whether the KEDA CRDs have to be installed or not. | +| `crds.additionalAnnotations` | object | `{}` | Custom annotations to add specifically to CRD resources | | `env` | list | `[]` | Additional environment variables that will be passed onto all KEDA components | | `extraObjects` | list | `[]` | Array of extra K8s manifests to deploy | | `global.image.registry` | string | `nil` | Global image registry of KEDA components | From f7ed475382fdcfc93e49906157080afd387cf0ca Mon Sep 17 00:00:00 2001 From: Adam Walford Date: Wed, 20 Dec 2023 09:31:42 +0000 Subject: [PATCH 3/3] update docs using helm-docs Signed-off-by: Adam Walford --- keda/Chart.yaml | 2 +- keda/README.md | 2 +- keda/values.yaml | 1 + 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/keda/Chart.yaml b/keda/Chart.yaml index 04a08f97..00c4e2ed 100644 --- a/keda/Chart.yaml +++ b/keda/Chart.yaml @@ -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.2 +version: 2.12.1 # This is the version number of the application being deployed. This version number should be # incremented each time you make changes to the application. diff --git a/keda/README.md b/keda/README.md index ff057519..c0de0233 100644 --- a/keda/README.md +++ b/keda/README.md @@ -71,8 +71,8 @@ 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. | -| `crds.additionalAnnotations` | object | `{}` | Custom annotations to add specifically to CRD resources | | `env` | list | `[]` | Additional environment variables that will be passed onto all KEDA components | | `extraObjects` | list | `[]` | Array of extra K8s manifests to deploy | | `global.image.registry` | string | `nil` | Global image registry of KEDA components | diff --git a/keda/values.yaml b/keda/values.yaml index a8ba6199..f64216de 100644 --- a/keda/values.yaml +++ b/keda/values.yaml @@ -42,6 +42,7 @@ crds: # -- Defines whether the KEDA CRDs have to be installed or not. install: true + # -- Custom annotations specifically for CRDs additionalAnnotations: {} # foo: bar