Skip to content

Commit f106e31

Browse files
jinnovationvirajmehtaGabrielBianconi
authored
Helm: Enable setting global labels for all created resources (tensorzero#3140)
* Helm: Enable setting global labels for all created resources This can be valuable for teams that use labels to loosely denote ownership of K8s resources deployed to a shared cluster. * move to tensorzero.values * Update examples/production-deployment-k8s-helm/values.yaml --------- Co-authored-by: Viraj Mehta <[email protected]> Co-authored-by: Gabriel Bianconi <[email protected]>
1 parent 4b75037 commit f106e31

File tree

2 files changed

+9
-1
lines changed

2 files changed

+9
-1
lines changed

examples/production-deployment-k8s-helm/templates/_helpers.tpl

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,11 @@ helm.sh/chart: {{ include "tensorzero.chart" . }}
3939
app.kubernetes.io/version: {{ .Chart.AppVersion | quote }}
4040
{{- end }}
4141
app.kubernetes.io/managed-by: {{ .Release.Service }}
42+
43+
{{- range $label, $value := .Values.globalLabels }}
44+
{{ $label }}: {{ $value }}
45+
{{- end }}
46+
4247
{{- end }}
4348

4449
{{/*
@@ -47,4 +52,4 @@ Selector labels
4752
{{- define "tensorzero.selectorLabels" -}}
4853
app.kubernetes.io/name: {{ include "tensorzero.name" . }}
4954
app.kubernetes.io/instance: {{ .Release.Name }}
50-
{{- end }}
55+
{{- end }}

examples/production-deployment-k8s-helm/values.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -120,6 +120,9 @@ persistence:
120120
storageClass: ""
121121
mountPath: /app/storage
122122

123+
globalLabels: {}
124+
# my.domain/owner: my-team
125+
123126
# TensorZero Configuration
124127
configMap:
125128
data:

0 commit comments

Comments
 (0)