aboutsummaryrefslogtreecommitdiffstats
path: root/kubernetes/common/common/templates/_service.tpl
diff options
context:
space:
mode:
authorSuresh Charan <suresh.charan@amdocs.com>2022-01-13 06:56:53 -0500
committerSylvain Desbureaux <sylvain.desbureaux@orange.com>2022-01-24 12:31:54 +0000
commite1a70a1dee9580332eed035e2b9ea7a532a962e2 (patch)
treec1665b08fea483f7eb44a2d1da1345f3b332dca9 /kubernetes/common/common/templates/_service.tpl
parentc530a5de5a8736e5492d3977656b925da5f05c4a (diff)
[COMMON] Export cassandra key metrics
- Add service monitor template - Add metrics container to Cassandra statefulset - Update values.yaml to add metrics and servicemonitor config - Modify service template to add metrics port configuration Issue-ID: OOM-2914 Signed-off-by: Suresh Charan <suresh.charan@amdocs.com> Change-Id: Ia47daea337a414c91367a08ecc043bb3bd9ba697
Diffstat (limited to 'kubernetes/common/common/templates/_service.tpl')
-rw-r--r--kubernetes/common/common/templates/_service.tpl5
1 files changed, 5 insertions, 0 deletions
diff --git a/kubernetes/common/common/templates/_service.tpl b/kubernetes/common/common/templates/_service.tpl
index a488e0d5fa..f6a0f211a9 100644
--- a/kubernetes/common/common/templates/_service.tpl
+++ b/kubernetes/common/common/templates/_service.tpl
@@ -267,6 +267,11 @@ spec:
{{- $ports := $dot.Values.service.headlessPorts -}}
{{- $labels := default (dict) .labels -}}
{{- $matchLabels := default (dict) .matchLabels -}}
+{{- if ($dot.Values.metrics) }}
+{{- range $index, $metricPort := $dot.Values.metrics.ports }}
+{{- $ports = append $ports $metricPort }}
+{{- end }}
+{{- end }}
{{ include "common.genericService" (dict "suffix" $suffix "annotations" $annotations "dot" $dot "publishNotReadyAddresses" $publishNotReadyAddresses "ports" $ports "serviceType" "ClusterIP" "headless" true "labels" $labels "matchLabels" $matchLabels) }}
{{- end -}}