-
Notifications
You must be signed in to change notification settings - Fork 1
/
tiller-init.sh
executable file
·37 lines (25 loc) · 949 Bytes
/
tiller-init.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
#!/bin/bash
#!/bin/bash
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"
TILLER_NAMESPACE="tiller"
TILLER_SERVICE_ACCOUNT="tiller"
kubectl create namespace ${TILLER_NAMESPACE}
kubectl create serviceaccount -n ${TILLER_NAMESPACE} ${TILLER_SERVICE_ACCOUNT}
kubectl create clusterrolebinding tiller-cluster-admin --clusterrole=cluster-admin --serviceaccount="${TILLER_NAMESPACE}:${TILLER_SERVICE_ACCOUNT}"
##
## EXIT. This is not working with the new pki layout yet
##
exit 0
CA_CERT=pki/ca/intermediate/certs/ca-chain.cert.pem
# need to get the latest server cert
TILLER_KEY=pki/tiller/private/tiller.key.pem
TILLER_CERT=pki/tiller/tiller.cert.pem
#helm init --dry-run --debug \
helm init \
--tiller-namespace ${TILLER_NAMESPACE} \
--service-account ${TILLER_SERVICE_ACCOUNT} \
--tiller-tls \
--tiller-tls-cert $TILLER_CERT \
--tiller-tls-key $TILLER_KEY \
--tiller-tls-verify \
--tls-ca-cert $CA_CERT