Skip to content

Commit cd9c84f

Browse files
merllj-zimnowoda
andauthored
fix: argocd resource configuration (#1580)
Co-authored-by: jeho <[email protected]>
1 parent 796c5ed commit cd9c84f

File tree

4 files changed

+41
-12
lines changed

4 files changed

+41
-12
lines changed

core.yaml

-2
Original file line numberDiff line numberDiff line change
@@ -146,8 +146,6 @@ adminApps:
146146
namespace: argocd
147147
type: public
148148
auth: true
149-
# removeRequestHeaders:
150-
# - authorization
151149
- name: cert-manager
152150
tags: [ingress, security, tls]
153151
- name: cnpg

helmfile.d/snippets/defaults.yaml

+3-3
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,10 @@ environments:
1010
argocd:
1111
enabled: true
1212
autoscaling:
13-
enabled: false
13+
enabled: true
1414
minReplicas: 1
15-
maxReplicas: 3
16-
targetCPUUtilizationPercentage: 50
15+
maxReplicas: 5
16+
targetCPUUtilizationPercentage: 70
1717
cert-manager:
1818
issuer: custom-ca
1919
resources:

values/argocd/argocd.gotmpl

+37-6
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
{{- $v := .Values }}
2+
{{- $a := $v.apps.argocd }}
23
{{- $k := $v.apps.keycloak }}
34
global:
45
domain: argocd.{{ $v.cluster.domainSuffix }}
@@ -21,14 +22,22 @@ applicationSet:
2122

2223
controller:
2324
autoscaling:
24-
enabled: true
25+
enabled: {{ $a.autoscaling.enabled }}
26+
maxReplicas: {{ $a.autoscaling.maxReplicas }}
27+
minReplicas: {{ $a.autoscaling.minReplicas }}
28+
targetCPUUtilizationPercentage: {{ $a.autoscaling.targetCPUUtilizationPercentage }}
29+
2530
resources:
31+
{{- with $a | get "resources.controller" nil }}
32+
{{- toYaml .| nindent 4 }}
33+
{{- else }}
2634
limits:
2735
cpu: 1
28-
memory: 1Gi
36+
memory: 2Gi
2937
requests:
3038
cpu: 100m
31-
memory: 256M
39+
memory: 1Gi
40+
{{- end }}
3241
dex:
3342
enabled: false
3443
notifications:
@@ -43,32 +52,52 @@ notifications:
4352
memory: 256M
4453
redis:
4554
resources:
55+
{{- with $a | get "resources.redis" nil }}
56+
{{- toYaml .| nindent 4 }}
57+
{{- else }}
4658
limits:
4759
cpu: 1
4860
memory: 1Gi
4961
requests:
5062
cpu: 100m
5163
memory: 256M
64+
{{- end }}
5265
repoServer:
5366
autoscaling:
54-
enabled: true
67+
enabled: {{ $a.autoscaling.enabled }}
68+
maxReplicas: {{ $a.autoscaling.maxReplicas }}
69+
minReplicas: {{ $a.autoscaling.minReplicas }}
70+
targetCPUUtilizationPercentage: {{ $a.autoscaling.targetCPUUtilizationPercentage }}
71+
5572
resources:
73+
{{- with $a | get "resources.repo" nil }}
74+
{{- toYaml .| nindent 4 }}
75+
{{- else }}
5676
limits:
5777
cpu: 1
5878
memory: 1Gi
5979
requests:
6080
cpu: 100m
6181
memory: 256M
82+
{{- end }}
6283
server:
6384
autoscaling:
64-
enabled: true
85+
enabled: {{ $a.autoscaling.enabled }}
86+
maxReplicas: {{ $a.autoscaling.maxReplicas }}
87+
minReplicas: {{ $a.autoscaling.minReplicas }}
88+
targetCPUUtilizationPercentage: {{ $a.autoscaling.targetCPUUtilizationPercentage }}
89+
6590
resources:
91+
{{- with $a | get "resources.server" nil }}
92+
{{- toYaml .| nindent 4 }}
93+
{{- else }}
6694
limits:
6795
cpu: 1
6896
memory: 1Gi
6997
requests:
7098
cpu: 100m
7199
memory: 256M
100+
{{- end }}
72101
configs:
73102
# General Argo CD configuration
74103
## Ref: https://github.com/argoproj/argo-cd/blob/master/docs/operator-manual/argocd-cm.yaml
@@ -80,6 +109,8 @@ configs:
80109
statusbadge.enabled: "false"
81110
url: https://argocd.{{ $v.cluster.domainSuffix }}
82111
users.anonymous.enabled: "false"
112+
# Note that the clientSecret is not actually used
113+
# as for now oauth2-proxy handles the login
83114
oidc.config: |
84115
name: Otomi
85116
issuer: {{ $v._derived.oidcBaseUrl }}
@@ -103,7 +134,7 @@ configs:
103134

104135
secret:
105136
extra:
106-
clientSecret: {{ $k.idp.clientSecret | b64enc }}
137+
oidc.clientSecret: {{ $k.idp.clientSecret }}
107138
params:
108139
server.insecure: true # nginx terminates tls
109140

versions.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
api: 2.8.0
1+
api: fix-argocd-resource-values
22
console: 2.7.0
33
tasks: 2.4.0
44
tools: 1.6.4

0 commit comments

Comments
 (0)