fix(argo-events): add namespace field for namespace scoped resources (#1959)
* fix(argo-events): add namespace field for namespace scoped resources Signed-off-by: yu-croco <yu.croco@gmail.com> * Apply suggestion from code review Signed-off-by: Marco Kilchhofer <mkilchhofer@users.noreply.github.com> --------- Signed-off-by: Marco Kilchhofer <mkilchhofer@users.noreply.github.com> Co-authored-by: Marco Kilchhofer <mkilchhofer@users.noreply.github.com>
This commit is contained in:
parent
406e07b46b
commit
076cf82ddd
13 changed files with 18 additions and 8 deletions
|
|
@ -3,9 +3,7 @@ apiVersion: monitoring.coreos.com/v1
|
|||
kind: ServiceMonitor
|
||||
metadata:
|
||||
name: {{ template "argo-events.controller.fullname" . }}
|
||||
{{- with .Values.controller.metrics.serviceMonitor.namespace }}
|
||||
namespace: {{ . }}
|
||||
{{- end }}
|
||||
namespace: {{ default .Release.Namespace .Values.controller.metrics.serviceMonitor.namespace | quote }}
|
||||
labels:
|
||||
{{- include "argo-events.labels" (dict "context" . "component" .Values.controller.name "name" .Values.controller.name) | nindent 4 }}
|
||||
{{- with .Values.controller.metrics.serviceMonitor.selector }}
|
||||
|
|
@ -31,7 +29,7 @@ spec:
|
|||
{{- end }}
|
||||
namespaceSelector:
|
||||
matchNames:
|
||||
- {{ .Release.Namespace }}
|
||||
- {{ .Release.Namespace | quote }}
|
||||
selector:
|
||||
matchLabels:
|
||||
{{- include "argo-events.selectorLabels" (dict "context" . "component" .Values.controller.name "name" (printf "%s-metrics" .Values.controller.name)) | nindent 6 }}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue