Skip to content

Commit

Permalink
chore: add common labels and annotations to pods (#138)
Browse files Browse the repository at this point in the history
  • Loading branch information
ravisingal authored Sep 24, 2024
1 parent 22b7b23 commit 0dfb06a
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 8 deletions.
14 changes: 10 additions & 4 deletions helm/templates/hypertrace-collector/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,14 +25,20 @@ spec:
prometheus.io/path: "/metrics"
prometheus.io/port: "8888"
prometheus.io/scrape: "true"
{{- with .Values.podAnnotations }}
{{- with .Values.podAnnotations }}
{{- toYaml . | nindent 8 }}
{{- end }}
{{- end }}
{{- with .Values.commonPodAnnotations }}
{{- toYaml . | nindent 8 }}
{{- end }}
labels:
release: {{ .Release.Name }}
{{- with .Values.podLabels }}
{{- with .Values.podLabels }}
{{- toYaml . | nindent 8 }}
{{- end }}
{{- end }}
{{- with .Values.commonPodLabels }}
{{- toYaml . | nindent 8 }}
{{- end }}
spec:
{{- with .Values.imagePullSecrets }}
imagePullSecrets:
Expand Down
14 changes: 10 additions & 4 deletions helm/templates/hypertrace-metrics-collector/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,14 +26,20 @@ spec:
prometheus.io/path: "/metrics"
prometheus.io/port: "8888"
prometheus.io/scrape: "true"
{{- with .Values.metrics.podAnnotations }}
{{- with .Values.metrics.podAnnotations }}
{{- toYaml . | nindent 8 }}
{{- end }}
{{- end }}
{{- with .Values.commonPodAnnotations }}
{{- toYaml . | nindent 8 }}
{{- end }}
labels:
release: {{ .Release.Name }}
{{- with .Values.metrics.podLabels }}
{{- with .Values.metrics.podLabels }}
{{- toYaml . | nindent 8 }}
{{- end }}
{{- end }}
{{- with .Values.commonPodLabels }}
{{- toYaml . | nindent 8 }}
{{- end }}
spec:
{{- with .Values.imagePullSecrets }}
imagePullSecrets:
Expand Down
6 changes: 6 additions & 0 deletions helm/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,10 @@ podLabels:

podAnnotations: {}

commonPodLabels: {}

commonPodAnnotations: {}

podSecurityContext:
runAsUser: 65532
fsGroup: 65532
Expand All @@ -117,6 +121,8 @@ affinity: {}

hostNetwork: false

imagePullSecrets: []

# The Deployment Selector match labels are different from the pod labels. Note that they should be a subset of the pod
# labels. You append new labels to them but cannot remove labels. If you remove or modify the labels you will need to
# delete the existing deployment bearing the same name and then redeploy. This is the reason why they are separated from
Expand Down

0 comments on commit 0dfb06a

Please sign in to comment.