Skip to content

Commit

Permalink
Add commonLabels to Helm chart
Browse files Browse the repository at this point in the history
Introduce `commonLabels` in the `values.yaml` file to allow users to add
custom labels to all resources created by the Helm chart. This enhancement
enables better categorization and management of resources by applying
consistent labeling throughout the deployment.
  • Loading branch information
alaturqua authored and mosabua committed Aug 30, 2024
1 parent 2665198 commit b32be4c
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
3 changes: 3 additions & 0 deletions helm/trino-gateway/templates/_helpers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,9 @@ helm.sh/chart: {{ include "trino-gateway.chart" . }}
app.kubernetes.io/version: {{ .Chart.AppVersion | quote }}
{{- end }}
app.kubernetes.io/managed-by: {{ .Release.Service }}
{{- if .Values.commonLabels }}
{{ tpl (toYaml .Values.commonLabels) . }}
{{- end }}
{{- end }}

{{/*
Expand Down
5 changes: 5 additions & 0 deletions helm/trino-gateway/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ config:

service:
type: ClusterIP
port: 8080

ingress:
enabled: false
Expand Down Expand Up @@ -110,6 +111,10 @@ tolerations: []

affinity: {}

# -- Labels that get applied to every resource's metadata
commonLabels: {}
# example: "some label"

podAnnotations: {}

podLabels: {}
Expand Down

0 comments on commit b32be4c

Please sign in to comment.