Skip to content

Commit ff6c77e

Browse files
feat: option for app-controller Deployment instead of StatefulSet (#77)
Signed-off-by: Justin Marquis <[email protected]>
1 parent 21e9987 commit ff6c77e

File tree

5 files changed

+298
-4
lines changed

5 files changed

+298
-4
lines changed

charts/argo-cd/Chart.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
apiVersion: v2
2-
version: 2.11.9-ak.0.0
2+
version: 2.11.9-ak.0.1
33
appVersion: 2.11.9
44
description: A Helm chart for ArgoCD, a declarative, GitOps continuous delivery tool for Kubernetes.
55
name: argo-cd

charts/argo-cd/README.md

+4-3
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# argo-cd
22

3-
![Version: 2.11.9-ak.0.0](https://img.shields.io/badge/Version-2.11.7--ak.0.0-informational?style=flat-square) ![AppVersion: 2.11.9](https://img.shields.io/badge/AppVersion-2.11.9-informational?style=flat-square)
3+
![Version: 2.11.9-ak.0.1](https://img.shields.io/badge/Version-2.11.9--ak.0.1-informational?style=flat-square) ![AppVersion: 2.11.9](https://img.shields.io/badge/AppVersion-2.11.9-informational?style=flat-square)
44

55
A Helm chart for ArgoCD, a declarative, GitOps continuous delivery tool for Kubernetes.
66

@@ -37,6 +37,7 @@ A Helm chart for ArgoCD, a declarative, GitOps continuous delivery tool for Kube
3737
| controller.args | object | `{"operationProcessors":"10","statusProcessors":"20"}` | Argo controller commandline flags |
3838
| controller.args.operationProcessors | string | `"10"` | Number of application operation processors |
3939
| controller.args.statusProcessors | string | `"20"` | Number of application status processors |
40+
| controller.deployment | bool | `false` | Deploys the application controller as a Deployment |
4041
| controller.extraArgs | string | `nil` | Additional command line arguments to pass to argocd-controller |
4142
| controller.image.pullPolicy | string | `nil` | |
4243
| controller.image.repository | string | `nil` | |
@@ -60,7 +61,7 @@ A Helm chart for ArgoCD, a declarative, GitOps continuous delivery tool for Kube
6061
| imageUpdater.enabled | bool | `false` | Whether to enable image updater |
6162
| notificationsController | object | `{"enabled":true}` | Notifications Controller |
6263
| notificationsController.enabled | bool | `true` | Whether to enable Notifications Controller |
63-
| redis | object | `{"enabled":true,"haProxyImage":{"repository":"haproxy","tag":"2.6.14-alpine"},"networkPolicy":{"egress":{"enabled":true}},"image":{"pullPolicy":null,"repository":"quay.io/akuity/redis","tag":"7.0.15-alpine"},"resources":null}` | Redis configurations |
64+
| redis | object | `{"config":["min-replicas-to-write 0","client-output-buffer-limit replica 512mb 128mb 60","repl-backlog-size 512mb"],"enabled":true,"haProxyImage":{"repository":"haproxy","tag":"2.6.14-alpine"},"image":{"pullPolicy":null,"repository":"quay.io/akuity/redis","tag":"7.0.15-alpine"},"networkPolicy":{"egress":{"enabled":true}},"resources":null}` | Redis configurations |
6465
| repoServer | object | `{"extraArgs":null,"image":{"pullPolicy":null,"repository":null,"tag":null},"replicas":2,"resources":null}` | Repo Server |
6566
| repoServer.extraArgs | string | `nil` | Additional command line arguments to pass to argocd-repo-server |
6667
| server | object | `{"enabled":true,"extraArgs":null,"image":{"pullPolicy":null,"repository":null,"tag":null},"ingress":{"annotations":{},"className":"","enabled":false,"host":"argocd.example.com","tls":{"enabled":false,"secretName":null}},"insecure":false,"replicas":2,"resources":null,"service":{"type":null}}` | Argo Server configuration |
@@ -71,4 +72,4 @@ A Helm chart for ArgoCD, a declarative, GitOps continuous delivery tool for Kube
7172
| server.service | object | `{"type":null}` | Server service configuration |
7273

7374
----------------------------------------------
74-
Autogenerated from chart metadata using [helm-docs v1.11.0](https://github.com/norwoodj/helm-docs/releases/v1.11.0)
75+
Autogenerated from chart metadata using [helm-docs v1.14.2](https://github.com/norwoodj/helm-docs/releases/v1.14.2)
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,287 @@
1+
{{- if .Values.controller.deployment }}
2+
apiVersion: apps/v1
3+
kind: Deployment
4+
metadata:
5+
labels:
6+
app.kubernetes.io/name: argocd-application-controller
7+
app.kubernetes.io/part-of: argocd
8+
app.kubernetes.io/component: application-controller
9+
name: argocd-application-controller
10+
namespace: {{ .Release.Namespace }}
11+
spec:
12+
selector:
13+
matchLabels:
14+
app.kubernetes.io/name: argocd-application-controller
15+
replicas: 1
16+
template:
17+
metadata:
18+
labels:
19+
app.kubernetes.io/name: argocd-application-controller
20+
spec:
21+
containers:
22+
- args:
23+
- /usr/local/bin/argocd-application-controller
24+
{{- with .Values.controller.extraArgs }}
25+
{{- . | toYaml | nindent 8 }}
26+
{{- end }}
27+
{{- with .Values.controller.resources }}
28+
resources:
29+
{{- toYaml . | nindent 10 }}
30+
{{- end }}
31+
env:
32+
{{- with .Values.controller.env }}
33+
{{- toYaml . | nindent 10 }}
34+
{{- end }}
35+
- name: REDIS_PASSWORD
36+
valueFrom:
37+
secretKeyRef:
38+
key: auth
39+
name: argocd-redis
40+
- name: ARGOCD_RECONCILIATION_TIMEOUT
41+
valueFrom:
42+
configMapKeyRef:
43+
name: argocd-cm
44+
key: timeout.reconciliation
45+
optional: true
46+
- name: ARGOCD_HARD_RECONCILIATION_TIMEOUT
47+
valueFrom:
48+
configMapKeyRef:
49+
name: argocd-cm
50+
key: timeout.hard.reconciliation
51+
optional: true
52+
- name: ARGOCD_RECONCILIATION_JITTER
53+
valueFrom:
54+
configMapKeyRef:
55+
key: timeout.reconciliation.jitter
56+
name: argocd-cm
57+
optional: true
58+
- name: ARGOCD_REPO_ERROR_GRACE_PERIOD_SECONDS
59+
valueFrom:
60+
configMapKeyRef:
61+
name: argocd-cmd-params-cm
62+
key: controller.repo.error.grace.period.seconds
63+
optional: true
64+
- name: ARGOCD_APPLICATION_CONTROLLER_REPO_SERVER
65+
valueFrom:
66+
configMapKeyRef:
67+
name: argocd-cmd-params-cm
68+
key: repo.server
69+
optional: true
70+
- name: ARGOCD_APPLICATION_CONTROLLER_REPO_SERVER_TIMEOUT_SECONDS
71+
valueFrom:
72+
configMapKeyRef:
73+
name: argocd-cmd-params-cm
74+
key: controller.repo.server.timeout.seconds
75+
optional: true
76+
- name: ARGOCD_APPLICATION_CONTROLLER_STATUS_PROCESSORS
77+
valueFrom:
78+
configMapKeyRef:
79+
name: argocd-cmd-params-cm
80+
key: controller.status.processors
81+
optional: true
82+
- name: ARGOCD_APPLICATION_CONTROLLER_OPERATION_PROCESSORS
83+
valueFrom:
84+
configMapKeyRef:
85+
name: argocd-cmd-params-cm
86+
key: controller.operation.processors
87+
optional: true
88+
- name: ARGOCD_APPLICATION_CONTROLLER_LOGFORMAT
89+
valueFrom:
90+
configMapKeyRef:
91+
name: argocd-cmd-params-cm
92+
key: controller.log.format
93+
optional: true
94+
- name: ARGOCD_APPLICATION_CONTROLLER_LOGLEVEL
95+
valueFrom:
96+
configMapKeyRef:
97+
name: argocd-cmd-params-cm
98+
key: controller.log.level
99+
optional: true
100+
- name: ARGOCD_APPLICATION_CONTROLLER_METRICS_CACHE_EXPIRATION
101+
valueFrom:
102+
configMapKeyRef:
103+
name: argocd-cmd-params-cm
104+
key: controller.metrics.cache.expiration
105+
optional: true
106+
- name: ARGOCD_APPLICATION_CONTROLLER_SELF_HEAL_TIMEOUT_SECONDS
107+
valueFrom:
108+
configMapKeyRef:
109+
name: argocd-cmd-params-cm
110+
key: controller.self.heal.timeout.seconds
111+
optional: true
112+
- name: ARGOCD_APPLICATION_CONTROLLER_REPO_SERVER_PLAINTEXT
113+
valueFrom:
114+
configMapKeyRef:
115+
name: argocd-cmd-params-cm
116+
key: controller.repo.server.plaintext
117+
optional: true
118+
- name: ARGOCD_APPLICATION_CONTROLLER_REPO_SERVER_STRICT_TLS
119+
valueFrom:
120+
configMapKeyRef:
121+
name: argocd-cmd-params-cm
122+
key: controller.repo.server.strict.tls
123+
optional: true
124+
- name: ARGOCD_APPLICATION_CONTROLLER_PERSIST_RESOURCE_HEALTH
125+
valueFrom:
126+
configMapKeyRef:
127+
name: argocd-cmd-params-cm
128+
key: controller.resource.health.persist
129+
optional: true
130+
- name: ARGOCD_APP_STATE_CACHE_EXPIRATION
131+
valueFrom:
132+
configMapKeyRef:
133+
name: argocd-cmd-params-cm
134+
key: controller.app.state.cache.expiration
135+
optional: true
136+
- name: REDIS_SERVER
137+
valueFrom:
138+
configMapKeyRef:
139+
name: argocd-cmd-params-cm
140+
key: redis.server
141+
optional: true
142+
- name: REDIS_COMPRESSION
143+
valueFrom:
144+
configMapKeyRef:
145+
name: argocd-cmd-params-cm
146+
key: redis.compression
147+
optional: true
148+
- name: REDISDB
149+
valueFrom:
150+
configMapKeyRef:
151+
name: argocd-cmd-params-cm
152+
key: redis.db
153+
optional: true
154+
- name: ARGOCD_DEFAULT_CACHE_EXPIRATION
155+
valueFrom:
156+
configMapKeyRef:
157+
name: argocd-cmd-params-cm
158+
key: controller.default.cache.expiration
159+
optional: true
160+
- name: ARGOCD_APPLICATION_CONTROLLER_OTLP_ADDRESS
161+
valueFrom:
162+
configMapKeyRef:
163+
name: argocd-cmd-params-cm
164+
key: otlp.address
165+
optional: true
166+
- name: ARGOCD_APPLICATION_CONTROLLER_OTLP_INSECURE
167+
valueFrom:
168+
configMapKeyRef:
169+
name: argocd-cmd-params-cm
170+
key: otlp.insecure
171+
optional: true
172+
- name: ARGOCD_APPLICATION_CONTROLLER_OTLP_HEADERS
173+
valueFrom:
174+
configMapKeyRef:
175+
name: argocd-cmd-params-cm
176+
key: otlp.headers
177+
optional: true
178+
- name: ARGOCD_APPLICATION_NAMESPACES
179+
valueFrom:
180+
configMapKeyRef:
181+
name: argocd-cmd-params-cm
182+
key: application.namespaces
183+
optional: true
184+
- name: ARGOCD_CONTROLLER_SHARDING_ALGORITHM
185+
valueFrom:
186+
configMapKeyRef:
187+
name: argocd-cmd-params-cm
188+
key: controller.sharding.algorithm
189+
optional: true
190+
- name: ARGOCD_APPLICATION_CONTROLLER_KUBECTL_PARALLELISM_LIMIT
191+
valueFrom:
192+
configMapKeyRef:
193+
name: argocd-cmd-params-cm
194+
key: controller.kubectl.parallelism.limit
195+
optional: true
196+
- name: ARGOCD_K8SCLIENT_RETRY_MAX
197+
valueFrom:
198+
configMapKeyRef:
199+
name: argocd-cmd-params-cm
200+
key: controller.k8sclient.retry.max
201+
optional: true
202+
- name: ARGOCD_K8SCLIENT_RETRY_BASE_BACKOFF
203+
valueFrom:
204+
configMapKeyRef:
205+
name: argocd-cmd-params-cm
206+
key: controller.k8sclient.retry.base.backoff
207+
optional: true
208+
- name: ARGOCD_APPLICATION_CONTROLLER_SERVER_SIDE_DIFF
209+
valueFrom:
210+
configMapKeyRef:
211+
name: argocd-cmd-params-cm
212+
key: controller.diff.server.side
213+
optional: true
214+
image: {{ include "argo-cd.image" (dict "root" . "image" .Values.controller.image ) }}
215+
imagePullPolicy: {{ default .Values.global.image.pullPolicy .Values.controller.image.pullPolicy }}
216+
name: argocd-application-controller
217+
ports:
218+
- containerPort: 8082
219+
readinessProbe:
220+
httpGet:
221+
path: /healthz
222+
port: 8082
223+
initialDelaySeconds: 5
224+
periodSeconds: 10
225+
securityContext:
226+
runAsNonRoot: true
227+
readOnlyRootFilesystem: true
228+
allowPrivilegeEscalation: false
229+
capabilities:
230+
drop:
231+
- ALL
232+
seccompProfile:
233+
type: RuntimeDefault
234+
workingDir: /home/argocd
235+
volumeMounts:
236+
{{- with .Values.controller.volumeMounts }}
237+
{{- toYaml . | nindent 8 }}
238+
{{- end }}
239+
- name: argocd-repo-server-tls
240+
mountPath: /app/config/controller/tls
241+
- name: argocd-home
242+
mountPath: /home/argocd
243+
- name: argocd-cmd-params-cm
244+
mountPath: /home/argocd/params
245+
serviceAccountName: argocd-application-controller
246+
affinity:
247+
podAntiAffinity:
248+
preferredDuringSchedulingIgnoredDuringExecution:
249+
- weight: 100
250+
podAffinityTerm:
251+
labelSelector:
252+
matchLabels:
253+
app.kubernetes.io/name: argocd-application-controller
254+
topologyKey: kubernetes.io/hostname
255+
- weight: 5
256+
podAffinityTerm:
257+
labelSelector:
258+
matchLabels:
259+
app.kubernetes.io/part-of: argocd
260+
topologyKey: kubernetes.io/hostname
261+
volumes:
262+
{{- with .Values.controller.volumes }}
263+
{{- toYaml . | nindent 6}}
264+
{{- end }}
265+
- emptyDir: {}
266+
name: argocd-home
267+
- name: argocd-repo-server-tls
268+
secret:
269+
secretName: argocd-repo-server-tls
270+
optional: true
271+
items:
272+
- key: tls.crt
273+
path: tls.crt
274+
- key: tls.key
275+
path: tls.key
276+
- key: ca.crt
277+
path: ca.crt
278+
- name: argocd-cmd-params-cm
279+
configMap:
280+
optional: true
281+
name: argocd-cmd-params-cm
282+
items:
283+
- key: controller.profile.enabled
284+
path: profiler.enabled
285+
nodeSelector:
286+
kubernetes.io/os: linux
287+
{{- end }}

charts/argo-cd/templates/application-controller/statefulset.yaml

+2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
{{- if not .Values.controller.deployment | default false }}
12
apiVersion: apps/v1
23
kind: StatefulSet
34
metadata:
@@ -281,3 +282,4 @@ spec:
281282
path: ca.crt
282283
optional: true
283284
secretName: argocd-repo-server-tls
285+
{{- end }}

charts/argo-cd/values.yaml

+4
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,10 @@ server:
7979

8080
## Controller
8181
controller:
82+
83+
# Deploys the application controller as a Deployment. This is useful if you are only deploying to a single cluster or
84+
# want to enable the dynamic cluster distribution feature.
85+
deployment: false
8286
image:
8387
repository: # defaults to global.image.repository
8488
tag: # defaults to global.image.tag

0 commit comments

Comments
 (0)