Skip to content

Commit 99380b8

Browse files
matchLabel
1 parent af854c4 commit 99380b8

File tree

3 files changed

+11
-8
lines changed

3 files changed

+11
-8
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ spec:
2626
{{- if $.Values.prometheusRule.name }}
2727
- name: {{ $.Values.prometheusRule.name }}
2828
{{- else }}
29-
- name: {{ template ".Chart.Name .fullname" . }}
29+
- name: {{ template ".Chart.Name .fullname" $ }}
3030
{{- end }}
3131
rules: {{- toYaml . | nindent 6 }}
3232
{{- end }}

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

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,15 +45,19 @@ metadata:
4545
{{- if .Values.appLabels }}
4646
{{ toYaml .Values.appLabels | indent 4}}
4747
{{- end }}
48-
{{- if .Values.statefulSetConfig.annotations }}
48+
{{- if .Values.statefulSetConfig.annotations }}
4949
annotations:
5050
{{ toYaml .Values.statefulSetConfig.annotations | indent 4 }}
5151
{{- end }}
5252
spec:
5353
selector:
5454
matchLabels:
55+
{{- if .Values.statefulSetConfig.matchLabels }}
56+
{{ toYaml .Values.statefulSetConfig.matchLabels | indent 6 }}
57+
{{- else }}
5558
app: {{ template ".Chart.Name .name" $ }}
5659
release: {{ $.Release.Name }}
60+
{{- end }}
5761
replicas: {{ $.Values.replicaCount }}
5862
minReadySeconds: {{ $.Values.MinReadySeconds }}
5963
{{- if or .Values.service.enabled .Values.serviceheadless.enabled }}

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

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,9 @@ kedaAutoscaling:
66
ambassadorMapping:
77
enabled: true
88
istio:
9-
enable: true
9+
enabled: true
1010
gateway:
1111
enabled: true
12-
virtualService:
13-
enabled: true
1412
appLabels:
1513
test: thyjhgfv
1614
containerSpec:
@@ -138,6 +136,9 @@ EnvVariablesFromCongigMapKeys:
138136
nodeName: "testiing"
139137

140138
statefulSetConfig:
139+
matchLabels:
140+
app: devtron
141+
141142
serviceheadless:
142143
enabled: false
143144
name: test-service_headless
@@ -265,7 +266,6 @@ servicemonitor:
265266

266267

267268
prometheusRule:
268-
name: ""
269269
enabled: true
270270
additionalLabels: {}
271271
namespace: ""
@@ -474,7 +474,6 @@ ConfigMaps:
474474
# mountPath: /etc/config/4
475475
# data: []
476476

477-
478477
ConfigSecrets:
479478
enabled: true
480479
secrets:
@@ -678,4 +677,4 @@ privileged: true
678677
hostAliases: []
679678
# - ip: "127.0.0.1"
680679
# hostnames:
681-
# - "foo.local"
680+
# - "foo.local"

0 commit comments

Comments
 (0)