feat(argo-cd): Adding applicationSet.enable and notifications.enable (#1181)

* feat(argo-cd) Adding applicationSet.enable and notifications.enable to allow to disable them

Signed-off-by: Eric Durand <eric_p_durand@yahoo.com>

* Fixing Chart version and redudant ifs

Signed-off-by: Eric Durand eric_p_durand@yahoo.com
Signed-off-by: Eric Durand <eric_p_durand@yahoo.com>

* Detail the change

Signed-off-by: Eric Durand <eric_p_durand@yahoo.com>

* Drop one more redundant if

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:
ericpdurand 2022-03-18 17:41:56 +01:00 committed by GitHub
parent 48bf6d4a38
commit 3a2858aa98
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
19 changed files with 34 additions and 10 deletions

View file

@ -1,3 +1,4 @@
{{- if .Values.applicationSet.enabled }}
apiVersion: apps/v1
kind: Deployment
metadata:
@ -124,3 +125,4 @@ spec:
{{- with .Values.applicationSet.priorityClassName }}
priorityClassName: {{ . }}
{{- end }}
{{- end }}

View file

@ -1,4 +1,4 @@
{{- if .Values.applicationSet.metrics.enabled }}
{{- if and .Values.applicationSet.enabled .Values.applicationSet.metrics.enabled }}
apiVersion: v1
kind: Service
metadata:

View file

@ -1,3 +1,4 @@
{{- if .Values.applicationSet.enabled }}
apiVersion: rbac.authorization.k8s.io/v1
kind: Role
metadata:
@ -81,3 +82,4 @@ rules:
- patch
- update
- watch
{{- end }}

View file

@ -1,3 +1,4 @@
{{- if .Values.applicationSet.enabled }}
apiVersion: rbac.authorization.k8s.io/v1
kind: RoleBinding
metadata:
@ -12,3 +13,4 @@ subjects:
- kind: ServiceAccount
name: {{ template "argo-cd.applicationSetServiceAccountName" . }}
namespace: {{ .Release.Namespace }}
{{- end }}

View file

@ -1,3 +1,4 @@
{{- if .Values.applicationSet.enabled }}
apiVersion: v1
kind: Service
metadata:
@ -17,3 +18,4 @@ spec:
targetPort: {{ .Values.applicationSet.containerPort }}
selector:
{{- include "argo-cd.selectorLabels" (dict "context" . "name" .Values.applicationSet.name) | nindent 4 }}
{{- end }}

View file

@ -1,4 +1,4 @@
{{- if .Values.applicationSet.serviceAccount.create }}
{{- if and .Values.applicationSet.enabled .Values.applicationSet.serviceAccount.create }}
apiVersion: v1
kind: ServiceAccount
automountServiceAccountToken: {{ .Values.applicationSet.serviceAccount.automountServiceAccountToken }}

View file

@ -1,3 +1,4 @@
{{- if .Values.applicationSet.enabled }}
{{- if and .Values.applicationSet.metrics.enabled .Values.applicationSet.metrics.serviceMonitor.enabled }}
apiVersion: monitoring.coreos.com/v1
kind: ServiceMonitor
@ -36,3 +37,4 @@ spec:
matchLabels:
{{- include "argo-cd.selectorLabels" (dict "context" . "component" .Values.applicationSet.name "name" "metrics") | nindent 6 }}
{{- end }}
{{- end }}

View file

@ -1,4 +1,4 @@
{{- if .Values.applicationSet.webhook.ingress.enabled -}}
{{- if and .Values.applicationSet.enabled .Values.applicationSet.webhook.ingress.enabled -}}
{{- $serviceName := include "argo-cd.applicationSet.fullname" . -}}
{{- $servicePort := .Values.applicationSet.service.portName -}}
{{- $paths := .Values.applicationSet.webhook.ingress.paths -}}

View file

@ -1,4 +1,4 @@
{{ if .Values.notifications.cm.create }}
{{- if and .Values.notifications.enabled .Values.notifications.cm.create }}
apiVersion: v1
kind: ConfigMap
metadata:

View file

@ -1,3 +1,4 @@
{{- if .Values.notifications.enabled }}
apiVersion: apps/v1
kind: Deployment
metadata:
@ -104,3 +105,4 @@ spec:
tolerations:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- end }}

View file

@ -1,3 +1,4 @@
{{- if .Values.notifications.enabled }}
apiVersion: rbac.authorization.k8s.io/v1
kind: Role
metadata:
@ -40,3 +41,4 @@ rules:
- secrets
verbs:
- get
{{- end }}

View file

@ -1,3 +1,4 @@
{{- if .Values.notifications.enabled }}
apiVersion: rbac.authorization.k8s.io/v1
kind: RoleBinding
metadata:
@ -12,3 +13,4 @@ subjects:
- kind: ServiceAccount
name: {{ template "argo-cd.notificationsServiceAccountName" . }}
namespace: {{ .Release.Namespace }}
{{- end }}

View file

@ -1,4 +1,4 @@
{{ if .Values.notifications.secret.create }}
{{- if and .Values.notifications.enabled .Values.notifications.secret.create }}
apiVersion: v1
kind: Secret
metadata:

View file

@ -1,4 +1,4 @@
{{- if .Values.notifications.metrics.enabled }}
{{- if and .Values.notifications.enabled .Values.notifications.metrics.enabled }}
apiVersion: v1
kind: Service
metadata:

View file

@ -1,4 +1,4 @@
{{- if .Values.notifications.serviceAccount.create }}
{{- if and .Values.notifications.enabled .Values.notifications.serviceAccount.create }}
apiVersion: v1
kind: ServiceAccount
automountServiceAccountToken: {{ .Values.notifications.serviceAccount.automountServiceAccountToken }}

View file

@ -1,4 +1,4 @@
{{- if and .Values.notifications.metrics.enabled .Values.notifications.metrics.serviceMonitor.enabled }}
{{- if and .Values.notifications.enabled .Values.notifications.metrics.enabled .Values.notifications.metrics.serviceMonitor.enabled }}
apiVersion: monitoring.coreos.com/v1
kind: ServiceMonitor
metadata: