Skip to content

Commit

Permalink
feat: Add a way to customize the 'managed-by' label
Browse files Browse the repository at this point in the history
Signed-off-by: Jirka Kremser <jiri.kremser@gmail.com>
  • Loading branch information
jkremser committed Mar 26, 2024
1 parent 8231b9e commit 4e0d9e9
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 1 deletion.
1 change: 1 addition & 0 deletions keda/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,7 @@ their default values.
| `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. |
| `customManagedBy` | string | `""` | When specified, each rendered resource will have `app.kubernetes.io/managed-by: ${this}` label on it. Useful, when using only helm template with some other solution. |
| `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 |
Expand Down
2 changes: 1 addition & 1 deletion keda/templates/_helpers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ Generate basic labels
*/}}
{{- define "keda.labels" -}}
{{- include "keda.crd-labels" . }}
app.kubernetes.io/instance: {{ .Release.Name }}
app.kubernetes.io/instance: {{ .Values.customManagedBy | default .Release.Name }}
{{- if .Values.additionalLabels }}
{{ toYaml .Values.additionalLabels }}
{{- end }}
Expand Down
3 changes: 3 additions & 0 deletions keda/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -812,3 +812,6 @@ extraObjects: []

# -- Capability to turn on/off ASCII art in Helm installation notes
asciiArt: true

# -- When specified, each rendered resource will have `app.kubernetes.io/managed-by: ${this}` label on it. Useful, when using only helm template with some other solution.
customManagedBy: ""

0 comments on commit 4e0d9e9

Please sign in to comment.