@@ -6,6 +6,10 @@ metadata:
66 labels :
77 {{- include "chorus.labels" . | nindent 4 }}
88 app.kubernetes.io/component : proxy
9+ {{- with (include "chorus.annotations" (list dict .)) }}
10+ annotations :
11+ {{- . | nindent 4 }}
12+ {{- end }}
913spec :
1014 replicas : {{ .Values.proxy.replicas }}
1115 selector :
@@ -17,18 +21,21 @@ spec:
1721 labels :
1822 {{- include "chorus.selectorLabels" . | nindent 8 }}
1923 app.kubernetes.io/component : proxy
24+ {{- with (include "chorus.podLabels" (list .Values.proxy.podLabels .)) }}
25+ {{- . | nindent 8 }}
26+ {{- end }}
2027 annotations :
2128 checksum/config : {{ include (print $.Template.BasePath "/proxy/config.yaml") . | sha256sum }}
2229 {{- if include "chorus.createCredentialsSecret" . }}
2330 checksum/secret : {{ include (print $.Template.BasePath "/secrets/secret.yaml") . | sha256sum }}
2431 {{- end }}
25- {{- if .Values.proxy.config. metrics.enabled }}
32+ {{- if .Values.metrics.enabled }}
2633 prometheus.io/scrape : " true"
2734 prometheus.io/path : " /metrics"
28- prometheus.io/port : " 9090 "
35+ prometheus.io/port : {{ include "chorus.metricsPort" . | quote }}
2936 {{- end }}
30- {{- with . Values.proxy.podAnnotations }}
31- {{- toYaml . | nindent 8 }}
37+ {{- with (include "chorus.annotations" (list . Values.proxy.podAnnotations .)) }}
38+ {{- . | nindent 8 }}
3239 {{- end }}
3340 spec :
3441 {{- with .Values.imagePullSecrets }}
6168 - name : CFG_REDIS_SENTINEL_MASTERNAME
6269 value : {{ .Values.externalRedis.sentinel.masterName | quote }}
6370 {{- end }}
71+ {{- if .Values.metrics.enabled }}
72+ - name : CFG_METRICS_ENABLED
73+ value : " true"
74+ - name : CFG_METRICS_PORT
75+ value : {{ include "chorus.metricsPort" . | quote }}
76+ {{- end }}
6477 {{- if .Values.dynamicCredentials.enabled }}
6578 - name : CFG_STORAGE_DYNAMICCREDENTIALS_MASTERPASSWORD
6679 valueFrom :
7285 - name : http
7386 containerPort : {{ .Values.proxy.config.port }}
7487 protocol : TCP
75- {{- if .Values.proxy.config. metrics.enabled }}
88+ {{- if .Values.metrics.enabled }}
7689 - name : metrics
77- containerPort : 9090
90+ containerPort : {{ include "chorus.metricsPort" . }}
7891 protocol : TCP
7992 {{- end }}
8093 livenessProbe :
0 commit comments