-
Notifications
You must be signed in to change notification settings - Fork 12
/
Copy pathargocd.sh
executable file
·88 lines (76 loc) · 1.92 KB
/
argocd.sh
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
#!/usr/bin/env bash
set -e
# CONSTANTS
readonly DNSMASQ_DOMAIN=kind.cluster
# FUNCTIONS
log(){
echo "---------------------------------------------------------------------------------------"
echo $1
echo "---------------------------------------------------------------------------------------"
}
argocd(){
log "ARGOCD ..."
helm upgrade --install --wait --timeout 15m --atomic --namespace argocd --create-namespace \
--repo https://argoproj.github.io/argo-helm argocd argo-cd --values - <<EOF
dex:
enabled: false
redis:
enabled: true
redis-ha:
enabled: false
repoServer:
serviceAccount:
create: true
server:
volumeMounts:
- mountPath: /etc/ssl/certs/root-ca.pem
name: opt-ca-certificates
readOnly: true
volumes:
- name: opt-ca-certificates
hostPath:
path: /opt/ca-certificates/root-ca.pem
type: File
config:
url: https://argocd.$DNSMASQ_DOMAIN
application.instanceLabelKey: argocd.argoproj.io/instance
admin.enabled: 'false'
resource.exclusions: |
- apiGroups:
- cilium.io
kinds:
- CiliumIdentity
clusters:
- '*'
resource.compareoptions: |
ignoreResourceStatusField: all
oidc.config: |
name: Keycloak
issuer: https://keycloak.$DNSMASQ_DOMAIN/auth/realms/master
clientID: argocd
clientSecret: argocd-client-secret
requestedScopes: ['openid', 'profile', 'email', 'groups']
rbacConfig:
policy.default: role:readonly
policy.csv: |
g, argocd-admin, role:admin
extraArgs:
- --insecure
ingress:
annotations:
kubernetes.io/ingress.class: nginx
cert-manager.io/cluster-issuer: ca-issuer
enabled: true
hosts:
- argocd.$DNSMASQ_DOMAIN
tls:
- secretName: argocd.$DNSMASQ_DOMAIN
hosts:
- argocd.$DNSMASQ_DOMAIN
EOF
}
# RUN
argocd
# DONE
log "ARGOCD READY !"
echo "ARGOCD: https://argocd.$DNSMASQ_DOMAIN"