fix(argo-cd): Always create ApplicationSet as following upstream (#2688)
This commit is contained in:
parent
3693ed4270
commit
510261328f
18 changed files with 14 additions and 34 deletions
|
|
@ -196,6 +196,7 @@ NOTE: Configuration keys must be stored as dict because YAML treats dot as separ
|
|||
{{- $_ := set $presets "repo.server" (printf "%s:%s" (include "argo-cd.repoServer.fullname" .) (.Values.repoServer.service.port | toString)) -}}
|
||||
{{- $_ := set $presets "server.repo.server.strict.tls" (.Values.repoServer.certificateSecret.enabled | toString ) -}}
|
||||
{{- $_ := set $presets "redis.server" (include "argo-cd.redis.server" .) -}}
|
||||
{{- $_ := set $presets "applicationsetcontroller.enable.leader.election" (gt ((.Values.applicationSet.replicas | default .Values.applicationSet.replicaCount) | int64) 1) -}}
|
||||
{{- if .Values.dex.enabled -}}
|
||||
{{- $_ := set $presets "server.dex.server" (include "argo-cd.dex.server" .) -}}
|
||||
{{- $_ := set $presets "server.dex.server.strict.tls" .Values.dex.certificateSecret.enabled -}}
|
||||
|
|
@ -204,9 +205,6 @@ NOTE: Configuration keys must be stored as dict because YAML treats dot as separ
|
|||
{{- $_ := set $presets (printf "%s.log.format" $component) $.Values.global.logging.format -}}
|
||||
{{- $_ := set $presets (printf "%s.log.level" $component) $.Values.global.logging.level -}}
|
||||
{{- end -}}
|
||||
{{- if .Values.applicationSet.enabled -}}
|
||||
{{- $_ := set $presets "applicationsetcontroller.enable.leader.election" (gt ((.Values.applicationSet.replicas | default .Values.applicationSet.replicaCount) | int64) 1) -}}
|
||||
{{- end -}}
|
||||
{{- toYaml $presets }}
|
||||
{{- end -}}
|
||||
|
||||
|
|
|
|||
|
|
@ -11,9 +11,7 @@ rules:
|
|||
- argoproj.io
|
||||
resources:
|
||||
- applications
|
||||
{{- if .Values.applicationSet.enabled }}
|
||||
- applicationsets
|
||||
{{- end }}
|
||||
- appprojects
|
||||
verbs:
|
||||
- get
|
||||
|
|
@ -33,9 +31,7 @@ rules:
|
|||
- argoproj.io
|
||||
resources:
|
||||
- applications
|
||||
{{- if .Values.applicationSet.enabled }}
|
||||
- applicationsets
|
||||
{{- end }}
|
||||
- appprojects
|
||||
verbs:
|
||||
- create
|
||||
|
|
@ -60,9 +56,7 @@ rules:
|
|||
- argoproj.io
|
||||
resources:
|
||||
- applications
|
||||
{{- if .Values.applicationSet.enabled }}
|
||||
- applicationsets
|
||||
{{- end }}
|
||||
- appprojects
|
||||
verbs:
|
||||
- create
|
||||
|
|
|
|||
|
|
@ -1,4 +1,3 @@
|
|||
{{- if .Values.applicationSet.enabled }}
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
|
|
@ -332,4 +331,3 @@ spec:
|
|||
{{- toYaml . | nindent 8 }}
|
||||
{{- end }}
|
||||
dnsPolicy: {{ .Values.applicationSet.dnsPolicy }}
|
||||
{{- end }}
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
{{- if and .Values.applicationSet.enabled .Values.applicationSet.ingress.enabled -}}
|
||||
{{- if .Values.applicationSet.ingress.enabled -}}
|
||||
apiVersion: networking.k8s.io/v1
|
||||
kind: Ingress
|
||||
metadata:
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
{{- if and .Values.applicationSet.enabled .Values.applicationSet.metrics.enabled }}
|
||||
{{- if .Values.applicationSet.metrics.enabled }}
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
{{- if and .Values.applicationSet.enabled .Values.global.networkPolicy.create (or .Values.applicationSet.metrics.enabled .Values.applicationSet.ingress.enabled) }}
|
||||
{{- if and .Values.global.networkPolicy.create (or .Values.applicationSet.metrics.enabled .Values.applicationSet.ingress.enabled) }}
|
||||
apiVersion: networking.k8s.io/v1
|
||||
kind: NetworkPolicy
|
||||
metadata:
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
{{- if and .Values.applicationSet.enabled .Values.applicationSet.pdb.enabled }}
|
||||
{{- if .Values.applicationSet.pdb.enabled }}
|
||||
apiVersion: policy/v1
|
||||
kind: PodDisruptionBudget
|
||||
metadata:
|
||||
|
|
|
|||
|
|
@ -1,4 +1,3 @@
|
|||
{{- if .Values.applicationSet.enabled }}
|
||||
apiVersion: rbac.authorization.k8s.io/v1
|
||||
kind: Role
|
||||
metadata:
|
||||
|
|
@ -86,4 +85,3 @@ rules:
|
|||
- patch
|
||||
- update
|
||||
- watch
|
||||
{{- end }}
|
||||
|
|
|
|||
|
|
@ -1,4 +1,3 @@
|
|||
{{- if .Values.applicationSet.enabled }}
|
||||
apiVersion: rbac.authorization.k8s.io/v1
|
||||
kind: RoleBinding
|
||||
metadata:
|
||||
|
|
@ -14,4 +13,3 @@ subjects:
|
|||
- kind: ServiceAccount
|
||||
name: {{ include "argo-cd.applicationSet.serviceAccountName" . }}
|
||||
namespace: {{ .Release.Namespace }}
|
||||
{{- end }}
|
||||
|
|
|
|||
|
|
@ -1,4 +1,3 @@
|
|||
{{- if .Values.applicationSet.enabled }}
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
|
|
@ -23,4 +22,3 @@ spec:
|
|||
targetPort: webhook
|
||||
selector:
|
||||
{{- include "argo-cd.selectorLabels" (dict "context" . "name" .Values.applicationSet.name) | nindent 4 }}
|
||||
{{- end }}
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
{{- if and .Values.applicationSet.enabled .Values.applicationSet.serviceAccount.create }}
|
||||
{{- if .Values.applicationSet.serviceAccount.create }}
|
||||
apiVersion: v1
|
||||
kind: ServiceAccount
|
||||
automountServiceAccountToken: {{ .Values.applicationSet.serviceAccount.automountServiceAccountToken }}
|
||||
|
|
|
|||
|
|
@ -1,4 +1,3 @@
|
|||
{{- if .Values.applicationSet.enabled }}
|
||||
{{- if and (.Capabilities.APIVersions.Has "monitoring.coreos.com/v1") .Values.applicationSet.metrics.enabled .Values.applicationSet.metrics.serviceMonitor.enabled }}
|
||||
apiVersion: monitoring.coreos.com/v1
|
||||
kind: ServiceMonitor
|
||||
|
|
@ -49,4 +48,3 @@ spec:
|
|||
matchLabels:
|
||||
{{- include "argo-cd.selectorLabels" (dict "context" . "component" .Values.applicationSet.name "name" "metrics") | nindent 6 }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
|
|
|
|||
|
|
@ -20,11 +20,9 @@ spec:
|
|||
matchLabels:
|
||||
{{- include "argo-cd.selectorLabels" (dict "context" . "name" .Values.notifications.name) | nindent 10 }}
|
||||
{{- end }}
|
||||
{{- if .Values.applicationSet.enabled }}
|
||||
- podSelector:
|
||||
matchLabels:
|
||||
{{- include "argo-cd.selectorLabels" (dict "context" . "name" .Values.applicationSet.name) | nindent 10 }}
|
||||
{{- end }}
|
||||
ports:
|
||||
- port: repo-server
|
||||
protocol: TCP
|
||||
|
|
|
|||
|
|
@ -23,9 +23,7 @@ rules:
|
|||
- argoproj.io
|
||||
resources:
|
||||
- applications
|
||||
{{- if .Values.applicationSet.enabled }}
|
||||
- applicationsets
|
||||
{{- end }}
|
||||
- appprojects
|
||||
verbs:
|
||||
- create
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue