Skip to content

Commit

Permalink
chore(os): Update download location and get the kubectl the same betw…
Browse files Browse the repository at this point in the history
…een ubuntu and slim (#6003)

* chore(os): Update download location and get the kubectl the same between ubuntu and slim

* chore(docs): remove no longer needed TODO

* chore(os): Set iam authenticator version
  • Loading branch information
jasonmcintosh authored Aug 25, 2023
1 parent 076d5d2 commit 8eaedfc
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 5 deletions.
2 changes: 1 addition & 1 deletion Dockerfile.slim
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ RUN [ $TARGETARCH == 'amd64' ] && export GCP_ARCH="x86_64" || export GCP_ARCH="
&& rm -rf /opt/google-cloud-sdk/.install/.backup

# kubectl + AWS IAM authenticator
RUN wget https://storage.googleapis.com/kubernetes-release/release/v${KUBECTL_RELEASE}/bin/linux/${TARGETARCH}/kubectl \
RUN wget https://cdn.dl.k8s.io/release/v${KUBECTL_RELEASE}/bin/linux/${TARGETARCH}/kubectl \
&& chmod +x kubectl \
&& mv ./kubectl /usr/local/bin/kubectl \
&& wget -O aws-iam-authenticator https://github.com/kubernetes-sigs/aws-iam-authenticator/releases/download/v${AWS_AIM_AUTHENTICATOR_VERSION}/aws-iam-authenticator_${AWS_AIM_AUTHENTICATOR_VERSION}_linux_${TARGETARCH} \
Expand Down
14 changes: 10 additions & 4 deletions Dockerfile.ubuntu
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,10 @@ LABEL maintainer="[email protected]"
ARG TARGETARCH
ENV GOOGLE_CLOUD_SDK_VERSION=412.0.0
ENV PATH "$PATH:/opt/google-cloud-sdk/bin/"
ENV KUBECTL_RELEASE=1.22.17
ENV AWS_CLI_VERSION=1.22
ENV AWS_CLI_S3_CMD=2.0.2
ENV AWS_AIM_AUTHENTICATOR_VERSION=0.5.9

RUN apt-get update && apt-get install -y curl gnupg && \
curl -s https://packages.cloud.google.com/apt/doc/apt-key.gpg | apt-key add - && \
Expand All @@ -14,7 +16,6 @@ RUN apt-get update && apt-get install -y curl gnupg && \
apt-get install -y \
openjdk-11-jre-headless \
wget \
kubectl \
python3-pip \
python3 \
git \
Expand All @@ -25,9 +26,14 @@ RUN apt-get update && apt-get install -y curl gnupg && \
RUN pip install --upgrade --no-build-isolation awscli==${AWS_CLI_VERSION} s3cmd==${AWS_CLI_S3_CMD} python-magic \
&& apt remove -y python3-pip

RUN curl -o /usr/local/bin/aws-iam-authenticator https://amazon-eks.s3.us-west-2.amazonaws.com/1.16.8/2020-04-16/bin/linux/${TARGETARCH}/aws-iam-authenticator && \
chmod +x /usr/local/bin/aws-iam-authenticator && \
ln -s /usr/local/bin/aws-iam-authenticator /usr/local/bin/heptio-authenticator-aws
# kubectl + AWS IAM authenticator
RUN wget https://cdn.dl.k8s.io/release/v${KUBECTL_RELEASE}/bin/linux/${TARGETARCH}/kubectl \
&& chmod +x kubectl \
&& mv ./kubectl /usr/local/bin/kubectl \
&& wget -O aws-iam-authenticator https://github.com/kubernetes-sigs/aws-iam-authenticator/releases/download/v${AWS_AIM_AUTHENTICATOR_VERSION}/aws-iam-authenticator_${AWS_AIM_AUTHENTICATOR_VERSION}_linux_${TARGETARCH} \
&& chmod +x ./aws-iam-authenticator \
&& mv ./aws-iam-authenticator /usr/local/bin/aws-iam-authenticator\
&& ln -sf /usr/local/bin/aws-iam-authenticator /usr/local/bin/heptio-authenticator-aws

# Google cloud SDK
RUN [ $TARGETARCH == 'amd64' ] && export GCP_ARCH="x86_64" || export GCP_ARCH="arm" \
Expand Down

0 comments on commit 8eaedfc

Please sign in to comment.