Skip to content

Commit 78f23d6

Browse files
Fixed helm installation
1 parent 4d0d3f5 commit 78f23d6

File tree

108 files changed

+6519
-12
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

108 files changed

+6519
-12
lines changed

installer/helm/Chart.yaml

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,3 @@ description: A Helm chart used for installing a CSDP runtime
44
type: application
55
version: 0.1.8
66
appVersion: v0.0.5
7-
8-
dependencies:
9-
- name: argo-cd
10-
repository: https://argoproj.github.io/argo-helm
11-
version: 4.2.2
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
{{- if or .Values.configs.repositoryCredentials .Values.server.config.repositories }}
2+
WARNING: You are using configs.repositoryCredentials and/or server.config.repositories parameter that are DEPRECATED
3+
Instead, use configs.repositoryTemplates and/or configs.repositories parameters
4+
Read More about here: https://argo-cd.readthedocs.io/en/latest/operator-manual/declarative-setup/#legacy-behaviour
5+
6+
{{- end}}
7+
In order to access the server UI you have the following options:
8+
9+
1. kubectl port-forward service/{{include "argo-cd.fullname" . }}-server -n {{ .Release.Namespace }} 8080:443
10+
11+
and then open the browser on http://localhost:8080 and accept the certificate
12+
13+
2. enable ingress in the values file `server.ingress.enabled` and either
14+
- Add the annotation for ssl passthrough: https://github.com/argoproj/argo-cd/blob/master/docs/operator-manual/ingress.md#option-1-ssl-passthrough
15+
- Add the `--insecure` flag to `server.extraArgs` in the values file and terminate SSL at your ingress: https://github.com/argoproj/argo-cd/blob/master/docs/operator-manual/ingress.md#option-2-multiple-ingress-objects-and-hosts
16+
17+
18+
After reaching the UI the first time you can login with username: admin and the random password generated during the installation. You can find the password by running:
19+
20+
kubectl -n {{ .Release.Namespace }} get secret argocd-initial-admin-secret -o jsonpath="{.data.password}" | base64 -d
21+
22+
(You should delete the initial secret afterwards as suggested by the Getting Started Guide: https://github.com/argoproj/argo-cd/blob/master/docs/getting_started.md#4-login-using-the-cli)
Lines changed: 272 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,272 @@
1+
{{/* vim: set filetype=mustache: */}}
2+
{{/*
3+
Expand the name of the chart.
4+
*/}}
5+
{{- define "argo-cd.name" -}}
6+
{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" -}}
7+
{{- end -}}
8+
9+
{{/*
10+
Create a default fully qualified app name.
11+
We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec).
12+
If release name contains chart name it will be used as a full name.
13+
*/}}
14+
{{- define "argo-cd.fullname" -}}
15+
{{- if .Values.fullnameOverride -}}
16+
{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" -}}
17+
{{- else -}}
18+
{{- $name := default .Chart.Name .Values.nameOverride -}}
19+
{{- if contains $name .Release.Name -}}
20+
{{- .Release.Name | trunc 63 | trimSuffix "-" -}}
21+
{{- else -}}
22+
{{- $name | trunc 63 | trimSuffix "-" -}}
23+
{{- end -}}
24+
{{- end -}}
25+
{{- end -}}
26+
27+
{{/*
28+
Create controller name and version as used by the chart label.
29+
*/}}
30+
{{- define "argo-cd.controller.fullname" -}}
31+
{{- printf "%s-%s" (include "argo-cd.fullname" .) .Values.controller.name | trunc 63 | trimSuffix "-" -}}
32+
{{- end -}}
33+
34+
{{/*
35+
Create dex name and version as used by the chart label.
36+
*/}}
37+
{{- define "argo-cd.dex.fullname" -}}
38+
{{- printf "%s-%s" (include "argo-cd.fullname" .) .Values.dex.name | trunc 63 | trimSuffix "-" -}}
39+
{{- end -}}
40+
41+
{{/*
42+
Create redis name and version as used by the chart label.
43+
*/}}
44+
{{- define "argo-cd.redis.fullname" -}}
45+
{{- $redisHa := (index .Values "redis-ha") -}}
46+
{{- $redisHaContext := dict "Chart" (dict "Name" "redis-ha") "Release" .Release "Values" $redisHa -}}
47+
{{- if $redisHa.enabled -}}
48+
{{- if $redisHa.haproxy.enabled -}}
49+
{{- printf "%s-haproxy" (include "redis-ha.fullname" $redisHaContext) | trunc 63 | trimSuffix "-" -}}
50+
{{- end -}}
51+
{{- else -}}
52+
{{- printf "%s-%s" (include "argo-cd.fullname" .) .Values.redis.name | trunc 63 | trimSuffix "-" -}}
53+
{{- end -}}
54+
{{- end -}}
55+
56+
{{/*
57+
Create argocd server name and version as used by the chart label.
58+
*/}}
59+
{{- define "argo-cd.server.fullname" -}}
60+
{{- printf "%s-%s" (include "argo-cd.fullname" .) .Values.server.name | trunc 63 | trimSuffix "-" -}}
61+
{{- end -}}
62+
63+
{{/*
64+
Create argocd repo-server name and version as used by the chart label.
65+
*/}}
66+
{{- define "argo-cd.repoServer.fullname" -}}
67+
{{- printf "%s-%s" (include "argo-cd.fullname" .) .Values.repoServer.name | trunc 63 | trimSuffix "-" -}}
68+
{{- end -}}
69+
70+
{{/*
71+
Create argocd application set name and version as used by the chart label.
72+
*/}}
73+
{{- define "argo-cd.applicationSet.fullname" -}}
74+
{{- printf "%s-%s" (include "argo-cd.fullname" .) .Values.applicationSet.name | trunc 63 | trimSuffix "-" -}}
75+
{{- end -}}
76+
77+
{{/*
78+
Create argocd notifications name and version as used by the chart label.
79+
*/}}
80+
{{- define "argo-cd.notifications.fullname" -}}
81+
{{- printf "%s-%s" (include "argo-cd.fullname" .) .Values.notifications.name | trunc 63 | trimSuffix "-" -}}
82+
{{- end -}}
83+
84+
{{/*
85+
Create the name of the controller service account to use
86+
*/}}
87+
{{- define "argo-cd.controllerServiceAccountName" -}}
88+
{{- if .Values.controller.serviceAccount.create -}}
89+
{{ default (include "argo-cd.controller.fullname" .) .Values.controller.serviceAccount.name }}
90+
{{- else -}}
91+
{{ default "default" .Values.controller.serviceAccount.name }}
92+
{{- end -}}
93+
{{- end -}}
94+
95+
{{/*
96+
Create the name of the dex service account to use
97+
*/}}
98+
{{- define "argo-cd.dexServiceAccountName" -}}
99+
{{- if .Values.dex.serviceAccount.create -}}
100+
{{ default (include "argo-cd.dex.fullname" .) .Values.dex.serviceAccount.name }}
101+
{{- else -}}
102+
{{ default "default" .Values.dex.serviceAccount.name }}
103+
{{- end -}}
104+
{{- end -}}
105+
106+
{{/*
107+
Create the name of the redis service account to use
108+
*/}}
109+
{{- define "argo-cd.redisServiceAccountName" -}}
110+
{{- if .Values.redis.serviceAccount.create -}}
111+
{{ default (include "argo-cd.redis.fullname" .) .Values.redis.serviceAccount.name }}
112+
{{- else -}}
113+
{{ default "default" .Values.redis.serviceAccount.name }}
114+
{{- end -}}
115+
{{- end -}}
116+
117+
{{/*
118+
Create the name of the Argo CD server service account to use
119+
*/}}
120+
{{- define "argo-cd.serverServiceAccountName" -}}
121+
{{- if .Values.server.serviceAccount.create -}}
122+
{{ default (include "argo-cd.server.fullname" .) .Values.server.serviceAccount.name }}
123+
{{- else -}}
124+
{{ default "default" .Values.server.serviceAccount.name }}
125+
{{- end -}}
126+
{{- end -}}
127+
128+
{{/*
129+
Create the name of the repo-server service account to use
130+
*/}}
131+
{{- define "argo-cd.repoServerServiceAccountName" -}}
132+
{{- if .Values.repoServer.serviceAccount.create -}}
133+
{{ default (include "argo-cd.repoServer.fullname" .) .Values.repoServer.serviceAccount.name }}
134+
{{- else -}}
135+
{{ default "default" .Values.repoServer.serviceAccount.name }}
136+
{{- end -}}
137+
{{- end -}}
138+
139+
{{/*
140+
Create the name of the application set service account to use
141+
*/}}
142+
{{- define "argo-cd.applicationSetServiceAccountName" -}}
143+
{{- if .Values.applicationSet.serviceAccount.create -}}
144+
{{ default (include "argo-cd.applicationSet.fullname" .) .Values.applicationSet.serviceAccount.name }}
145+
{{- else -}}
146+
{{ default "default" .Values.applicationSet.serviceAccount.name }}
147+
{{- end -}}
148+
{{- end -}}
149+
150+
{{/*
151+
Create the name of the notifications service account to use
152+
*/}}
153+
{{- define "argo-cd.notificationsServiceAccountName" -}}
154+
{{- if .Values.notifications.serviceAccount.create -}}
155+
{{ default (include "argo-cd.notifications.fullname" .) .Values.notifications.serviceAccount.name }}
156+
{{- else -}}
157+
{{ default "default" .Values.notifications.serviceAccount.name }}
158+
{{- end -}}
159+
{{- end -}}
160+
161+
{{/*
162+
Create the name of the notifications bots slack service account to use
163+
*/}}
164+
{{- define "argo-cd.notificationsBotsSlackServiceAccountName" -}}
165+
{{- if .Values.notifications.bots.slack.serviceAccount.create -}}
166+
{{ default (include "argo-cd.notifications.fullname" .) .Values.notifications.bots.slack.serviceAccount.name }}
167+
{{- else -}}
168+
{{ default "default" .Values.notifications.bots.slack.serviceAccount.name }}
169+
{{- end -}}
170+
{{- end -}}
171+
172+
{{/*
173+
Create chart name and version as used by the chart label.
174+
*/}}
175+
{{- define "argo-cd.chart" -}}
176+
{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" -}}
177+
{{- end -}}
178+
179+
{{/*
180+
Common labels
181+
*/}}
182+
{{- define "argo-cd.labels" -}}
183+
helm.sh/chart: {{ include "argo-cd.chart" .context }}
184+
{{ include "argo-cd.selectorLabels" (dict "context" .context "component" .component "name" .name) }}
185+
app.kubernetes.io/managed-by: {{ .context.Release.Service }}
186+
app.kubernetes.io/part-of: argocd
187+
{{- with .context.Values.global.additionalLabels }}
188+
{{ toYaml . }}
189+
{{- end }}
190+
{{- end }}
191+
192+
{{/*
193+
Selector labels
194+
*/}}
195+
{{- define "argo-cd.selectorLabels" -}}
196+
{{- if .name -}}
197+
app.kubernetes.io/name: {{ include "argo-cd.name" .context }}-{{ .name }}
198+
{{ end -}}
199+
app.kubernetes.io/instance: {{ .context.Release.Name }}
200+
{{- if .component }}
201+
app.kubernetes.io/component: {{ .component }}
202+
{{- end }}
203+
{{- end }}
204+
205+
{{/*
206+
Return the appropriate apiVersion for ingress
207+
*/}}
208+
{{- define "argo-cd.ingress.apiVersion" -}}
209+
{{- if .Values.apiVersionOverrides.ingress -}}
210+
{{- print .Values.apiVersionOverrides.ingress -}}
211+
{{- else if semverCompare "<1.14-0" (include "argo-cd.kubeVersion" $) -}}
212+
{{- print "extensions/v1beta1" -}}
213+
{{- else if semverCompare "<1.19-0" (include "argo-cd.kubeVersion" $) -}}
214+
{{- print "networking.k8s.io/v1beta1" -}}
215+
{{- else -}}
216+
{{- print "networking.k8s.io/v1" -}}
217+
{{- end -}}
218+
{{- end -}}
219+
220+
{{/*
221+
Return the target Kubernetes version
222+
*/}}
223+
{{- define "argo-cd.kubeVersion" -}}
224+
{{- default .Capabilities.KubeVersion.Version .Values.kubeVersionOverride }}
225+
{{- end -}}
226+
227+
{{/*
228+
Argo Configuration Preset Values (Incluenced by Values configuration)
229+
*/}}
230+
{{- define "argo-cd.config.presets" -}}
231+
{{- if .Values.configs.styles }}
232+
ui.cssurl: "./custom/custom.styles.css"
233+
{{- end }}
234+
{{- end -}}
235+
236+
{{/*
237+
Merge Argo Configuration with Preset Configuration
238+
*/}}
239+
{{- define "argo-cd.config" -}}
240+
{{- if .Values.server.configEnabled -}}
241+
{{- toYaml (mergeOverwrite (default dict (fromYaml (include "argo-cd.config.presets" $))) .Values.server.config) }}
242+
{{- end -}}
243+
{{- end -}}
244+
245+
{{/*
246+
Return the default Argo CD app version
247+
*/}}
248+
{{- define "argo-cd.defaultTag" -}}
249+
{{- default .Chart.AppVersion .Values.global.image.tag }}
250+
{{- end -}}
251+
252+
{{/*
253+
Create the name of the notifications controller secret to use
254+
*/}}
255+
{{- define "argo-cd.notifications.secretName" -}}
256+
{{- if .Values.notifications.secret.create -}}
257+
{{ default (printf "%s-secret" (include "argo-cd.notifications.fullname" .)) .Values.notifications.secret.name }}
258+
{{- else -}}
259+
{{ default "argocd-notifications-secret" .Values.notifications.secret.name }}
260+
{{- end -}}
261+
{{- end -}}
262+
263+
{{/*
264+
Create the name of the configmap to use
265+
*/}}
266+
{{- define "argo-cd.notifications.configMapName" -}}
267+
{{- if .Values.notifications.cm.create -}}
268+
{{ default (printf "%s-cm" (include "argo-cd.notifications.fullname" .)) .Values.notifications.cm.name }}
269+
{{- else -}}
270+
{{ default "argocd-notifications-cm" .Values.notifications.cm.name }}
271+
{{- end -}}
272+
{{- end -}}
Lines changed: 67 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
{{- if .Values.createAggregateRoles }}
2+
apiVersion: rbac.authorization.k8s.io/v1
3+
kind: ClusterRole
4+
metadata:
5+
name: {{ include "argo-cd.fullname" . }}-aggregate-to-view
6+
labels:
7+
rbac.authorization.k8s.io/aggregate-to-view: "true"
8+
{{- include "argo-cd.labels" (dict "context" .) | nindent 4 }}
9+
rules:
10+
- apiGroups:
11+
- argoproj.io
12+
resources:
13+
- applications
14+
- appprojects
15+
verbs:
16+
- get
17+
- list
18+
- watch
19+
20+
---
21+
apiVersion: rbac.authorization.k8s.io/v1
22+
kind: ClusterRole
23+
metadata:
24+
name: {{ include "argo-cd.fullname" . }}-aggregate-to-edit
25+
labels:
26+
rbac.authorization.k8s.io/aggregate-to-edit: "true"
27+
{{- include "argo-cd.labels" (dict "context" .) | nindent 4 }}
28+
rules:
29+
- apiGroups:
30+
- argoproj.io
31+
resources:
32+
- applications
33+
- appprojects
34+
verbs:
35+
- create
36+
- delete
37+
- deletecollection
38+
- get
39+
- list
40+
- patch
41+
- update
42+
- watch
43+
44+
---
45+
apiVersion: rbac.authorization.k8s.io/v1
46+
kind: ClusterRole
47+
metadata:
48+
name: {{ include "argo-cd.fullname" . }}-aggregate-to-admin
49+
labels:
50+
rbac.authorization.k8s.io/aggregate-to-admin: "true"
51+
{{- include "argo-cd.labels" (dict "context" .) | nindent 4 }}
52+
rules:
53+
- apiGroups:
54+
- argoproj.io
55+
resources:
56+
- applications
57+
- appprojects
58+
verbs:
59+
- create
60+
- delete
61+
- deletecollection
62+
- get
63+
- list
64+
- patch
65+
- update
66+
- watch
67+
{{- end }}
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
{{- if .Values.controller.clusterAdminAccess.enabled }}
2+
apiVersion: rbac.authorization.k8s.io/v1
3+
kind: ClusterRole
4+
metadata:
5+
name: {{ template "argo-cd.controller.fullname" . }}
6+
labels:
7+
{{- include "argo-cd.labels" (dict "context" . "component" .Values.controller.name "name" .Values.controller.name) | nindent 4 }}
8+
rules:
9+
{{- if .Values.controller.clusterRoleRules.enabled }}
10+
{{- toYaml .Values.controller.clusterRoleRules.rules | nindent 0 }}
11+
{{- else }}
12+
- apiGroups:
13+
- '*'
14+
resources:
15+
- '*'
16+
verbs:
17+
- '*'
18+
- nonResourceURLs:
19+
- '*'
20+
verbs:
21+
- '*'
22+
{{- end }}
23+
{{- end }}

0 commit comments

Comments
 (0)