Skip to content

Commit 9506d19

Browse files
committed
Adding commonLabels for tempo-distributed HC. With this we'll be able to add labels to all K8S resources the chart is creating.
Signed-off-by: Martin Burgos <[email protected]>
1 parent 42d4d00 commit 9506d19

File tree

81 files changed

+104
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

81 files changed

+104
-0
lines changed

charts/tempo-distributed/templates/_helpers.tpl

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,13 @@ app.kubernetes.io/version: {{ .ctx.Chart.AppVersion | quote }}
9292
app.kubernetes.io/managed-by: {{ .ctx.Release.Service }}
9393
{{- end -}}
9494

95+
{{/*
96+
Common labels to add to all resources
97+
*/}}
98+
{{ - define "tempo.commonLabels" -}}
99+
{{- toYaml .Values.commonLabels | nindent 0 }}
100+
{{- end -}}
101+
95102
{{/*
96103
Simple service selector labels
97104
*/}}

charts/tempo-distributed/templates/admin-api/admin-api-dep.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ metadata:
77
{{- toYaml .Values.adminApi.annotations | nindent 4 }}
88
labels:
99
{{- include "tempo.labels" $dict | nindent 4 }}
10+
{{- include "tempo.commonLabels" (dict "ctx" .) | nindent 4 }}
1011
name: {{ include "tempo.resourceName" $dict }}
1112
namespace: {{ .Release.Namespace | quote }}
1213
spec:
@@ -21,6 +22,7 @@ spec:
2122
metadata:
2223
labels:
2324
{{- include "tempo.podLabels" $dict | nindent 8 }}
25+
{{- include "tempo.commonLabels" (dict "ctx" .) | nindent 8 }}
2426
{{- with .Values.adminApi.podLabels }}
2527
{{- toYaml . | nindent 8 }}
2628
{{- end }}

charts/tempo-distributed/templates/admin-api/admin-api-svc.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ metadata:
55
name: {{ include "tempo.resourceName" (dict "ctx" . "component" "admin-api") }}
66
labels:
77
{{- include "tempo.labels" (dict "ctx" . "component" "admin-api" "memberlist" true) | nindent 4 }}
8+
{{- include "tempo.commonLabels" (dict "ctx" .) | nindent 4 }}
89
{{- with .Values.adminApi.service.labels }}
910
{{- toYaml . | nindent 4 }}
1011
{{- end }}

charts/tempo-distributed/templates/compactor/deployment-compactor.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ metadata:
66
namespace: {{ .Release.Namespace }}
77
labels:
88
{{- include "tempo.labels" $dict | nindent 4 }}
9+
{{- include "tempo.commonLabels" (dict "ctx" .) | nindent 4 }}
910
{{- with .Values.compactor.annotations }}
1011
annotations:
1112
{{- toYaml . | nindent 4 }}
@@ -27,6 +28,7 @@ spec:
2728
metadata:
2829
labels:
2930
{{- include "tempo.podLabels" $dict | nindent 8 }}
31+
{{- include "tempo.commonLabels" (dict "ctx" .) | nindent 8 }}
3032
{{- with .Values.tempo.podLabels }}
3133
{{- toYaml . | nindent 8 }}
3234
{{- end }}

charts/tempo-distributed/templates/compactor/hpa.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ metadata:
77
namespace: {{ .Release.Namespace }}
88
labels:
99
{{- include "tempo.labels" (dict "ctx" . "component" "compactor") | nindent 4 }}
10+
{{- include "tempo.commonLabels" (dict "ctx" .) | nindent 4 }}
1011
spec:
1112
scaleTargetRef:
1213
apiVersion: apps/v1

charts/tempo-distributed/templates/compactor/keda-scaledObject.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ metadata:
66
namespace: {{ .Release.Namespace }}
77
labels:
88
{{- include "tempo.labels" (dict "ctx" . "component" "compactor") | nindent 4 }}
9+
{{- include "tempo.commonLabels" (dict "ctx" .) | nindent 4 }}
910
spec:
1011
minReplicaCount: {{ .Values.compactor.autoscaling.minReplicas }}
1112
maxReplicaCount: {{ .Values.compactor.autoscaling.maxReplicas }}

charts/tempo-distributed/templates/compactor/poddisruptionbudget-compactor.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ metadata:
77
namespace: {{ .Release.Namespace }}
88
labels:
99
{{- include "tempo.labels" $dict | nindent 4 }}
10+
{{- include "tempo.commonLabels" (dict "ctx" .) | nindent 4 }}
1011
spec:
1112
selector:
1213
matchLabels:

charts/tempo-distributed/templates/compactor/service-compactor.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ metadata:
55
namespace: {{ .Release.Namespace }}
66
labels:
77
{{- include "tempo.labels" (dict "ctx" . "component" "compactor") | nindent 4 }}
8+
{{- include "tempo.commonLabels" (dict "ctx" .) | nindent 4 }}
89
{{- with .Values.compactor.service.annotations }}
910
annotations:
1011
{{- tpl (toYaml . | nindent 4) $ }}

charts/tempo-distributed/templates/configmap-runtime.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ metadata:
55
name: {{ tpl .Values.externalRuntimeConfigName . }}
66
labels:
77
{{- include "tempo.labels" (dict "ctx" .) | nindent 4 }}
8+
{{- include "tempo.commonLabels" (dict "ctx" .) | nindent 4 }}
89
namespace: {{ .Release.Namespace | quote }}
910
data:
1011
overrides.yaml: |

charts/tempo-distributed/templates/configmap-tempo.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ metadata:
99
name: {{ tpl .Values.externalConfigSecretName . }}
1010
labels:
1111
{{- include "tempo.labels" (dict "ctx" .) | nindent 4 }}
12+
{{- include "tempo.commonLabels" (dict "ctx" .) | nindent 4 }}
1213
namespace: {{ .Release.Namespace | quote }}
1314
{{- if eq .Values.configStorageType "Secret" }}
1415
data:

0 commit comments

Comments
 (0)