Fix deploying with sa

This commit is contained in:
riesinger 2019-02-12 19:24:50 -08:00
parent a5776c44e9
commit c5abdcb6f1
No known key found for this signature in database
GPG Key ID: 9E0CA69C7514EBD5
2 changed files with 2 additions and 2 deletions

View File

@ -1,4 +1,4 @@
FROM alpine:3.4 FROM alpine:latest
RUN apk --no-cache add curl ca-certificates bash RUN apk --no-cache add curl ca-certificates bash
RUN curl -Lo /usr/local/bin/kubectl https://storage.googleapis.com/kubernetes-release/release/$(curl -s https://storage.googleapis.com/kubernetes-release/release/stable.txt)/bin/linux/amd64/kubectl RUN curl -Lo /usr/local/bin/kubectl https://storage.googleapis.com/kubernetes-release/release/$(curl -s https://storage.googleapis.com/kubernetes-release/release/stable.txt)/bin/linux/amd64/kubectl
RUN chmod +x /usr/local/bin/kubectl RUN chmod +x /usr/local/bin/kubectl

View File

@ -20,7 +20,7 @@ if [ ! -z ${PLUGIN_KUBERNETES_CERT} ]; then
KUBERNETES_CERT=${PLUGIN_KUBERNETES_CERT} KUBERNETES_CERT=${PLUGIN_KUBERNETES_CERT}
fi fi
kubectl config set-credentials default --token=${KUBERNETES_TOKEN} kubectl config set-credentials $PLUGIN_KUBERNETES_USER --token=${KUBERNETES_TOKEN}
if [ ! -z ${KUBERNETES_CERT} ]; then if [ ! -z ${KUBERNETES_CERT} ]; then
echo ${KUBERNETES_CERT} | base64 -d > ca.crt echo ${KUBERNETES_CERT} | base64 -d > ca.crt
kubectl config set-cluster default --server=${KUBERNETES_SERVER} --certificate-authority=ca.crt kubectl config set-cluster default --server=${KUBERNETES_SERVER} --certificate-authority=ca.crt