fix(argo-cd): add namespace field for namespace scoped resources (#1937)
This commit is contained in:
parent
7eeb70f711
commit
88d690ef62
90 changed files with 92 additions and 27 deletions
|
|
@ -3,6 +3,7 @@ apiVersion: v1
|
|||
kind: Service
|
||||
metadata:
|
||||
name: {{ include "argo-cd.controller.fullname" . }}-metrics
|
||||
namespace: {{ .Release.Namespace | quote }}
|
||||
labels:
|
||||
{{- include "argo-cd.labels" (dict "context" . "component" .Values.controller.name "name" "metrics") | nindent 4 }}
|
||||
{{- with .Values.controller.metrics.service.labels }}
|
||||
|
|
|
|||
|
|
@ -5,6 +5,7 @@ metadata:
|
|||
labels:
|
||||
{{- include "argo-cd.labels" (dict "context" . "component" .Values.controller.name "name" .Values.controller.name) | nindent 4 }}
|
||||
name: {{ template "argo-cd.controller.fullname" . }}
|
||||
namespace: {{ .Release.Namespace | quote }}
|
||||
spec:
|
||||
ingress:
|
||||
- from:
|
||||
|
|
|
|||
|
|
@ -3,6 +3,7 @@ apiVersion: policy/v1
|
|||
kind: PodDisruptionBudget
|
||||
metadata:
|
||||
name: {{ include "argo-cd.controller.fullname" . }}
|
||||
namespace: {{ .Release.Namespace | quote }}
|
||||
labels:
|
||||
{{- include "argo-cd.labels" (dict "context" . "component" .Values.controller.name "name" .Values.controller.name) | nindent 4 }}
|
||||
{{- with .Values.controller.pdb.labels }}
|
||||
|
|
|
|||
|
|
@ -3,9 +3,7 @@ apiVersion: monitoring.coreos.com/v1
|
|||
kind: PrometheusRule
|
||||
metadata:
|
||||
name: {{ template "argo-cd.controller.fullname" . }}
|
||||
{{- if .Values.controller.metrics.rules.namespace }}
|
||||
namespace: {{ .Values.controller.metrics.rules.namespace }}
|
||||
{{- end }}
|
||||
namespace: {{ default .Release.Namespace .Values.controller.metrics.rules.namespace | quote }}
|
||||
labels:
|
||||
{{- include "argo-cd.labels" (dict "context" . "component" .Values.controller.name "name" .Values.controller.name) | nindent 4 }}
|
||||
{{- if .Values.controller.metrics.rules.selector }}
|
||||
|
|
|
|||
|
|
@ -2,6 +2,7 @@ apiVersion: rbac.authorization.k8s.io/v1
|
|||
kind: Role
|
||||
metadata:
|
||||
name: {{ template "argo-cd.controller.fullname" . }}
|
||||
namespace: {{ .Release.Namespace | quote }}
|
||||
labels:
|
||||
{{- include "argo-cd.labels" (dict "context" . "component" .Values.controller.name "name" .Values.controller.name) | nindent 4 }}
|
||||
rules:
|
||||
|
|
|
|||
|
|
@ -2,6 +2,7 @@ apiVersion: rbac.authorization.k8s.io/v1
|
|||
kind: RoleBinding
|
||||
metadata:
|
||||
name: {{ template "argo-cd.controller.fullname" . }}
|
||||
namespace: {{ .Release.Namespace | quote }}
|
||||
labels:
|
||||
{{- include "argo-cd.labels" (dict "context" . "component" .Values.controller.name "name" .Values.controller.name) | nindent 4 }}
|
||||
roleRef:
|
||||
|
|
|
|||
|
|
@ -4,6 +4,7 @@ kind: ServiceAccount
|
|||
automountServiceAccountToken: {{ .Values.controller.serviceAccount.automountServiceAccountToken }}
|
||||
metadata:
|
||||
name: {{ template "argo-cd.controllerServiceAccountName" . }}
|
||||
namespace: {{ .Release.Namespace | quote }}
|
||||
{{- if .Values.controller.serviceAccount.annotations }}
|
||||
annotations:
|
||||
{{- range $key, $value := .Values.controller.serviceAccount.annotations }}
|
||||
|
|
|
|||
|
|
@ -3,9 +3,7 @@ apiVersion: monitoring.coreos.com/v1
|
|||
kind: ServiceMonitor
|
||||
metadata:
|
||||
name: {{ template "argo-cd.controller.fullname" . }}
|
||||
{{- with .Values.controller.metrics.serviceMonitor.namespace }}
|
||||
namespace: {{ . }}
|
||||
{{- end }}
|
||||
namespace: {{ default .Release.Namespace .Values.controller.metrics.serviceMonitor.namespace | quote }}
|
||||
labels:
|
||||
{{- include "argo-cd.labels" (dict "context" . "component" .Values.controller.name "name" .Values.controller.name) | nindent 4 }}
|
||||
{{- with .Values.controller.metrics.serviceMonitor.selector }}
|
||||
|
|
|
|||
|
|
@ -8,6 +8,7 @@ metadata:
|
|||
{{- end }}
|
||||
{{- end }}
|
||||
name: {{ template "argo-cd.controller.fullname" . }}
|
||||
namespace: {{ .Release.Namespace | quote }}
|
||||
labels:
|
||||
{{- include "argo-cd.labels" (dict "context" . "component" .Values.controller.name "name" .Values.controller.name) | nindent 4 }}
|
||||
spec:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue