
Reason: `helm template` doesn't add the namespace field automatically * fix(argo-workflows): Add namespace field to all namespace scoped resources because `helm template` doesn't add the namespace filed automatically Signed-off-by: yu-croco <yu.croco@gmail.com> * chore(argo-workflows): bump minor version Signed-off-by: yu-croco <yu.croco@gmail.com> * refactor(argo-workflows): reflect review points Signed-off-by: yu-croco <yu.croco@gmail.com>
30 lines
1.2 KiB
YAML
30 lines
1.2 KiB
YAML
{{- if and (or .Values.controller.metricsConfig.enabled .Values.controller.telemetryConfig.enabled) .Values.controller.serviceMonitor.enabled }}
|
|
apiVersion: monitoring.coreos.com/v1
|
|
kind: ServiceMonitor
|
|
metadata:
|
|
name: {{ template "argo-workflows.controller.fullname" . }}
|
|
namespace: {{ default .Release.Namespace .Values.controller.serviceMonitor.namespace | quote }}
|
|
labels:
|
|
{{- include "argo-workflows.labels" (dict "context" . "component" .Values.controller.name "name" .Values.controller.name) | nindent 4 }}
|
|
{{- with .Values.controller.serviceMonitor.additionalLabels }}
|
|
{{- toYaml . | nindent 4 }}
|
|
{{- end }}
|
|
spec:
|
|
endpoints:
|
|
{{- if .Values.controller.metricsConfig.enabled }}
|
|
- port: metrics
|
|
path: {{ .Values.controller.metricsConfig.path }}
|
|
interval: 30s
|
|
{{- end }}
|
|
{{- if .Values.controller.telemetryConfig.enabled }}
|
|
- port: telemetry
|
|
path: {{ .Values.controller.telemetryConfig.path }}
|
|
interval: 30s
|
|
{{- end }}
|
|
namespaceSelector:
|
|
matchNames:
|
|
- {{ .Release.Namespace | quote }}
|
|
selector:
|
|
matchLabels:
|
|
{{- include "argo-workflows.selectorLabels" (dict "context" . "name" .Values.controller.name) | nindent 6 }}
|
|
{{- end }}
|