-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path200-helm-release-argocd.yaml.gotmpl
More file actions
89 lines (87 loc) · 3.2 KB
/
Copy path200-helm-release-argocd.yaml.gotmpl
File metadata and controls
89 lines (87 loc) · 3.2 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
# code: language=yaml
#
# Helm Release: ArgoCD
#
# Chart defaults:
# - CRDs installed
# - Prometheus metrics and ServiceMonitor enabled
#
{{- $argo := $state.argocd }}
---
apiVersion: helm.m.crossplane.io/v1beta1
kind: Release
metadata:
name: {{ $argo.name }}
annotations:
{{ setResourceNameAnnotation "helm-release-argocd" }}
labels: {{ $state.labels | toJson }}
spec:
managementPolicies: {{ $state.managementPolicies | toJson }}
forProvider:
chart:
name: argo-cd
repository: https://argoproj.github.io/argo-helm
version: 9.7.1
namespace: {{ $argo.namespace }}
{{- if $argo.overrideAllValues }}
values:
{{- toYaml $argo.overrideAllValues | nindent 6 }}
{{- else }}
{{- /* Resource defaults. application-controller is the StatefulSet that
actually does reconciliation (heaviest component, holds the full
repo state in memory). Memory request==limit for Guaranteed protection;
CPU request only, no limit so it can burst. The rest are Burstable
restart-cheap controllers/webhooks/proxies.
See references/karpenter-resource-best-practices §7. */}}
{{- /* application-controller is sized from current VPA/Goldilocks
recommendations on pat-local. */}}
{{- $controllerResources := dict
"requests" (dict "cpu" "548m" "memory" "2062Mi")
"limits" (dict "memory" "2062Mi")
}}
{{- $repoServerResources := dict
"requests" (dict "cpu" "15m" "memory" "100Mi")
"limits" (dict "cpu" "500m" "memory" "512Mi")
}}
{{- $serverResources := dict
"requests" (dict "cpu" "15m" "memory" "100Mi")
"limits" (dict "cpu" "250m" "memory" "256Mi")
}}
{{- $smallControllerResources := dict
"requests" (dict "cpu" "15m" "memory" "100Mi")
"limits" (dict "cpu" "100m" "memory" "256Mi")
}}
{{- $redisResources := dict
"requests" (dict "cpu" "15m" "memory" "100Mi")
"limits" (dict "cpu" "100m" "memory" "256Mi")
}}
{{- $globalValues := dict
"monitoring" (dict
"enabled" true
"serviceMonitor" (dict "enabled" true)
)
"nodeSelector" (dict "kubernetes.io/os" "linux")
}}
{{- if $state.nodePool.enabled }}
{{- $_ := set $globalValues "nodeSelector" (mergeOverwrite (dict "kubernetes.io/os" "linux") $state.nodePool.nodeSelector) }}
{{- $_ := set $globalValues "tolerations" $state.nodePool.tolerations }}
{{- end }}
{{- $chartDefaults := dict
"crds" (dict "install" true)
"global" $globalValues
"controller" (dict "resources" $controllerResources)
"repoServer" (dict "resources" $repoServerResources)
"server" (dict "resources" $serverResources)
"applicationSet" (dict "resources" $smallControllerResources)
"notifications" (dict "resources" $smallControllerResources)
"dex" (dict "resources" $smallControllerResources)
"redis" (dict "resources" $redisResources)
}}
{{- $mergedValues := mergeOverwrite $chartDefaults ($argo.values | default dict) }}
values:
{{- toYaml $mergedValues | nindent 6 }}
{{- end }}
rollbackLimit: 3
providerConfigRef:
name: {{ $state.helmProviderConfigRef.name }}
kind: {{ $state.helmProviderConfigRef.kind }}