Skip to content

Commit a109b8b

Browse files
kamal-devtronpawan-mehta-dtprakarsh-dt
authored
fix: changes in labels of ref chart 4.20 (#6178)
* changes in labels of ref chart 4.20 * changes in labels of ref chart 4.20 * cherry pick fixes * changes in charts --------- Co-authored-by: Pawan Mehta <117346502+pawan-mehta-dt@users.noreply.github.com> Co-authored-by: Prakarsh <71125043+prakarsh-dt@users.noreply.github.com>
1 parent 61beb25 commit a109b8b

File tree

15 files changed

+72
-54
lines changed

15 files changed

+72
-54
lines changed

scripts/devtron-reference-helm-charts/deployment-chart_4-20-0/templates/deployment.yaml

Lines changed: 16 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -56,9 +56,10 @@ spec:
5656
matchLabels:
5757
{{- if .Values.customMatchLabels }}
5858
{{ toYaml .Values.customMatchLabels | indent 6 }}
59-
{{- end }}
59+
{{- else }}
6060
app: {{ template ".Chart.Name .name" $ }}
6161
release: {{ $.Release.Name }}
62+
{{- end }}
6263
replicas: {{ $.Values.replicaCount }}
6364
minReadySeconds: {{ $.Values.MinReadySeconds }}
6465
template:
@@ -70,19 +71,20 @@ spec:
7071
{{- end }}
7172
{{- end }}
7273
labels:
73-
app: {{ template ".Chart.Name .name" $ }}
7474
appId: {{ $.Values.app | quote }}
7575
envId: {{ $.Values.env | quote }}
76-
release: {{ $.Release.Name }}
77-
{{- if .Values.customPodLabels }}
78-
{{ toYaml .Values.customPodLabels | indent 8 }}
79-
{{- end }}
80-
{{- if .Values.appLabels }}
76+
{{- if .Values.appLabels }}
8177
{{ toYaml .Values.appLabels | indent 8 }}
82-
{{- end }}
78+
{{- end }}
79+
{{- if .Values.customPodLabels }}
80+
{{ toYaml .Values.customPodLabels | indent 8 }}
81+
{{- else }}
82+
app: {{ template ".Chart.Name .name" $ }}
83+
release: {{ $.Release.Name }}
8384
{{- if .Values.podLabels }}
8485
{{ toYaml .Values.podLabels | indent 8 }}
8586
{{- end }}
87+
{{- end }}
8688
spec:
8789
{{- if $.Values.podExtraSpecs }}
8890
{{ toYaml .Values.podExtraSpecs | indent 6 }}
@@ -237,7 +239,7 @@ spec:
237239
{{- range $.Values.ContainerPort }}
238240
- name: {{ .name}}
239241
containerPort: {{ .port }}
240-
protocol: {{ .protocol }}
242+
protocol: {{ .protocol | default "TCP" }}
241243
{{- end}}
242244
{{- if and $.Values.command.enabled $.Values.command.workingDir }}
243245
workingDir: {{ $.Values.command.workingDir }}
@@ -620,8 +622,8 @@ spec:
620622
{{- end }}
621623
{{- end }}
622624
{{- end }}
623-
{{- if and (eq (len .Values.volumes) 0) (eq ($hasPVCExists) false) (or (eq (.Values.ConfigSecrets.enabled) true) (eq (.Values.ConfigMaps.enabled) true)) (eq ($hasCMVolumeExists) false) (eq ($hasSecretVolumeExists) false) }} []{{- end }}
624-
{{- if and (eq (len .Values.volumeMounts) 0) (eq ($hasPVCExists) false) (eq (.Values.ConfigSecrets.enabled) false) (eq (.Values.ConfigMaps.enabled) false) }} [] {{- end }}
625+
{{- if and (eq (len .Values.volumes) 0) (eq ($hasPVCExists) false) (or (eq (.Values.ConfigSecrets.enabled) true) (eq (.Values.ConfigMaps.enabled) true)) (eq ($hasCMVolumeExists) false) (eq ($hasSecretVolumeExists) false) (eq (.Values.appMetrics) false) }} []{{- end }}
626+
{{- if and (eq (len .Values.volumes) 0) (eq ($hasPVCExists) false) (eq (.Values.ConfigSecrets.enabled) false) (eq (.Values.ConfigMaps.enabled) false) (eq (.Values.appMetrics) false) }} [] {{- end }}
625627

626628
revisionHistoryLimit: 3
627629
## pauseForSecondsBeforeSwitchActive: {{ $.Values.pauseForSecondsBeforeSwitchActive }}
@@ -847,7 +849,7 @@ spec:
847849
{{- range $.Values.ContainerPort }}
848850
- name: {{ .name}}
849851
containerPort: {{ .port }}
850-
protocol: {{ .protocol }}
852+
protocol: {{ .protocol | default "TCP" }}
851853
{{- end}}
852854
{{- if and $.Values.command.enabled $.Values.command.workingDir }}
853855
workingDir: {{ $.Values.command.workingDir }}
@@ -1230,8 +1232,8 @@ spec:
12301232
{{- end }}
12311233
{{- end }}
12321234
{{- end }}
1233-
{{- if and (eq (len .Values.volumes) 0) (eq ($hasPVCExists) false) (or (eq (.Values.ConfigSecrets.enabled) true) (eq (.Values.ConfigMaps.enabled) true)) (eq ($hasCMVolumeExists) false) (eq ($hasSecretVolumeExists) false) }} []{{- end }}
1234-
{{- if and (eq (len .Values.volumeMounts) 0) (eq ($hasPVCExists) false) (eq (.Values.ConfigSecrets.enabled) false) (eq (.Values.ConfigMaps.enabled) false) }} [] {{- end }}
1235+
{{- if and (eq (len .Values.volumes) 0) (eq ($hasPVCExists) false) (or (eq (.Values.ConfigSecrets.enabled) true) (eq (.Values.ConfigMaps.enabled) true)) (eq ($hasCMVolumeExists) false) (eq ($hasSecretVolumeExists) false) (eq (.Values.appMetrics) false) }} []{{- end }}
1236+
{{- if and (eq (len .Values.volumes) 0) (eq ($hasPVCExists) false) (eq (.Values.ConfigSecrets.enabled) false) (eq (.Values.ConfigMaps.enabled) false) (eq (.Values.appMetrics) false)}} [] {{- end }}
12351237

12361238
revisionHistoryLimit: 3
12371239
## pauseForSecondsBeforeSwitchActive: {{ $.Values.pauseForSecondsBeforeSwitchActive }}

scripts/devtron-reference-helm-charts/deployment-chart_4-20-0/templates/poddisruptionbudget.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,9 @@ metadata:
1717
envId: {{ $.Values.env | quote }}
1818
chart: {{ template ".Chart.Name .chart" $ }}
1919
release: {{ $.Release.Name }}
20+
{{- if .Values.appLabels }}
21+
{{ toYaml .Values.appLabels | indent 4 }}
22+
{{- end }}
2023
spec:
2124
{{- if .Values.podDisruptionBudget.minAvailable }}
2225
minAvailable: {{ .Values.podDisruptionBudget.minAvailable }}

scripts/devtron-reference-helm-charts/deployment-chart_4-20-0/templates/service.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ spec:
3636
{{- else }}
3737
targetPort: {{ .name }}
3838
{{- end }}
39-
protocol: {{ .protocol }}
39+
protocol: {{ .protocol | default "TCP" }}
4040
{{- if (and (eq $.Values.service.type "NodePort") .nodePort ) }}
4141
nodePort: {{ .nodePort }}
4242
{{- end }}

scripts/devtron-reference-helm-charts/deployment-chart_4-20-0/templates/servicemonitor.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,9 @@ metadata:
1919
{{- if .Values.servicemonitor.additionalLabels }}
2020
{{ toYaml .Values.servicemonitor.additionalLabels | indent 4 }}
2121
{{- end }}
22+
{{- if .Values.appLabels }}
23+
{{ toYaml .Values.appLabels | indent 4 }}
24+
{{- end }}
2225
spec:
2326
endpoints:
2427
{{- range .Values.ContainerPort }}

scripts/devtron-reference-helm-charts/deployment-chart_4-20-0/templates/vertical-pod-autoscaler.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,9 @@ metadata:
1111
envId: {{ $.Values.env | quote }}
1212
chart: {{ template ".Chart.Name .chart" . }}
1313
release: {{ .Values.prometheus.release }}
14+
{{- if .Values.appLabels }}
15+
{{ toYaml .Values.appLabels | indent 4 }}
16+
{{- end }}
1417
spec:
1518
{{- if .Values.verticalPodScaling.resourcePolicy }}
1619
resourcePolicy:

scripts/devtron-reference-helm-charts/deployment-chart_4-20-0/values.yaml

Lines changed: 5 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -556,18 +556,10 @@ ConfigMaps:
556556

557557

558558
ConfigSecrets:
559-
enabled: true
560-
secrets:
561-
- name: config-secret-1
562-
type: volume
563-
filePermission: "420"
564-
externalType: ESO_GoogleSecretsManager
565-
mountPath: /etc/config/2
566-
esoSecretData:
567-
esoData:
568-
- key": kushagra-test
569-
property: test1
570-
secretKey: SECRET_KUSHAGRA
559+
enabled: false
560+
secrets: []
561+
enabled: false
562+
secrets: []
571563
# data:
572564
# key1: key1value-1
573565
# key2: key2value-1
@@ -593,19 +585,9 @@ initContainers: []
593585
# # This will assign your application's docker image to init container.
594586
# reuseContainerImage: true
595587

596-
containers:
588+
containers: []
597589
## Additional init containers to run before the Scheduler pods.
598590
## for example, be used to run a sidecar that chown Logs storage .
599-
- name: volume-mount-hack
600-
image: busybox
601-
command: ["sh", "-c", "chown -R 1000:1000 logs"]
602-
volumeMounts:
603-
- mountPath: /usr/local/airflow/logs
604-
name: logs-data
605-
envFrom:
606-
- configMapRef:
607-
name: kamal
608-
609591

610592
rawYaml: []
611593
# - apiVersion: v1

scripts/devtron-reference-helm-charts/reference-chart_4-20-0/templates/deployment.yaml

Lines changed: 23 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -53,8 +53,12 @@ metadata:
5353
spec:
5454
selector:
5555
matchLabels:
56+
{{- if .Values.customMatchLabels }}
57+
{{ toYaml .Values.customMatchLabels | indent 6 }}
58+
{{- else }}
5659
app: {{ template ".Chart.Name .name" $ }}
5760
release: {{ $.Release.Name }}
61+
{{- end }}
5862
replicas: {{ $.Values.replicaCount }}
5963
minReadySeconds: {{ $.Values.MinReadySeconds }}
6064
template:
@@ -66,19 +70,20 @@ spec:
6670
{{- end }}
6771
{{- end }}
6872
labels:
69-
app: {{ template ".Chart.Name .name" $ }}
7073
appId: {{ $.Values.app | quote }}
7174
envId: {{ $.Values.env | quote }}
72-
release: {{ $.Release.Name }}
73-
{{- if .Values.customPodLabels }}
74-
{{ toYaml .Values.customPodLabels | indent 8 }}
75-
{{- end }}
76-
{{- if .Values.appLabels }}
75+
{{- if .Values.appLabels }}
7776
{{ toYaml .Values.appLabels | indent 8 }}
78-
{{- end }}
77+
{{- end }}
78+
{{- if .Values.customPodLabels }}
79+
{{ toYaml .Values.customPodLabels | indent 8 }}
80+
{{- else }}
81+
app: {{ template ".Chart.Name .name" $ }}
82+
release: {{ $.Release.Name }}
7983
{{- if .Values.podLabels }}
8084
{{ toYaml .Values.podLabels | indent 8 }}
8185
{{- end }}
86+
{{- end }}
8287
spec:
8388
{{- if $.Values.podExtraSpecs }}
8489
{{ toYaml .Values.podExtraSpecs | indent 6 }}
@@ -218,7 +223,7 @@ spec:
218223
{{- range $.Values.ContainerPort }}
219224
- name: {{ .name}}
220225
containerPort: {{ .port }}
221-
protocol: {{ .protocol }}
226+
protocol: {{ .protocol | default "TCP" }}
222227
{{- end}}
223228
{{- if and $.Values.command.enabled $.Values.command.workingDir }}
224229
workingDir: {{ $.Values.command.workingDir }}
@@ -490,13 +495,13 @@ spec:
490495
args: ["-c", "/etc/envoy-config/envoy-config.json", "-l", "info", "--log-format", "[METADATA][%Y-%m-%d %T.%e][%t][%l][%n] %v"]
491496
volumeMounts:
492497
- name: {{ $.Values.envoyproxy.configMapName | default "envoy-config-volume" }}
493-
mountPath: /etc/envoy-config/envoy-config-volume
498+
mountPath: /etc/envoy-config/
494499
{{- if $.Values.envoyproxy.readinessProbe}}
495500
readinessProbe:
496501
{{ toYaml $.Values.envoyproxy.readinessProbe | indent 12}}
497502
{{- end }}
498503
{{- if $.Values.envoyproxy.livenessProbe}}
499-
readinessProbe:
504+
livenessProbe:
500505
{{ toYaml $.Values.envoyproxy.livenessProbe | indent 12}}
501506
{{- end }}
502507
{{- end}}
@@ -506,6 +511,14 @@ spec:
506511
- name: {{ $.Chart.Name }}-sidecontainer-{{ add1 $i }}
507512
image: "{{ $.Values.server.deployment.image }}:{{ $.Values.server.deployment.image_tag }}"
508513
imagePullPolicy: {{ $.Values.image.pullPolicy }}
514+
{{- if .env }}
515+
env:
516+
{{ toYaml .env | indent 12 }}
517+
{{- end }}
518+
{{- if .envFrom }}
519+
envFrom:
520+
{{ toYaml .env | indent 12 }}
521+
{{- end }}
509522
{{- if .securityContext }}
510523
securityContext:
511524
{{ toYaml .securityContext | indent 12 }}

scripts/devtron-reference-helm-charts/reference-chart_4-20-0/templates/keda-autoscaling.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ metadata:
1313
release: {{ $.Release.Name }}
1414
appId: {{ $.Values.app | quote }}
1515
envId: {{ $.Values.env | quote }}
16-
release: {{ .Release.Name }}
16+
release: {{ .Release.Name }}
1717
{{- if .Values.appLabels }}
1818
{{ toYaml .Values.appLabels | indent 4 }}
1919
{{- end }}

scripts/devtron-reference-helm-charts/reference-chart_4-20-0/templates/poddisruptionbudget.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,9 @@ metadata:
1717
envId: {{ $.Values.env | quote }}
1818
chart: {{ template ".Chart.Name .chart" $ }}
1919
release: {{ $.Release.Name }}
20+
{{- if .Values.appLabels }}
21+
{{ toYaml .Values.appLabels | indent 4 }}
22+
{{- end }}
2023
spec:
2124
{{- if .Values.podDisruptionBudget.minAvailable }}
2225
minAvailable: {{ .Values.podDisruptionBudget.minAvailable }}

scripts/devtron-reference-helm-charts/reference-chart_4-20-0/templates/service.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ spec:
3939
{{- if (and (eq $.Values.service.type "NodePort") .nodePort )}}
4040
nodePort: {{ .nodePort }}
4141
{{- end }}
42-
protocol: {{ .protocol }}
42+
protocol: {{ .protocol | default "TCP" }}
4343
name: {{ .name }}
4444
{{- end }}
4545
{{- if $.Values.appMetrics }}

scripts/devtron-reference-helm-charts/reference-chart_4-20-0/templates/servicemonitor.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,9 @@ metadata:
1919
{{- if .Values.servicemonitor.additionalLabels }}
2020
{{ toYaml .Values.servicemonitor.additionalLabels | indent 4 }}
2121
{{- end }}
22+
{{- if .Values.appLabels }}
23+
{{ toYaml .Values.appLabels | indent 4 }}
24+
{{- end }}
2225
spec:
2326
endpoints:
2427
{{- range .Values.ContainerPort }}

scripts/devtron-reference-helm-charts/reference-chart_4-20-0/templates/vertical-pod-autoscaler.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,9 @@ metadata:
1111
envId: {{ $.Values.env | quote }}
1212
chart: {{ template ".Chart.Name .chart" . }}
1313
release: {{ .Values.prometheus.release }}
14+
{{- if .Values.appLabels }}
15+
{{ toYaml .Values.appLabels | indent 4 }}
16+
{{- end }}
1417
spec:
1518
{{- if .Values.verticalPodScaling.resourcePolicy }}
1619
resourcePolicy:

scripts/devtron-reference-helm-charts/statefulset-chart_5-1-0/templates/service.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ spec:
4343
{{- if (and (eq $.Values.service.type "NodePort") .nodePort )}}
4444
nodePort: {{ .nodePort }}
4545
{{- end }}
46-
protocol: {{ .protocol }}
46+
protocol: {{ .protocol | default "TCP" }}
4747
name: {{ .name }}
4848
{{- end }}
4949
{{- if $.Values.appMetrics }}

scripts/devtron-reference-helm-charts/statefulset-chart_5-1-0/templates/statefulset.yaml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,9 @@ spec:
8585
labels:
8686
{{- if .Values.customPodLabels }}
8787
{{ toYaml .Values.customPodLabels | indent 8 }}
88+
{{- if .Values.appLabels }}
89+
{{ toYaml .Values.appLabels | indent 8 }}
90+
{{- end }}
8891
{{- else }}
8992
app: {{ template ".Chart.Name .name" $ }}
9093
appId: {{ $.Values.app | quote }}
@@ -307,7 +310,7 @@ spec:
307310
{{- range $.Values.ContainerPort }}
308311
- name: {{ .name}}
309312
containerPort: {{ .port }}
310-
protocol: {{ .protocol }}
313+
protocol: {{ .protocol | default "TCP" }}
311314
{{- end}}
312315
{{- if and $.Values.command.enabled $.Values.command.workingDir }}
313316
workingDir: {{ $.Values.command.workingDir }}

scripts/devtron-reference-helm-charts/statefulset-chart_5-1-0/values.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,7 @@ EnvVariables:
156156
value: qa
157157

158158
LivenessProbe:
159-
Path: /
159+
Path: ""
160160
port: 8080
161161
initialDelaySeconds: 20
162162
periodSeconds: 10
@@ -168,7 +168,7 @@ LivenessProbe:
168168
# value: abc
169169

170170
ReadinessProbe:
171-
Path: /
171+
Path: ""
172172
port: 8080
173173
initialDelaySeconds: 20
174174
periodSeconds: 10

0 commit comments

Comments
 (0)