4 TILLER_SA_RBAC=~/tiller-rbac.yaml
5 if [ "$(uname -m)" == 'aarch64' ]; then
11 URI_ROOT='https://storage.googleapis.com/kubernetes-helm'
12 TGZ_NAME="helm-${VERSION}-${FLAVOR}.tar.gz"
14 if [ ! -e /usr/bin/helm ] || [ ! -e /usr/bin/tiller ]; then
15 wget -O "/tmp/${TGZ_NAME}" "${URI_ROOT}/${TGZ_NAME}"
16 sudo tar xpPf "/tmp/${TGZ_NAME}" --overwrite \
17 --transform "s|${FLAVOR}|/usr/bin|" "${FLAVOR}/"{helm,tiller}
18 rm -f "/tmp/${TGZ_NAME}"
21 if ! kubectl get serviceaccounts --namespace=kube-system | grep -q tiller; then
22 cat <<EOF > "${TILLER_SA_RBAC}"
27 namespace: kube-system
29 apiVersion: rbac.authorization.k8s.io/v1
30 kind: ClusterRoleBinding
34 apiGroup: rbac.authorization.k8s.io
38 - kind: ServiceAccount
40 namespace: kube-system
42 kubectl create -f "${TILLER_SA_RBAC}"
43 helm init --service-account tiller --tiller-image="jessestuart/tiller:${VERSION}"