Skip to content

Commit 07bc686

Browse files
committed
quotes added to IAM_VERSION var
1 parent b410856 commit 07bc686

File tree

2 files changed

+11
-10
lines changed

2 files changed

+11
-10
lines changed

Dockerfile

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
FROM amazon/aws-cli:latest
22

33
RUN yum install jq -y && curl -sL -o /usr/bin/kubectl https://storage.googleapis.com/kubernetes-release/release/$(curl -s https://storage.googleapis.com/kubernetes-release/release/stable.txt)/bin/linux/amd64/kubectl && \
4-
curl -sL -o /usr/local/bin/aws-iam-authenticator $(curl -s https://api.github.com/repos/kubernetes-sigs/aws-iam-authenticator/releases/latest | jq -r ' .assets[] | select(.name | contains("linux_amd64") )' | jq -r '.browser_download_url') && \
5-
chmod +x /usr/local/bin/aws-iam-authenticator && \
4+
curl -sL -o /usr/bin/aws-iam-authenticator $(curl -s https://api.github.com/repos/kubernetes-sigs/aws-iam-authenticator/releases/latest | jq -r ' .assets[] | select(.name | contains("linux_amd64") )' | jq -r '.browser_download_url') && \
5+
chmod +x /usr/bin/aws-iam-authenticator && \
66
chmod +x /usr/bin/kubectl
77

88
COPY entrypoint.sh /entrypoint.sh

entrypoint.sh

+9-8
Original file line numberDiff line numberDiff line change
@@ -10,20 +10,21 @@ if [ -z ${KUBECTL_VERSION+x} ] ; then
1010
echo "Using kubectl version: $(kubectl version --client --short)"
1111
else
1212
echo "Pulling kubectl for version $KUBECTL_VERSION"
13-
rm /usr/bin/kubectl
14-
curl -sL -o /usr/bin/kubectl https://storage.googleapis.com/kubernetes-release/release/$KUBECTL_VERSION/bin/linux/amd64/kubectl && \
13+
rm /usr/bin/kubectl
14+
curl -sL -o /usr/bin/kubectl https://storage.googleapis.com/kubernetes-release/release/"$KUBECTL_VERSION"/bin/linux/amd64/kubectl && \
1515
chmod +x /usr/bin/kubectl
1616
echo "Using kubectl version: $(kubectl version --client --short)"
1717
fi
1818

1919
if [ -z ${IAM_VERSION+x} ] ; then
20-
echo "Using aws-iam-authenticator version: v$(aws-iam-authenticator version)"
20+
echo "Using aws-iam-authenticator version: $(aws-iam-authenticator version)"
2121
else
22-
echo "Pulling aws-iam-authenticator for version v$IAM_VERSION"
23-
rm /usr/local/bin/aws-iam-authenticator
24-
curl -sL -o /usr/local/bin/aws-iam-authenticator https://github.com/kubernetes-sigs/aws-iam-authenticator/releases/download/v$IAM_VERSION/aws-iam-authenticator_$IAM_VERSION_linux_amd64 && \
25-
chmod +x /usr/local/bin/aws-iam-authenticator
26-
echo "Using aws-iam-authenticator version: v$(aws-iam-authenticator version)"
22+
echo "Pulling aws-iam-authenticator for version $IAM_VERSION"
23+
rm /usr/bin/aws-iam-authenticator
24+
curl -sL -o /usr/bin/aws-iam-authenticator https://github.com/kubernetes-sigs/aws-iam-authenticator/releases/download/v"$IAM_VERSION"/aws-iam-authenticator_"$IAM_VERSION"_linux_amd64 && \
25+
chmod +x /usr/bin/aws-iam-authenticator
26+
echo "Using aws-iam-authenticator version: $(aws-iam-authenticator version)"
2727
fi
2828

2929
sh -c "kubectl $*"
30+
#sh -c "which aws-iam-authenticator"

0 commit comments

Comments
 (0)