From e598a66c5e738e931b4607cbcd2e4f9e2fc7dacc Mon Sep 17 00:00:00 2001 From: Bret Fisher Date: Fri, 14 Jan 2022 16:00:57 -0500 Subject: [PATCH 01/17] avoid apk cache in file image --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 2ee5e11..597f0c2 100644 --- a/Dockerfile +++ b/Dockerfile @@ -118,7 +118,7 @@ RUN helper-curl tar tilt \ FROM alpine AS shpod ENV COMPLETIONS=/usr/share/bash-completion/completions -RUN apk add apache2-utils bash bash-completion curl docker-cli file git iputils jq libintl ncurses openssh openssl sudo tmux tree vim yq +RUN apk add --no-cache apache2-utils bash bash-completion curl docker-cli file git iputils jq libintl ncurses openssh openssl sudo tmux tree vim yq COPY --from=compose /usr/local/bin/docker-compose /usr/local/bin COPY --from=crane /usr/local/bin/crane /usr/local/bin From cda2343f6ce0fad3106b342bd4ce41ca42714004 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=B4me=20Petazzoni?= Date: Tue, 12 Apr 2022 20:44:38 +0200 Subject: [PATCH 02/17] =?UTF-8?q?=E2=99=BB=EF=B8=8F=20=20Update=20kubeseal?= =?UTF-8?q?=20version;=20don't=20install=20krew=20on=20ia32?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Dockerfile | 13 ++++++++----- helper-curl | 5 ----- 2 files changed, 8 insertions(+), 10 deletions(-) diff --git a/Dockerfile b/Dockerfile index 2ee5e11..aeaed01 100644 --- a/Dockerfile +++ b/Dockerfile @@ -64,9 +64,9 @@ RUN cp $(find bin -name kube-linter) /usr/local/bin # https://github.com/bitnami-labs/sealed-secrets/releases FROM builder AS kubeseal -ARG KUBESEAL_VERSION=0.16.0 -RUN helper-curl bin kubeseal \ - https://github.com/bitnami-labs/sealed-secrets/releases/download/v$KUBESEAL_VERSION/kubeseal-@KSARCH +ARG KUBESEAL_VERSION=0.17.4 +RUN helper-curl tar kubeseal \ + https://github.com/bitnami-labs/sealed-secrets/releases/download/v$KUBESEAL_VERSION/kubeseal-$KUBESEAL_VERSION-linux-@GOARCH.tar.gz # https://github.com/kubernetes-sigs/kustomize/releases FROM builder AS kustomize @@ -173,12 +173,15 @@ RUN echo k8s:x:1000: >> /etc/group \ && chown -R k8s:k8s /home/k8s/ \ && sed -i 's/#MaxAuthTries 6/MaxAuthTries 42/' /etc/ssh/sshd_config ARG TARGETARCH -RUN mkdir /tmp/krew \ +RUN \ + if [ "$TARGETARCH" != "386" ]; then \ + mkdir /tmp/krew \ && cd /tmp/krew \ && curl -fsSL https://github.com/kubernetes-sigs/krew/releases/latest/download/krew-linux_$TARGETARCH.tar.gz | tar -zxf- \ && sudo -u k8s -H ./krew-linux_$TARGETARCH install krew \ && cd \ - && rm -rf /tmp/krew + && rm -rf /tmp/krew \ + ; fi COPY --chown=1000:1000 bash_profile /home/k8s/.bash_profile COPY --chown=1000:1000 vimrc /home/k8s/.vimrc COPY motd /etc/motd diff --git a/helper-curl b/helper-curl index 1e9d070..120c83e 100755 --- a/helper-curl +++ b/helper-curl @@ -9,26 +9,22 @@ URL=$3 case $TARGETARCH in amd64) GOARCH=amd64 - KSARCH=linux-amd64 UARCH=x86_64 WTFARCH=x86_64 ;; arm64) GOARCH=arm64 - KSARCH=arm64 UARCH=aarch64 WTFARCH=arm64 ;; arm) GOARCH=arm - KSARCH=arm UARCH=armv7 WTFARCH=arm ;; *) echo "Unsupported architecture: $TARGETARCH." GOARCH=$TARGETARCH - KSARCH=$TARGETARCH UARCH=$TARGETARCH WTFARCH=$TARGETARCH ;; @@ -37,7 +33,6 @@ esac mangle() { echo $1 | sed \ -e s/@GOARCH/$GOARCH/g \ - -e s/@KSARCH/$KSARCH/g \ -e s/@UARCH/$UARCH/g \ -e s/@WTFARCH/$WTFARCH/g \ # From e4eabb6cb9b5629fef3c2de1544585bb87f37d10 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=B4me=20Petazzoni?= Date: Fri, 9 Sep 2022 07:14:40 +0200 Subject: [PATCH 03/17] =?UTF-8?q?=E2=9E=95=20Add=20gettext=20so=20we=20hav?= =?UTF-8?q?e=20envsubst=20in=20the=20image?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Dockerfile | 3 ++- README.md | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index aeaed01..1a09678 100644 --- a/Dockerfile +++ b/Dockerfile @@ -118,7 +118,7 @@ RUN helper-curl tar tilt \ FROM alpine AS shpod ENV COMPLETIONS=/usr/share/bash-completion/completions -RUN apk add apache2-utils bash bash-completion curl docker-cli file git iputils jq libintl ncurses openssh openssl sudo tmux tree vim yq +RUN apk add apache2-utils bash bash-completion curl docker-cli file gettext git iputils jq libintl ncurses openssh openssl sudo tmux tree vim yq COPY --from=compose /usr/local/bin/docker-compose /usr/local/bin COPY --from=crane /usr/local/bin/crane /usr/local/bin @@ -193,6 +193,7 @@ RUN ( \ bash --version | head -n1 ;\ curl --version | head -n1 ;\ docker version --format="Docker {{.Client.Version}}" ;\ + envsubst --version | head -n1 ;\ git --version ;\ jq --version ;\ ssh -V ;\ diff --git a/README.md b/README.md index 4f5e93e..74fe3e9 100644 --- a/README.md +++ b/README.md @@ -23,6 +23,7 @@ It includes: - curl - Docker CLI - Docker Compose +- envsubst - git - Helm - jid From c50d117192f1e015747fa77233a2b133b7904419 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=B4me=20Petazzoni?= Date: Tue, 4 Oct 2022 17:04:37 +0200 Subject: [PATCH 04/17] =?UTF-8?q?=E2=9E=95=20Add=20ytt?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Dockerfile | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 1a09678..691fb6c 100644 --- a/Dockerfile +++ b/Dockerfile @@ -110,12 +110,18 @@ ARG STERN_VERSION=1.20.1 RUN helper-curl tar "--strip-components=1 stern_${STERN_VERSION}_linux_@GOARCH/stern" \ https://github.com/stern/stern/releases/download/v${STERN_VERSION}/stern_${STERN_VERSION}_linux_@GOARCH.tar.gz -# https://github.com/tilt-dev/tilt/releases/ +# https://github.com/tilt-dev/tilt/releases FROM builder AS tilt ARG TILT_VERSION=0.23.0 RUN helper-curl tar tilt \ https://github.com/tilt-dev/tilt/releases/download/v${TILT_VERSION}/tilt.${TILT_VERSION}.linux.@WTFARCH.tar.gz +# https://github.com/vmware-tanzu/carvel-ytt/releases +FROM builder AS ytt +ARG YTT_VERSION=0.43.0 +RUN helper-curl bin ytt \ + https://github.com/vmware-tanzu/carvel-ytt/releases/download/v${YTT_VERSION}/ytt-linux-@GOARCH + FROM alpine AS shpod ENV COMPLETIONS=/usr/share/bash-completion/completions RUN apk add apache2-utils bash bash-completion curl docker-cli file gettext git iputils jq libintl ncurses openssh openssl sudo tmux tree vim yq @@ -137,6 +143,7 @@ COPY --from=ship /usr/local/bin/ship /usr/local/bin COPY --from=skaffold /usr/local/bin/skaffold /usr/local/bin COPY --from=stern /usr/local/bin/stern /usr/local/bin COPY --from=tilt /usr/local/bin/tilt /usr/local/bin +COPY --from=ytt /usr/local/bin/ytt /usr/local/bin RUN set -e ; for BIN in \ crane \ @@ -147,6 +154,7 @@ RUN set -e ; for BIN in \ regctl \ skaffold \ tilt \ + ytt \ ; do echo $BIN ; $BIN completion bash > $COMPLETIONS/$BIN.bash ; done ;\ yq shell-completion bash > $COMPLETIONS/yq.bash From 27a7cd7de04b809d3280e94e8e95148b7e5d5fff Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=B4me=20Petazzoni?= Date: Wed, 19 Oct 2022 16:52:51 +0200 Subject: [PATCH 05/17] =?UTF-8?q?=F0=9F=94=92=EF=B8=8F=20Fix=20kubeconfig?= =?UTF-8?q?=20permissions?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- bash_profile | 3 +++ 1 file changed, 3 insertions(+) diff --git a/bash_profile b/bash_profile index 68c95e6..90af726 100644 --- a/bash_profile +++ b/bash_profile @@ -6,6 +6,9 @@ if ! [ -f ~/.kube/config ]; then # We need to access the Kubernetes API, so we'll do it # using the well-known endpoint. ( + # Make sure that the file will have locked-down permissions. + # (Some tools like Helm will complain about it otherwise.) + umask 077 export KUBERNETES_SERVICE_HOST=kubernetes.default.svc export KUBERNETES_SERVICE_PORT=443 if kubectl get configmap kubeconfig >&/dev/null; then From 355265c4ff5f647e2decf9451a30b9431a0eb471 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=B4me=20Petazzoni?= Date: Tue, 1 Nov 2022 09:52:31 +0100 Subject: [PATCH 06/17] =?UTF-8?q?=E2=99=BB=EF=B8=8F=20=20Update=20versions?= =?UTF-8?q?=20across=20the=20board?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Dockerfile | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/Dockerfile b/Dockerfile index 691fb6c..3abe528 100644 --- a/Dockerfile +++ b/Dockerfile @@ -9,7 +9,7 @@ COPY helper-* /bin/ # https://github.com/docker/compose/releases FROM builder AS compose -ARG COMPOSE_VERSION=2.1.1 +ARG COMPOSE_VERSION=2.12.2 RUN helper-curl bin docker-compose \ https://github.com/docker/compose/releases/download/v${COMPOSE_VERSION}/docker-compose-linux-@UARCH @@ -20,7 +20,7 @@ RUN cp $(find bin -name crane) /usr/local/bin # https://github.com/helm/helm/releases FROM builder AS helm -ARG HELM_VERSION=3.7.1 +ARG HELM_VERSION=3.10.1 RUN helper-curl tar "--strip-components=1 linux-@GOARCH/helm" \ https://get.helm.sh/helm-v${HELM_VERSION}-linux-@GOARCH.tar.gz @@ -52,13 +52,13 @@ RUN helper-curl bin kompose \ # https://github.com/kubernetes/kubernetes/releases FROM builder AS kubectl -ARG KUBECTL_VERSION=1.22.3 +ARG KUBECTL_VERSION=1.24.7 RUN helper-curl bin kubectl \ https://storage.googleapis.com/kubernetes-release/release/v${KUBECTL_VERSION}/bin/linux/@GOARCH/kubectl # https://github.com/stackrox/kube-linter/releases FROM builder AS kube-linter -ARG KUBELINTER_VERSION=0.2.5 +ARG KUBELINTER_VERSION=0.5.0 RUN go install golang.stackrox.io/kube-linter/cmd/kube-linter@$KUBELINTER_VERSION RUN cp $(find bin -name kube-linter) /usr/local/bin @@ -70,7 +70,7 @@ RUN helper-curl tar kubeseal \ # https://github.com/kubernetes-sigs/kustomize/releases FROM builder AS kustomize -ARG KUSTOMIZE_VERSION=4.4.1 +ARG KUSTOMIZE_VERSION=4.5.7 RUN helper-curl tar kustomize \ https://github.com/kubernetes-sigs/kustomize/releases/download/kustomize/v$KUSTOMIZE_VERSION/kustomize_v${KUSTOMIZE_VERSION}_linux_@GOARCH.tar.gz @@ -86,7 +86,7 @@ RUN helper-curl tar popeye \ # https://github.com/regclient/regclient/releases FROM builder AS regctl -ARG REGCLIENT_VERSION=0.3.9 +ARG REGCLIENT_VERSION=0.4.5 RUN helper-curl bin regctl \ https://github.com/regclient/regclient/releases/download/v$REGCLIENT_VERSION/regctl-linux-@GOARCH @@ -106,13 +106,15 @@ RUN helper-curl bin skaffold \ # https://github.com/stern/stern/releases FROM builder AS stern -ARG STERN_VERSION=1.20.1 -RUN helper-curl tar "--strip-components=1 stern_${STERN_VERSION}_linux_@GOARCH/stern" \ +ARG STERN_VERSION=1.22.0 +RUN helper-curl tar stern \ https://github.com/stern/stern/releases/download/v${STERN_VERSION}/stern_${STERN_VERSION}_linux_@GOARCH.tar.gz +# Note: Tilt 0.26+ is dynamically linked against glibc, +# so we're pinning to 0.25 for now. # https://github.com/tilt-dev/tilt/releases FROM builder AS tilt -ARG TILT_VERSION=0.23.0 +ARG TILT_VERSION=0.25.3 RUN helper-curl tar tilt \ https://github.com/tilt-dev/tilt/releases/download/v${TILT_VERSION}/tilt.${TILT_VERSION}.linux.@WTFARCH.tar.gz From 7ff1b10cdeda9c9cfdf2bd5d230ab27bc481c289 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=B4me=20Petazzoni?= Date: Tue, 1 Nov 2022 10:14:07 +0100 Subject: [PATCH 07/17] =?UTF-8?q?=E2=9E=95=20Add=20screen;=20set=20tmux=20?= =?UTF-8?q?status=20bar=20color=20to=20red?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Dockerfile | 3 ++- tmux.conf | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) create mode 100644 tmux.conf diff --git a/Dockerfile b/Dockerfile index 3abe528..673234f 100644 --- a/Dockerfile +++ b/Dockerfile @@ -126,7 +126,7 @@ RUN helper-curl bin ytt \ FROM alpine AS shpod ENV COMPLETIONS=/usr/share/bash-completion/completions -RUN apk add apache2-utils bash bash-completion curl docker-cli file gettext git iputils jq libintl ncurses openssh openssl sudo tmux tree vim yq +RUN apk add apache2-utils bash bash-completion curl docker-cli file gettext git iputils jq libintl ncurses openssh openssl screen sudo tmux tree vim yq COPY --from=compose /usr/local/bin/docker-compose /usr/local/bin COPY --from=crane /usr/local/bin/crane /usr/local/bin @@ -194,6 +194,7 @@ RUN \ ; fi COPY --chown=1000:1000 bash_profile /home/k8s/.bash_profile COPY --chown=1000:1000 vimrc /home/k8s/.vimrc +COPY --chown=1000:1000 tmux.conf /home/k8s/.tmux.conf COPY motd /etc/motd COPY setup-tailhist.sh /usr/local/bin diff --git a/tmux.conf b/tmux.conf new file mode 100644 index 0000000..2738c10 --- /dev/null +++ b/tmux.conf @@ -0,0 +1 @@ +set -g status-style bg=red From 4cff5b300e12a74cfdc1bfb88661de16c72355b8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=B4me=20Petazzoni?= Date: Wed, 2 Nov 2022 17:01:09 +0100 Subject: [PATCH 08/17] =?UTF-8?q?=F0=9F=8C=88=20Switch=20tmux=20status=20b?= =?UTF-8?q?ar=20to=20blue=20(like=20the=20sky=20with=20the=20clouds)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- tmux.conf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tmux.conf b/tmux.conf index 2738c10..4837016 100644 --- a/tmux.conf +++ b/tmux.conf @@ -1 +1 @@ -set -g status-style bg=red +set -g status-style bg=blue,fg=white,bold From f04c49aa9c4b4f56d8cf95ecce1042563f6bbcc1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=B4me=20Petazzoni?= Date: Tue, 12 Apr 2022 20:44:38 +0200 Subject: [PATCH 09/17] =?UTF-8?q?=E2=99=BB=EF=B8=8F=20=20Update=20kubeseal?= =?UTF-8?q?=20version;=20don't=20install=20krew=20on=20ia32?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Dockerfile | 13 ++++++++----- helper-curl | 5 ----- 2 files changed, 8 insertions(+), 10 deletions(-) diff --git a/Dockerfile b/Dockerfile index 597f0c2..e38e313 100644 --- a/Dockerfile +++ b/Dockerfile @@ -64,9 +64,9 @@ RUN cp $(find bin -name kube-linter) /usr/local/bin # https://github.com/bitnami-labs/sealed-secrets/releases FROM builder AS kubeseal -ARG KUBESEAL_VERSION=0.16.0 -RUN helper-curl bin kubeseal \ - https://github.com/bitnami-labs/sealed-secrets/releases/download/v$KUBESEAL_VERSION/kubeseal-@KSARCH +ARG KUBESEAL_VERSION=0.17.4 +RUN helper-curl tar kubeseal \ + https://github.com/bitnami-labs/sealed-secrets/releases/download/v$KUBESEAL_VERSION/kubeseal-$KUBESEAL_VERSION-linux-@GOARCH.tar.gz # https://github.com/kubernetes-sigs/kustomize/releases FROM builder AS kustomize @@ -173,12 +173,15 @@ RUN echo k8s:x:1000: >> /etc/group \ && chown -R k8s:k8s /home/k8s/ \ && sed -i 's/#MaxAuthTries 6/MaxAuthTries 42/' /etc/ssh/sshd_config ARG TARGETARCH -RUN mkdir /tmp/krew \ +RUN \ + if [ "$TARGETARCH" != "386" ]; then \ + mkdir /tmp/krew \ && cd /tmp/krew \ && curl -fsSL https://github.com/kubernetes-sigs/krew/releases/latest/download/krew-linux_$TARGETARCH.tar.gz | tar -zxf- \ && sudo -u k8s -H ./krew-linux_$TARGETARCH install krew \ && cd \ - && rm -rf /tmp/krew + && rm -rf /tmp/krew \ + ; fi COPY --chown=1000:1000 bash_profile /home/k8s/.bash_profile COPY --chown=1000:1000 vimrc /home/k8s/.vimrc COPY motd /etc/motd diff --git a/helper-curl b/helper-curl index 1e9d070..120c83e 100755 --- a/helper-curl +++ b/helper-curl @@ -9,26 +9,22 @@ URL=$3 case $TARGETARCH in amd64) GOARCH=amd64 - KSARCH=linux-amd64 UARCH=x86_64 WTFARCH=x86_64 ;; arm64) GOARCH=arm64 - KSARCH=arm64 UARCH=aarch64 WTFARCH=arm64 ;; arm) GOARCH=arm - KSARCH=arm UARCH=armv7 WTFARCH=arm ;; *) echo "Unsupported architecture: $TARGETARCH." GOARCH=$TARGETARCH - KSARCH=$TARGETARCH UARCH=$TARGETARCH WTFARCH=$TARGETARCH ;; @@ -37,7 +33,6 @@ esac mangle() { echo $1 | sed \ -e s/@GOARCH/$GOARCH/g \ - -e s/@KSARCH/$KSARCH/g \ -e s/@UARCH/$UARCH/g \ -e s/@WTFARCH/$WTFARCH/g \ # From 54cba1993af9ad15b4410b3c6f57cdf102815a7b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=B4me=20Petazzoni?= Date: Fri, 9 Sep 2022 07:14:40 +0200 Subject: [PATCH 10/17] =?UTF-8?q?=E2=9E=95=20Add=20gettext=20so=20we=20hav?= =?UTF-8?q?e=20envsubst=20in=20the=20image?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Dockerfile | 3 ++- README.md | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index e38e313..50114c6 100644 --- a/Dockerfile +++ b/Dockerfile @@ -118,7 +118,7 @@ RUN helper-curl tar tilt \ FROM alpine AS shpod ENV COMPLETIONS=/usr/share/bash-completion/completions -RUN apk add --no-cache apache2-utils bash bash-completion curl docker-cli file git iputils jq libintl ncurses openssh openssl sudo tmux tree vim yq +RUN apk add --no-cache apache2-utils bash bash-completion curl docker-cli file gettext git iputils jq libintl ncurses openssh openssl sudo tmux tree vim yq COPY --from=compose /usr/local/bin/docker-compose /usr/local/bin COPY --from=crane /usr/local/bin/crane /usr/local/bin @@ -193,6 +193,7 @@ RUN ( \ bash --version | head -n1 ;\ curl --version | head -n1 ;\ docker version --format="Docker {{.Client.Version}}" ;\ + envsubst --version | head -n1 ;\ git --version ;\ jq --version ;\ ssh -V ;\ diff --git a/README.md b/README.md index 4f5e93e..74fe3e9 100644 --- a/README.md +++ b/README.md @@ -23,6 +23,7 @@ It includes: - curl - Docker CLI - Docker Compose +- envsubst - git - Helm - jid From 99ffd88c4cf48ac2cbd8ff371f23ea8327a851af Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=B4me=20Petazzoni?= Date: Tue, 4 Oct 2022 17:04:37 +0200 Subject: [PATCH 11/17] =?UTF-8?q?=E2=9E=95=20Add=20ytt?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Dockerfile | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 50114c6..7584a23 100644 --- a/Dockerfile +++ b/Dockerfile @@ -110,12 +110,18 @@ ARG STERN_VERSION=1.20.1 RUN helper-curl tar "--strip-components=1 stern_${STERN_VERSION}_linux_@GOARCH/stern" \ https://github.com/stern/stern/releases/download/v${STERN_VERSION}/stern_${STERN_VERSION}_linux_@GOARCH.tar.gz -# https://github.com/tilt-dev/tilt/releases/ +# https://github.com/tilt-dev/tilt/releases FROM builder AS tilt ARG TILT_VERSION=0.23.0 RUN helper-curl tar tilt \ https://github.com/tilt-dev/tilt/releases/download/v${TILT_VERSION}/tilt.${TILT_VERSION}.linux.@WTFARCH.tar.gz +# https://github.com/vmware-tanzu/carvel-ytt/releases +FROM builder AS ytt +ARG YTT_VERSION=0.43.0 +RUN helper-curl bin ytt \ + https://github.com/vmware-tanzu/carvel-ytt/releases/download/v${YTT_VERSION}/ytt-linux-@GOARCH + FROM alpine AS shpod ENV COMPLETIONS=/usr/share/bash-completion/completions RUN apk add --no-cache apache2-utils bash bash-completion curl docker-cli file gettext git iputils jq libintl ncurses openssh openssl sudo tmux tree vim yq @@ -137,6 +143,7 @@ COPY --from=ship /usr/local/bin/ship /usr/local/bin COPY --from=skaffold /usr/local/bin/skaffold /usr/local/bin COPY --from=stern /usr/local/bin/stern /usr/local/bin COPY --from=tilt /usr/local/bin/tilt /usr/local/bin +COPY --from=ytt /usr/local/bin/ytt /usr/local/bin RUN set -e ; for BIN in \ crane \ @@ -147,6 +154,7 @@ RUN set -e ; for BIN in \ regctl \ skaffold \ tilt \ + ytt \ ; do echo $BIN ; $BIN completion bash > $COMPLETIONS/$BIN.bash ; done ;\ yq shell-completion bash > $COMPLETIONS/yq.bash From 9a9b1ca19811b888f1e76ab516ce741ab054ea81 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=B4me=20Petazzoni?= Date: Wed, 19 Oct 2022 16:52:51 +0200 Subject: [PATCH 12/17] =?UTF-8?q?=F0=9F=94=92=EF=B8=8F=20Fix=20kubeconfig?= =?UTF-8?q?=20permissions?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- bash_profile | 3 +++ 1 file changed, 3 insertions(+) diff --git a/bash_profile b/bash_profile index 68c95e6..90af726 100644 --- a/bash_profile +++ b/bash_profile @@ -6,6 +6,9 @@ if ! [ -f ~/.kube/config ]; then # We need to access the Kubernetes API, so we'll do it # using the well-known endpoint. ( + # Make sure that the file will have locked-down permissions. + # (Some tools like Helm will complain about it otherwise.) + umask 077 export KUBERNETES_SERVICE_HOST=kubernetes.default.svc export KUBERNETES_SERVICE_PORT=443 if kubectl get configmap kubeconfig >&/dev/null; then From b533bed4b5a272110d340088cb0a31a385e92815 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=B4me=20Petazzoni?= Date: Tue, 1 Nov 2022 09:52:31 +0100 Subject: [PATCH 13/17] =?UTF-8?q?=E2=99=BB=EF=B8=8F=20=20Update=20versions?= =?UTF-8?q?=20across=20the=20board?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Dockerfile | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/Dockerfile b/Dockerfile index 7584a23..a2af797 100644 --- a/Dockerfile +++ b/Dockerfile @@ -9,7 +9,7 @@ COPY helper-* /bin/ # https://github.com/docker/compose/releases FROM builder AS compose -ARG COMPOSE_VERSION=2.1.1 +ARG COMPOSE_VERSION=2.12.2 RUN helper-curl bin docker-compose \ https://github.com/docker/compose/releases/download/v${COMPOSE_VERSION}/docker-compose-linux-@UARCH @@ -20,7 +20,7 @@ RUN cp $(find bin -name crane) /usr/local/bin # https://github.com/helm/helm/releases FROM builder AS helm -ARG HELM_VERSION=3.7.1 +ARG HELM_VERSION=3.10.1 RUN helper-curl tar "--strip-components=1 linux-@GOARCH/helm" \ https://get.helm.sh/helm-v${HELM_VERSION}-linux-@GOARCH.tar.gz @@ -52,13 +52,13 @@ RUN helper-curl bin kompose \ # https://github.com/kubernetes/kubernetes/releases FROM builder AS kubectl -ARG KUBECTL_VERSION=1.22.3 +ARG KUBECTL_VERSION=1.24.7 RUN helper-curl bin kubectl \ https://storage.googleapis.com/kubernetes-release/release/v${KUBECTL_VERSION}/bin/linux/@GOARCH/kubectl # https://github.com/stackrox/kube-linter/releases FROM builder AS kube-linter -ARG KUBELINTER_VERSION=0.2.5 +ARG KUBELINTER_VERSION=0.5.0 RUN go install golang.stackrox.io/kube-linter/cmd/kube-linter@$KUBELINTER_VERSION RUN cp $(find bin -name kube-linter) /usr/local/bin @@ -70,7 +70,7 @@ RUN helper-curl tar kubeseal \ # https://github.com/kubernetes-sigs/kustomize/releases FROM builder AS kustomize -ARG KUSTOMIZE_VERSION=4.4.1 +ARG KUSTOMIZE_VERSION=4.5.7 RUN helper-curl tar kustomize \ https://github.com/kubernetes-sigs/kustomize/releases/download/kustomize/v$KUSTOMIZE_VERSION/kustomize_v${KUSTOMIZE_VERSION}_linux_@GOARCH.tar.gz @@ -86,7 +86,7 @@ RUN helper-curl tar popeye \ # https://github.com/regclient/regclient/releases FROM builder AS regctl -ARG REGCLIENT_VERSION=0.3.9 +ARG REGCLIENT_VERSION=0.4.5 RUN helper-curl bin regctl \ https://github.com/regclient/regclient/releases/download/v$REGCLIENT_VERSION/regctl-linux-@GOARCH @@ -106,13 +106,15 @@ RUN helper-curl bin skaffold \ # https://github.com/stern/stern/releases FROM builder AS stern -ARG STERN_VERSION=1.20.1 -RUN helper-curl tar "--strip-components=1 stern_${STERN_VERSION}_linux_@GOARCH/stern" \ +ARG STERN_VERSION=1.22.0 +RUN helper-curl tar stern \ https://github.com/stern/stern/releases/download/v${STERN_VERSION}/stern_${STERN_VERSION}_linux_@GOARCH.tar.gz +# Note: Tilt 0.26+ is dynamically linked against glibc, +# so we're pinning to 0.25 for now. # https://github.com/tilt-dev/tilt/releases FROM builder AS tilt -ARG TILT_VERSION=0.23.0 +ARG TILT_VERSION=0.25.3 RUN helper-curl tar tilt \ https://github.com/tilt-dev/tilt/releases/download/v${TILT_VERSION}/tilt.${TILT_VERSION}.linux.@WTFARCH.tar.gz From 4c4cd753d3a8902b188864a7526637378dd256ef Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=B4me=20Petazzoni?= Date: Tue, 1 Nov 2022 10:14:07 +0100 Subject: [PATCH 14/17] =?UTF-8?q?=E2=9E=95=20Add=20screen;=20set=20tmux=20?= =?UTF-8?q?status=20bar=20color=20to=20red?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Dockerfile | 3 ++- tmux.conf | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) create mode 100644 tmux.conf diff --git a/Dockerfile b/Dockerfile index a2af797..f65d83f 100644 --- a/Dockerfile +++ b/Dockerfile @@ -126,7 +126,7 @@ RUN helper-curl bin ytt \ FROM alpine AS shpod ENV COMPLETIONS=/usr/share/bash-completion/completions -RUN apk add --no-cache apache2-utils bash bash-completion curl docker-cli file gettext git iputils jq libintl ncurses openssh openssl sudo tmux tree vim yq +RUN apk add --no-cache apache2-utils bash bash-completion curl docker-cli file gettext git iputils jq libintl ncurses openssh openssl screen sudo tmux tree vim yq COPY --from=compose /usr/local/bin/docker-compose /usr/local/bin COPY --from=crane /usr/local/bin/crane /usr/local/bin @@ -194,6 +194,7 @@ RUN \ ; fi COPY --chown=1000:1000 bash_profile /home/k8s/.bash_profile COPY --chown=1000:1000 vimrc /home/k8s/.vimrc +COPY --chown=1000:1000 tmux.conf /home/k8s/.tmux.conf COPY motd /etc/motd COPY setup-tailhist.sh /usr/local/bin diff --git a/tmux.conf b/tmux.conf new file mode 100644 index 0000000..2738c10 --- /dev/null +++ b/tmux.conf @@ -0,0 +1 @@ +set -g status-style bg=red From 83945b0f295814c917b3b86b4c91f20322753f22 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=B4me=20Petazzoni?= Date: Wed, 2 Nov 2022 17:01:09 +0100 Subject: [PATCH 15/17] =?UTF-8?q?=F0=9F=8C=88=20Switch=20tmux=20status=20b?= =?UTF-8?q?ar=20to=20blue=20(like=20the=20sky=20with=20the=20clouds)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- tmux.conf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tmux.conf b/tmux.conf index 2738c10..4837016 100644 --- a/tmux.conf +++ b/tmux.conf @@ -1 +1 @@ -set -g status-style bg=red +set -g status-style bg=blue,fg=white,bold From 256dd4afdf77e17d2f984ddf73ff7d1df75c163e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=B4me=20Petazzoni?= Date: Sat, 18 Feb 2023 15:00:18 +0100 Subject: [PATCH 16/17] =?UTF-8?q?=E2=99=BB=EF=B8=8F=20=20Bump=20up=20versi?= =?UTF-8?q?ons?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Dockerfile | 24 +++++++++++------------- 1 file changed, 11 insertions(+), 13 deletions(-) diff --git a/Dockerfile b/Dockerfile index f65d83f..f2f5de7 100644 --- a/Dockerfile +++ b/Dockerfile @@ -9,7 +9,7 @@ COPY helper-* /bin/ # https://github.com/docker/compose/releases FROM builder AS compose -ARG COMPOSE_VERSION=2.12.2 +ARG COMPOSE_VERSION=2.16.0 RUN helper-curl bin docker-compose \ https://github.com/docker/compose/releases/download/v${COMPOSE_VERSION}/docker-compose-linux-@UARCH @@ -20,7 +20,7 @@ RUN cp $(find bin -name crane) /usr/local/bin # https://github.com/helm/helm/releases FROM builder AS helm -ARG HELM_VERSION=3.10.1 +ARG HELM_VERSION=3.11.1 RUN helper-curl tar "--strip-components=1 linux-@GOARCH/helm" \ https://get.helm.sh/helm-v${HELM_VERSION}-linux-@GOARCH.tar.gz @@ -43,7 +43,7 @@ RUN cp $(find bin -name jid) /usr/local/bin # https://github.com/derailed/k9s/releases FROM builder AS k9s RUN helper-curl tar k9s \ - https://github.com/derailed/k9s/releases/latest/download/k9s_Linux_@WTFARCH.tar.gz + https://github.com/derailed/k9s/releases/latest/download/k9s_Linux_@GOARCH.tar.gz # https://github.com/kubernetes/kompose/releases FROM builder AS kompose @@ -52,19 +52,19 @@ RUN helper-curl bin kompose \ # https://github.com/kubernetes/kubernetes/releases FROM builder AS kubectl -ARG KUBECTL_VERSION=1.24.7 +ARG KUBECTL_VERSION=1.26.1 RUN helper-curl bin kubectl \ https://storage.googleapis.com/kubernetes-release/release/v${KUBECTL_VERSION}/bin/linux/@GOARCH/kubectl # https://github.com/stackrox/kube-linter/releases FROM builder AS kube-linter -ARG KUBELINTER_VERSION=0.5.0 +ARG KUBELINTER_VERSION=0.6.0 RUN go install golang.stackrox.io/kube-linter/cmd/kube-linter@$KUBELINTER_VERSION RUN cp $(find bin -name kube-linter) /usr/local/bin # https://github.com/bitnami-labs/sealed-secrets/releases FROM builder AS kubeseal -ARG KUBESEAL_VERSION=0.17.4 +ARG KUBESEAL_VERSION=0.19.5 RUN helper-curl tar kubeseal \ https://github.com/bitnami-labs/sealed-secrets/releases/download/v$KUBESEAL_VERSION/kubeseal-$KUBESEAL_VERSION-linux-@GOARCH.tar.gz @@ -99,28 +99,26 @@ ARG SHIP_VERSION=0.51.3 RUN helper-curl tar ship \ https://github.com/replicatedhq/ship/releases/download/v${SHIP_VERSION}/ship_${SHIP_VERSION}_linux_@GOARCH.tar.gz -# https://github.com/GoogleContainerTools/skaffold/releases/tag/v1.34.0 +# https://github.com/GoogleContainerTools/skaffold/releases FROM builder AS skaffold RUN helper-curl bin skaffold \ https://storage.googleapis.com/skaffold/releases/latest/skaffold-linux-@GOARCH # https://github.com/stern/stern/releases FROM builder AS stern -ARG STERN_VERSION=1.22.0 +ARG STERN_VERSION=1.23.0 RUN helper-curl tar stern \ https://github.com/stern/stern/releases/download/v${STERN_VERSION}/stern_${STERN_VERSION}_linux_@GOARCH.tar.gz -# Note: Tilt 0.26+ is dynamically linked against glibc, -# so we're pinning to 0.25 for now. # https://github.com/tilt-dev/tilt/releases FROM builder AS tilt -ARG TILT_VERSION=0.25.3 +ARG TILT_VERSION=0.31.2 RUN helper-curl tar tilt \ - https://github.com/tilt-dev/tilt/releases/download/v${TILT_VERSION}/tilt.${TILT_VERSION}.linux.@WTFARCH.tar.gz + https://github.com/tilt-dev/tilt/releases/download/v${TILT_VERSION}/tilt.${TILT_VERSION}.linux-alpine.@WTFARCH.tar.gz # https://github.com/vmware-tanzu/carvel-ytt/releases FROM builder AS ytt -ARG YTT_VERSION=0.43.0 +ARG YTT_VERSION=0.44.3 RUN helper-curl bin ytt \ https://github.com/vmware-tanzu/carvel-ytt/releases/download/v${YTT_VERSION}/ytt-linux-@GOARCH From 22993d9285231a79a31cd297f525d0bc1ef569b1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=B4me=20Petazzoni?= Date: Sat, 18 Feb 2023 15:09:49 +0100 Subject: [PATCH 17/17] =?UTF-8?q?=E2=9E=95=20Add=20Carvel=20Kapp?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Dockerfile | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index f2f5de7..da6937d 100644 --- a/Dockerfile +++ b/Dockerfile @@ -116,11 +116,17 @@ ARG TILT_VERSION=0.31.2 RUN helper-curl tar tilt \ https://github.com/tilt-dev/tilt/releases/download/v${TILT_VERSION}/tilt.${TILT_VERSION}.linux-alpine.@WTFARCH.tar.gz -# https://github.com/vmware-tanzu/carvel-ytt/releases +# https://github.com/carvel-dev/ytt/releases FROM builder AS ytt ARG YTT_VERSION=0.44.3 RUN helper-curl bin ytt \ - https://github.com/vmware-tanzu/carvel-ytt/releases/download/v${YTT_VERSION}/ytt-linux-@GOARCH + https://github.com/carvel-dev/ytt/releases/download/v${YTT_VERSION}/ytt-linux-@GOARCH + +# https://github.com/carvel-dev/kapp/releases +FROM builder AS kapp +ARG YTT_VERSION=0.54.3 +RUN helper-curl bin kapp \ + https://github.com/carvel-dev/kapp/releases/download/v${YTT_VERSION}/kapp-linux-@GOARCH FROM alpine AS shpod ENV COMPLETIONS=/usr/share/bash-completion/completions @@ -132,6 +138,7 @@ COPY --from=helm /usr/local/bin/helm /usr/local/bin COPY --from=httping /usr/local/bin/httping /usr/local/bin COPY --from=jid /usr/local/bin/jid /usr/local/bin COPY --from=k9s /usr/local/bin/k9s /usr/local/bin +COPY --from=kapp /usr/local/bin/kapp /usr/local/bin COPY --from=kubectl /usr/local/bin/kubectl /usr/local/bin COPY --from=kube-linter /usr/local/bin/kube-linter /usr/local/bin COPY --from=kubeseal /usr/local/bin/kubeseal /usr/local/bin @@ -148,6 +155,7 @@ COPY --from=ytt /usr/local/bin/ytt /usr/local/bin RUN set -e ; for BIN in \ crane \ helm \ + kapp \ kubectl \ kube-linter \ kustomize \ @@ -214,6 +222,7 @@ RUN ( \ httping --version ;\ jid --version ;\ echo "k9s $(k9s version | grep Version)" ;\ + kapp --version | head -n1 ;\ echo "kubectl $(kubectl version --short --client)" ;\ echo "kube-linter $(kube-linter version)" ;\ kubeseal --version ;\