Fix deploying with sa
This commit is contained in:
parent
a5776c44e9
commit
c5abdcb6f1
|
@ -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
|
||||||
|
|
|
@ -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
|
||||||
|
|
Loading…
Reference in New Issue