Skip to content
This repository was archived by the owner on Apr 27, 2020. It is now read-only.

Commit 0cc29ef

Browse files
Use aws-iam-authenticator which is specified the version (#77)
1 parent 0241270 commit 0cc29ef

File tree

3 files changed

+21
-8
lines changed

3 files changed

+21
-8
lines changed

Dockerfile

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,26 @@
1-
FROM golang:1.12
2-
3-
RUN set -x && \
4-
GO111MODULE=on go get -u -v github.com/kubernetes-sigs/aws-iam-authenticator/cmd/aws-iam-authenticator
5-
61
FROM ubuntu:18.04
72

83
MAINTAINER Kazuki Suda <ksuda@zlab.co.jp>
94

105
ARG KUBERNETES_VERSION=
116

7+
# Do NOT update the next line manually, please use ./scripts/update-aws-iam-authenticator.sh instead
8+
ARG AWS_IAM_AUTHENTICATOR_VERSION=v0.4.0
9+
1210
RUN set -x && \
1311
apt-get update && \
1412
apt-get install -y jq curl && \
13+
# Download and install kubectl
1514
[ -z "$KUBERNETES_VERSION" ] && KUBERNETES_VERSION=$(curl -s https://storage.googleapis.com/kubernetes-release/release/stable.txt) ||: && \
1615
curl -s -LO https://storage.googleapis.com/kubernetes-release/release/${KUBERNETES_VERSION}/bin/linux/amd64/kubectl && \
1716
chmod +x ./kubectl && \
1817
mv ./kubectl /usr/local/bin/kubectl && \
1918
kubectl version --client && \
19+
# Download and install aws-iam-authenticator
20+
curl -s -L -o /usr/local/bin/aws-iam-authenticator "https://github.com/kubernetes-sigs/aws-iam-authenticator/releases/download/${AWS_IAM_AUTHENTICATOR_VERSION}/aws-iam-authenticator_$(echo "$AWS_IAM_AUTHENTICATOR_VERSION" | tr -d v)_linux_amd64" && \
21+
chmod +x /usr/local/bin/aws-iam-authenticator && \
22+
aws-iam-authenticator version && \
2023
rm -rf /var/lib/apt/lists/*
2124

22-
COPY --from=0 /go/bin/aws-iam-authenticator /usr/local/bin/
23-
2425
RUN mkdir -p /opt/resource
2526
COPY assets/* /opt/resource/

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
A Concourse resource for controlling the Kubernetes cluster.
66

7-
*This resource supports AWS EKS.*
7+
*This resource supports AWS EKS. (kubernetes-sigs/aws-iam-authenticator@v0.4.0)*
88

99
## Versions
1010

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
#!/usr/bin/env bash
2+
3+
set -e -o pipefail; [[ -n "$DEBUG" ]] && set -x
4+
5+
AWS_IAM_AUTHENTICATOR_VERSION="$1"
6+
if [[ -z "$AWS_IAM_AUTHENTICATOR_VERSION" ]]; then
7+
echo "Usage: $0 <version>" >&2
8+
exit 1
9+
fi
10+
11+
sed -i -e "s/^ARG AWS_IAM_AUTHENTICATOR_VERSION=v[0-9\.]*$/ARG AWS_IAM_AUTHENTICATOR_VERSION=$AWS_IAM_AUTHENTICATOR_VERSION/" Dockerfile
12+
sed -i -e "s/aws-iam-authenticator@v[0-9\.]*/aws-iam-authenticator@${AWS_IAM_AUTHENTICATOR_VERSION}/" README.md

0 commit comments

Comments
 (0)