This commit is contained in:
Pascal Riesinger 2019-06-07 08:29:05 +00:00 committed by GitHub
commit 3d9febb426
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
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