Skip to content

Commit e0831f1

Browse files
authored
add common labels, annotation and security context to pods (#243)
* add common labels, annotation and security context to pods * update gradle lock files
1 parent 2b75ee6 commit e0831f1

File tree

3 files changed

+24
-14
lines changed

3 files changed

+24
-14
lines changed

helm/Chart.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,4 +24,4 @@ version: 0.1.0
2424
dependencies:
2525
- name: config-bootstrapper
2626
repository: "https://storage.googleapis.com/hypertrace-helm-charts"
27-
version: 0.2.44
27+
version: 0.2.47

helm/templates/deployment.yaml

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -21,16 +21,16 @@ spec:
2121
metadata:
2222
labels:
2323
release: {{ .Release.Name }}
24-
{{- with .Values.podLabels }}
24+
{{- with merge .Values.podLabels .Values.commonPodLabels }}
2525
{{- toYaml . | nindent 8 }}
26-
{{- end }}
26+
{{- end }}
2727
annotations:
2828
checksum/config: {{ include (print $.Template.BasePath "/configmap.yaml") . | sha256sum }}
2929
prometheus.io/scrape: "true"
3030
prometheus.io/port: "{{ .Values.containerHealthProbePort }}"
31-
{{- with .Values.podAnnotations }}
31+
{{- with merge .Values.podAnnotations .Values.commonPodAnnotations }}
3232
{{- toYaml . | nindent 8 }}
33-
{{- end }}
33+
{{- end }}
3434
spec:
3535
{{- with .Values.imagePullSecrets }}
3636
imagePullSecrets:
@@ -59,7 +59,7 @@ spec:
5959
topologySpreadConstraints:
6060
{{- toYaml . | nindent 8}}
6161
{{- end }}
62-
{{- with .Values.securityContext }}
62+
{{- with .Values.podSecurityContext }}
6363
securityContext:
6464
{{- toYaml . | nindent 8 }}
6565
{{- end }}
@@ -115,4 +115,8 @@ spec:
115115
port: {{ .Values.containerHealthProbePort }}
116116
resources:
117117
{{- toYaml .Values.resources | nindent 12 }}
118+
{{- with .Values.containerSecurityContext }}
119+
securityContext:
120+
{{- toYaml . | nindent 12 }}
121+
{{- end -}}
118122
{{- end }}

helm/values.yaml

Lines changed: 14 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ image:
1111
pullPolicy: IfNotPresent
1212
tagOverride: ""
1313

14-
imagePullSecrets: { }
14+
imagePullSecrets: {}
1515

1616
containerPort: 9012
1717
containerHealthProbePort: 9013
@@ -21,15 +21,21 @@ service:
2121
type: ClusterIP
2222
port: 9012
2323

24-
nodeLabels: { }
24+
nodeLabels: {}
2525

26-
tolerations: [ ]
26+
tolerations: []
2727

28-
affinity: { }
28+
affinity: {}
2929

30-
topologySpreadConstraints: [ ]
30+
topologySpreadConstraints: []
3131

32-
securityContext: { }
32+
podSecurityContext: {}
33+
34+
containerSecurityContext: {}
35+
36+
commonPodLabels: {}
37+
38+
commonPodAnnotations: {}
3339

3440
javaOpts: "-XX:InitialRAMPercentage=50.0 -XX:MaxRAMPercentage=75.0 -XX:MaxDirectMemorySize=128M -XX:+ExitOnOutOfMemoryError"
3541

@@ -56,7 +62,7 @@ deploymentLabels:
5662
podLabels:
5763
app: attribute-service
5864

59-
podAnnotations: { }
65+
podAnnotations: {}
6066

6167
deploymentSelectorMatchLabels:
6268
app: attribute-service
@@ -93,7 +99,7 @@ logConfig:
9399
config-bootstrapper:
94100
job:
95101
prefix: attribute
96-
configurationCommands: { }
102+
configurationCommands: {}
97103

98104
hpa:
99105
enabled: false

0 commit comments

Comments
 (0)