diff --git a/scripts/devtron-reference-helm-charts/statefulset-chart_5-1-0/templates/servicemonitor.yaml b/scripts/devtron-reference-helm-charts/statefulset-chart_5-1-0/templates/servicemonitor.yaml index 7368288e0c..276a50211e 100644 --- a/scripts/devtron-reference-helm-charts/statefulset-chart_5-1-0/templates/servicemonitor.yaml +++ b/scripts/devtron-reference-helm-charts/statefulset-chart_5-1-0/templates/servicemonitor.yaml @@ -24,8 +24,50 @@ spec: {{- range .Values.ContainerPort }} {{- if .servicemonitor }} {{- if .servicemonitor.enabled}} - {{- if .servicePort }} + {{- if .servicemonitor.targetPort }} + - targetPort: {{ .servicemonitor.targetPort }} + {{- else if .servicePort }} - port: {{ .name }} + {{- end }} + {{- if .servicemonitor.path }} + path: {{ .servicemonitor.path}} + {{- end }} + {{- if .servicemonitor.scheme }} + scheme: {{ .servicemonitor.scheme}} + {{- end }} + {{- if .servicemonitor.interval }} + interval: {{ .servicemonitor.interval}} + {{- end }} + {{- if .servicemonitor.scrapeTimeout }} + scrapeTimeout: {{ .servicemonitor.scrapeTimeout}} + {{- end }} + {{- if .servicemonitor.basicAuth }} + basicAuth: + {{- toYaml .servicemonitor.basicAuth | nindent 8 }} + {{- end }} + {{- if .servicemonitor.insecureTLS }} + tlsConfig: + insecureSkipVerify: true + {{- else if .servicemonitor.tlsConfig }} + tlsConfig: + {{- toYaml .servicemonitor.tlsConfig | nindent 8 }} + {{- end }} + {{- if .servicemonitor.metricRelabelings}} + metricRelabelings: +{{toYaml .servicemonitor.metricRelabelings | indent 8 }} + {{- end }} + {{- end }} + {{- end }} + {{- end }} + {{- range .Values.containers }} + {{- range .ports }} + {{- if .servicemonitor }} + {{- if .servicemonitor.enabled}} + {{- if .servicemonitor.targetPort }} + - targetPort: {{ .servicemonitor.targetPort }} + {{- else if .servicePort }} + - port: {{ .name }} + {{- end }} {{- if .servicemonitor.path }} path: {{ .servicemonitor.path}} {{- end }} @@ -42,6 +84,13 @@ spec: basicAuth: {{- toYaml .servicemonitor.basicAuth | nindent 8 }} {{- end }} + {{- if .servicemonitor.insecureTLS }} + tlsConfig: + insecureSkipVerify: true + {{- else if .servicemonitor.tlsConfig }} + tlsConfig: + {{- toYaml .servicemonitor.tlsConfig | nindent 8 }} + {{- end }} {{- if .servicemonitor.metricRelabelings}} metricRelabelings: {{toYaml .servicemonitor.metricRelabelings | indent 8 }}