|
24 | 24 | {{- range .Values.ContainerPort }}
|
25 | 25 | {{- if .servicemonitor }}
|
26 | 26 | {{- if .servicemonitor.enabled}}
|
27 |
| - {{- if .servicePort }} |
| 27 | + {{- if .servicemonitor.targetPort }} |
| 28 | + - targetPort: {{ .servicemonitor.targetPort }} |
| 29 | + {{- else if .servicePort }} |
28 | 30 | - port: {{ .name }}
|
| 31 | + {{- end }} |
| 32 | + {{- if .servicemonitor.path }} |
| 33 | + path: {{ .servicemonitor.path}} |
| 34 | + {{- end }} |
| 35 | + {{- if .servicemonitor.scheme }} |
| 36 | + scheme: {{ .servicemonitor.scheme}} |
| 37 | + {{- end }} |
| 38 | + {{- if .servicemonitor.interval }} |
| 39 | + interval: {{ .servicemonitor.interval}} |
| 40 | + {{- end }} |
| 41 | + {{- if .servicemonitor.scrapeTimeout }} |
| 42 | + scrapeTimeout: {{ .servicemonitor.scrapeTimeout}} |
| 43 | + {{- end }} |
| 44 | + {{- if .servicemonitor.basicAuth }} |
| 45 | + basicAuth: |
| 46 | + {{- toYaml .servicemonitor.basicAuth | nindent 8 }} |
| 47 | + {{- end }} |
| 48 | + {{- if .servicemonitor.insecureTLS }} |
| 49 | + tlsConfig: |
| 50 | + insecureSkipVerify: true |
| 51 | + {{- else if .servicemonitor.tlsConfig }} |
| 52 | + tlsConfig: |
| 53 | + {{- toYaml .servicemonitor.tlsConfig | nindent 8 }} |
| 54 | + {{- end }} |
| 55 | + {{- if .servicemonitor.metricRelabelings}} |
| 56 | + metricRelabelings: |
| 57 | +{{toYaml .servicemonitor.metricRelabelings | indent 8 }} |
| 58 | + {{- end }} |
| 59 | + {{- end }} |
| 60 | + {{- end }} |
| 61 | + {{- end }} |
| 62 | + {{- range .Values.containers }} |
| 63 | + {{- range .ports }} |
| 64 | + {{- if .servicemonitor }} |
| 65 | + {{- if .servicemonitor.enabled}} |
| 66 | + {{- if .servicemonitor.targetPort }} |
| 67 | + - targetPort: {{ .servicemonitor.targetPort }} |
| 68 | + {{- else if .servicePort }} |
| 69 | + - port: {{ .name }} |
| 70 | + {{- end }} |
29 | 71 | {{- if .servicemonitor.path }}
|
30 | 72 | path: {{ .servicemonitor.path}}
|
31 | 73 | {{- end }}
|
|
42 | 84 | basicAuth:
|
43 | 85 | {{- toYaml .servicemonitor.basicAuth | nindent 8 }}
|
44 | 86 | {{- end }}
|
| 87 | + {{- if .servicemonitor.insecureTLS }} |
| 88 | + tlsConfig: |
| 89 | + insecureSkipVerify: true |
| 90 | + {{- else if .servicemonitor.tlsConfig }} |
| 91 | + tlsConfig: |
| 92 | + {{- toYaml .servicemonitor.tlsConfig | nindent 8 }} |
| 93 | + {{- end }} |
45 | 94 | {{- if .servicemonitor.metricRelabelings}}
|
46 | 95 | metricRelabelings:
|
47 | 96 | {{toYaml .servicemonitor.metricRelabelings | indent 8 }}
|
|
0 commit comments