chore(argo-cd): Sync ApplicationSet deployment with upstream (#1545)

Signed-off-by: Petr Drastil <petr.drastil@gmail.com>
Co-authored-by: Marco Kilchhofer <mkilchhofer@users.noreply.github.com>
This commit is contained in:
Petr Drastil 2022-10-12 10:04:10 +02:00 committed by GitHub
parent b102a1cfab
commit 9b2f24514c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 54 additions and 64 deletions

View file

@ -2,7 +2,7 @@ apiVersion: v2
appVersion: v2.4.14 appVersion: v2.4.14
description: A Helm chart for Argo CD, a declarative, GitOps continuous delivery tool for Kubernetes. description: A Helm chart for Argo CD, a declarative, GitOps continuous delivery tool for Kubernetes.
name: argo-cd name: argo-cd
version: 5.5.21 version: 5.5.22
home: https://github.com/argoproj/argo-helm home: https://github.com/argoproj/argo-helm
icon: https://argo-cd.readthedocs.io/en/stable/assets/logo.png icon: https://argo-cd.readthedocs.io/en/stable/assets/logo.png
sources: sources:
@ -22,5 +22,4 @@ dependencies:
condition: redis-ha.enabled condition: redis-ha.enabled
annotations: annotations:
artifacthub.io/changes: | artifacthub.io/changes: |
- "[Fixed]: Init container for repo-server should use main container resources" - "[Changed]: Synced ApplicationSet deployment with upstream manifest"
- "[Removed]: Section repoServer.copyutil that is no longer needed"

View file

@ -2,7 +2,7 @@
apiVersion: apps/v1 apiVersion: apps/v1
kind: Deployment kind: Deployment
metadata: metadata:
name: {{ template "argo-cd.applicationSet.fullname" . }} name: {{ include "argo-cd.applicationSet.fullname" . }}
labels: labels:
{{- include "argo-cd.labels" (dict "context" . "component" .Values.applicationSet.name "name" .Values.applicationSet.name) | nindent 4 }} {{- include "argo-cd.labels" (dict "context" . "component" .Values.applicationSet.name "name" .Values.applicationSet.name) | nindent 4 }}
spec: spec:
@ -28,13 +28,13 @@ spec:
imagePullSecrets: imagePullSecrets:
{{- toYaml . | nindent 8 }} {{- toYaml . | nindent 8 }}
{{- end }} {{- end }}
serviceAccountName: {{ include "argo-cd.applicationSetServiceAccountName" . }}
securityContext: securityContext:
{{- toYaml (mergeOverwrite (deepCopy .Values.global.securityContext) .Values.applicationSet.podSecurityContext) | nindent 8 }} {{- toYaml (mergeOverwrite (deepCopy .Values.global.securityContext) .Values.applicationSet.podSecurityContext) | nindent 8 }}
serviceAccountName: {{ include "argo-cd.applicationSetServiceAccountName" . }}
containers: containers:
- name: {{ .Values.applicationSet.name }} - name: {{ .Values.applicationSet.name }}
securityContext: image: {{ default .Values.global.image.repository .Values.applicationSet.image.repository }}:{{ default (include "argo-cd.defaultTag" .) .Values.applicationSet.image.tag }}
{{- toYaml .Values.applicationSet.securityContext | nindent 12 }} imagePullPolicy: {{ default .Values.global.image.imagePullPolicy .Values.applicationSet.image.imagePullPolicy }}
command: command:
- entrypoint.sh - entrypoint.sh
- argocd-applicationset-controller - argocd-applicationset-controller
@ -47,7 +47,6 @@ spec:
{{- if or (gt ( .Values.applicationSet.replicaCount | int64) 1) .Values.applicationSet.args.enableLeaderElection }} {{- if or (gt ( .Values.applicationSet.replicaCount | int64) 1) .Values.applicationSet.args.enableLeaderElection }}
- --enable-leader-election=true - --enable-leader-election=true
{{- end }} {{- end }}
- --namespace={{ .Release.Namespace }}
- --argocd-repo-server={{ template "argo-cd.repoServer.fullname" . }}:{{ .Values.repoServer.service.port }} - --argocd-repo-server={{ template "argo-cd.repoServer.fullname" . }}:{{ .Values.repoServer.service.port }}
- --policy={{ .Values.applicationSet.args.policy }} - --policy={{ .Values.applicationSet.args.policy }}
- --debug={{ .Values.applicationSet.args.debug }} - --debug={{ .Values.applicationSet.args.debug }}
@ -55,66 +54,49 @@ spec:
{{- with .Values.applicationSet.extraArgs }} {{- with .Values.applicationSet.extraArgs }}
{{- toYaml . | nindent 12 }} {{- toYaml . | nindent 12 }}
{{- end }} {{- end }}
image: {{ default .Values.global.image.repository .Values.applicationSet.image.repository }}:{{ default (include "argo-cd.defaultTag" .) .Values.applicationSet.image.tag }}
imagePullPolicy: {{ default .Values.global.image.imagePullPolicy .Values.applicationSet.image.imagePullPolicy }}
ports:
- name: http
containerPort: {{ (split ":" .Values.applicationSet.args.probeBindAddr)._1 }}
protocol: TCP
- name: metrics
containerPort: {{ (split ":" .Values.applicationSet.args.metricsAddr)._1 }}
protocol: TCP
- name: webhook
containerPort: 7000
protocol: TCP
{{- with .Values.applicationSet.extraEnv }}
env: env:
{{- toYaml . | nindent 12 }} {{- with .Values.applicationSet.extraEnv }}
{{- end }} {{- toYaml . | nindent 12 }}
{{- end }}
- name: NAMESPACE
valueFrom:
fieldRef:
fieldPath: metadata.namespace
{{- with .Values.applicationSet.extraEnvFrom }} {{- with .Values.applicationSet.extraEnvFrom }}
envFrom: envFrom:
{{- toYaml . | nindent 12 }} {{- toYaml . | nindent 12 }}
{{- end }} {{- end }}
ports:
- name: metrics
containerPort: {{ (split ":" .Values.applicationSet.args.metricsAddr)._1 }}
protocol: TCP
- name: probe
containerPort: {{ (split ":" .Values.applicationSet.args.probeBindAddr)._1 }}
protocol: TCP
- name: webhook
containerPort: 7000
protocol: TCP
resources: resources:
{{- toYaml .Values.applicationSet.resources | nindent 12 }} {{- toYaml .Values.applicationSet.resources | nindent 12 }}
securityContext:
{{- toYaml .Values.applicationSet.securityContext | nindent 12 }}
volumeMounts: volumeMounts:
- mountPath: /tmp {{- with .Values.applicationSet.extraVolumeMounts }}
name: tmp-dir {{- toYaml . | nindent 12 }}
{{- if .Values.configs.knownHosts }} {{- end }}
- mountPath: /app/config/ssh - mountPath: /app/config/ssh
name: ssh-known-hosts name: ssh-known-hosts
{{- end }}
- mountPath: /app/config/tls - mountPath: /app/config/tls
name: tls-certs name: tls-certs
- mountPath: /app/config/gpg/source - mountPath: /app/config/gpg/source
name: gpg-keys name: gpg-keys
- mountPath: /app/config/gpg/keys - mountPath: /app/config/gpg/keys
name: gpg-keyring name: gpg-keyring
{{- with .Values.applicationSet.extraVolumeMounts }} - mountPath: /tmp
{{- toYaml . | nindent 12 }} name: tmp
{{- end }}
{{- with .Values.applicationSet.extraContainers }} {{- with .Values.applicationSet.extraContainers }}
{{- toYaml . | nindent 8 }} {{- toYaml . | nindent 8 }}
{{- end }} {{- end }}
volumes:
- emptyDir: {}
name: tmp-dir
{{- if .Values.configs.knownHosts }}
- configMap:
name: argocd-ssh-known-hosts-cm
name: ssh-known-hosts
{{- end }}
- configMap:
name: argocd-tls-certs-cm
name: tls-certs
- configMap:
name: argocd-gpg-keys-cm
name: gpg-keys
- emptyDir: {}
name: gpg-keyring
{{- with .Values.applicationSet.extraVolumes }}
{{- toYaml . | nindent 6 }}
{{- end }}
{{- with .Values.applicationSet.nodeSelector }} {{- with .Values.applicationSet.nodeSelector }}
nodeSelector: nodeSelector:
{{- toYaml . | nindent 8 }} {{- toYaml . | nindent 8 }}
@ -130,4 +112,21 @@ spec:
{{- with .Values.applicationSet.priorityClassName }} {{- with .Values.applicationSet.priorityClassName }}
priorityClassName: {{ . }} priorityClassName: {{ . }}
{{- end }} {{- end }}
volumes:
{{- with .Values.applicationSet.extraVolumes }}
{{- toYaml . | nindent 8 }}
{{- end }}
- name: ssh-known-hosts
configMap:
name: argocd-ssh-known-hosts-cm
- name: tls-certs
configMap:
name: argocd-tls-certs-cm
- name: gpg-keys
configMap:
name: argocd-gpg-keys-cm
- name: gpg-keyring
emptyDir: {}
- name: tmp
emptyDir: {}
{{- end }} {{- end }}

View file

@ -2,7 +2,7 @@
apiVersion: rbac.authorization.k8s.io/v1 apiVersion: rbac.authorization.k8s.io/v1
kind: Role kind: Role
metadata: metadata:
name: {{ template "argo-cd.applicationSet.fullname" . }} name: {{ include "argo-cd.applicationSet.fullname" . }}
labels: labels:
{{- include "argo-cd.labels" (dict "context" . "component" .Values.applicationSet.name "name" .Values.applicationSet.name) | nindent 4 }} {{- include "argo-cd.labels" (dict "context" . "component" .Values.applicationSet.name "name" .Values.applicationSet.name) | nindent 4 }}
rules: rules:
@ -10,7 +10,6 @@ rules:
- argoproj.io - argoproj.io
resources: resources:
- applications - applications
- appprojects
- applicationsets - applicationsets
- applicationsets/finalizers - applicationsets/finalizers
verbs: verbs:
@ -29,37 +28,30 @@ rules:
- get - get
- patch - patch
- update - update
- apiGroups:
- argoproj.io
resources:
- appprojects
verbs:
- get
- apiGroups: - apiGroups:
- "" - ""
resources: resources:
- events - events
verbs: verbs:
- create - create
- delete
- get - get
- list - list
- patch - patch
- update
- watch - watch
- apiGroups: - apiGroups:
- "" - ""
resources: resources:
- secrets - secrets
verbs:
- get
- list
- watch
- apiGroups:
- ""
resources:
- configmaps - configmaps
verbs: verbs:
- create
- delete
- get - get
- list - list
- patch
- update
- watch - watch
- apiGroups: - apiGroups:
- apps - apps