-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathflux.sh
34 lines (28 loc) · 1.09 KB
/
flux.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
#!/bin/bash
GIT_REPO="[email protected]:iflan7744/gitops.git"
#KNOWN_HOSTS_FILE=$1
KEY_FILE=$1 #ssh-keygen private key
# setup flux namespace if not already created
kubectl apply -f /root/flux/namespace.yaml
# setup secret for KEY_FILE
kubectl create -n flux secret generic flux-git-deploy --from-file=identity=${KEY_FILE}
kubectl create -n flux secret generic helm-git-deploy --from-file=identity=${KEY_FILE}
# helm install
helm install flux \
--wait \
--version=0.6.2 \
--set image.repository=weaveworks/flux \
--set helmOperator.repository=weaveworks/helm-operator \
--set helmOperator.create=true \
--set helmOperator.createCRD=true \
--set git.url="${GIT_REPO}" \
--set git.branch=master \
--set git.user="iflan7744" \
--set git.email="[email protected]" \
--set git.path="cluster" \
--set git.pollInterval=3m \
--set git.secretName=flux-git-deploy \
--set memcached.maxItemSize=2m \
--set helmOperator.configureRepositories.enable=false \
--namespace flux \
fluxcd/flux