diff --git a/Dockerfile b/Dockerfile index 8d852b0..ce0dfde 100644 --- a/Dockerfile +++ b/Dockerfile @@ -7,6 +7,11 @@ ENV BUILDARCH=$BUILDARCH \ TARGETARCH=$TARGETARCH COPY helper-* /bin/ +# https://github.com/argoproj/argo-cd/releases/latest +FROM builder AS argocd +RUN helper-curl bin argocd \ + https://github.com/argoproj/argo-cd/releases/latest/download/argocd-linux-@GOARCH + # https://github.com/docker/compose/releases FROM builder AS compose ARG COMPOSE_VERSION=2.17.2 @@ -18,6 +23,12 @@ FROM builder AS crane RUN go install github.com/google/go-containerregistry/cmd/crane@latest RUN cp $(find bin -name crane) /usr/local/bin +# https://github.com/fluxcd/flux2/releases +FROM builder AS flux +ARG FLUX_VERSION=2.3.0 +RUN helper-curl tar flux \ + https://github.com/fluxcd/flux2/releases/download/v$FLUX_VERSION/flux_${FLUX_VERSION}_linux_@GOARCH.tar.gz + # https://github.com/helm/helm/releases FROM builder AS helm ARG HELM_VERSION=3.11.2 @@ -28,10 +39,11 @@ RUN helper-curl tar "--strip-components=1 linux-@GOARCH/helm" \ # (The source is small enough, so I don't know if cross-compilation # would be worth the effort.) FROM alpine AS httping -RUN apk add build-base gettext git musl-libintl ncurses-dev -RUN git clone https://salsa.debian.org/debian/httping -WORKDIR /httping +RUN apk add build-base cmake gettext git musl-libintl ncurses-dev +RUN git clone https://github.com/folkertvanheusden/httping +WORKDIR httping RUN sed -i s/60/0/ utils.c +RUN cmake . RUN make install BINDIR=/usr/local/bin # https://github.com/simeji/jid/releases @@ -50,27 +62,39 @@ FROM builder AS kompose RUN helper-curl bin kompose \ https://github.com/kubernetes/kompose/releases/latest/download/kompose-linux-@GOARCH +# https://github.com/kubecolor/kubecolor/releases +FROM builder AS kubecolor +ARG KUBECOLOR_VERSION=0.3.2 +RUN helper-curl tar kubecolor \ + https://github.com/kubecolor/kubecolor/releases/download/v${KUBECOLOR_VERSION}/kubecolor_${KUBECOLOR_VERSION}_linux_@GOARCH.tar.gz + # https://github.com/kubernetes/kubernetes/releases FROM builder AS kubectl -ARG KUBECTL_VERSION=1.26.3 +ARG KUBECTL_VERSION=1.30.2 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=v0.6.1 +ARG KUBELINTER_VERSION=v0.6.8 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/doitintl/kube-no-trouble/releases +FROM builder AS kubent +ARG KUBENT_VERSION=0.7.2 +RUN helper-curl tar kubent \ + https://github.com/doitintl/kube-no-trouble/releases/download/${KUBENT_VERSION}/kubent-${KUBENT_VERSION}-linux-@GOARCH.tar.gz + # https://github.com/bitnami-labs/sealed-secrets/releases FROM builder AS kubeseal -ARG KUBESEAL_VERSION=0.20.2 +ARG KUBESEAL_VERSION=0.27.0 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 -ARG KUSTOMIZE_VERSION=5.0.1 +ARG KUSTOMIZE_VERSION=5.4.2 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 +110,7 @@ RUN helper-curl tar popeye \ # https://github.com/regclient/regclient/releases FROM builder AS regctl -ARG REGCLIENT_VERSION=0.4.7 +ARG REGCLIENT_VERSION=0.6.1 RUN helper-curl bin regctl \ https://github.com/regclient/regclient/releases/download/v$REGCLIENT_VERSION/regctl-linux-@GOARCH @@ -106,25 +130,31 @@ RUN helper-curl bin skaffold \ # https://github.com/stern/stern/releases FROM builder AS stern -ARG STERN_VERSION=1.24.0 +ARG STERN_VERSION=1.30.0 RUN helper-curl tar 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 FROM builder AS tilt -ARG TILT_VERSION=0.32.0 +ARG TILT_VERSION=0.33.17 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/velero/releases +FROM builder AS velero +ARG VELERO_VERSION=1.14.0 +RUN helper-curl tar "--strip-components=1 velero-v${VELERO_VERSION}-linux-@GOARCH/velero" \ + https://github.com/vmware-tanzu/velero/releases/download/v${VELERO_VERSION}/velero-v${VELERO_VERSION}-linux-@GOARCH.tar.gz + # https://github.com/carvel-dev/ytt/releases FROM builder AS ytt -ARG YTT_VERSION=0.45.0 +ARG YTT_VERSION=0.49.1 RUN helper-curl bin ytt \ 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.55.0 +ARG YTT_VERSION=0.62.1 RUN helper-curl bin kapp \ https://github.com/carvel-dev/kapp/releases/download/v${YTT_VERSION}/kapp-linux-@GOARCH @@ -132,15 +162,19 @@ 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 screen sudo tmux tree vim yq +COPY --from=argocd /usr/local/bin/argocd /usr/local/bin COPY --from=compose /usr/local/bin/docker-compose /usr/local/bin COPY --from=crane /usr/local/bin/crane /usr/local/bin +COPY --from=flux /usr/local/bin/flux /usr/local/bin 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=kubecolor /usr/local/bin/kubecolor /usr/local/bin COPY --from=kube-linter /usr/local/bin/kube-linter /usr/local/bin +COPY --from=kubent /usr/local/bin/kubent /usr/local/bin COPY --from=kubeseal /usr/local/bin/kubeseal /usr/local/bin COPY --from=kustomize /usr/local/bin/kustomize /usr/local/bin COPY --from=ngrok /usr/local/bin/ngrok /usr/local/bin @@ -150,10 +184,13 @@ 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=velero /usr/local/bin/velero /usr/local/bin COPY --from=ytt /usr/local/bin/ytt /usr/local/bin RUN set -e ; for BIN in \ + argocd \ crane \ + flux \ helm \ kapp \ kubectl \ @@ -162,9 +199,10 @@ RUN set -e ; for BIN in \ regctl \ skaffold \ tilt \ + velero \ ytt \ ; do echo $BIN ; $BIN completion bash > $COMPLETIONS/$BIN.bash ; done ;\ - yq shell-completion bash > $COMPLETIONS/yq.bash + stern --completion bash > $COMPLETIONS/stern RUN cd /tmp \ && git clone https://github.com/ahmetb/kubectx \ @@ -207,10 +245,12 @@ COPY setup-tailhist.sh /usr/local/bin # Generate a list of all installed versions. RUN ( \ ab -V | head -n1 ;\ + argocd version --client | head -n1 ;\ bash --version | head -n1 ;\ curl --version | head -n1 ;\ docker version --format="Docker {{.Client.Version}}" ;\ envsubst --version | head -n1 ;\ + flux --version ;\ git --version ;\ jq --version ;\ ssh -V ;\ @@ -223,8 +263,10 @@ RUN ( \ jid --version ;\ echo "k9s $(k9s version | grep Version)" ;\ kapp --version | head -n1 ;\ + echo "kubecolor $(kubecolor --kubecolor-version)" ;\ echo "kubectl $(kubectl version --short --client)" ;\ echo "kube-linter $(kube-linter version)" ;\ + echo "kubent $(kubent --version 2>&1)" ;\ kubeseal --version ;\ kustomize version --short ;\ ngrok version ;\ @@ -234,6 +276,7 @@ RUN ( \ echo "skaffold $(skaffold version)" ;\ echo "stern $(stern --version | grep ^version)" ;\ echo "tilt $(tilt version)" ;\ + echo "velero $(velero version --client-only | grep Version)" ;\ ) > versions.txt # If there is a tty, give us a shell. diff --git a/README.md b/README.md index 084c69f..08211f4 100644 --- a/README.md +++ b/README.md @@ -137,6 +137,10 @@ To execute it: curl https://k8smastery.com/shpod.sh | sh ``` +(Note: It used to be available at shpod.sh and shpod.me, but these +became pretty expensive so I decided to drop them. If you were using +them and want something fast to type, switch to shpod.in!) + If you don't like `curl|sh`, and/or if you want to execute things step by step, check the next section. @@ -184,9 +188,9 @@ that ConfigMap and use it to populate `~/.kube/config`. This lets you inject a custom kubeconfig file into shpod. -## Support for other architectures +## Multi-arch support -As of November 2021, the Dockerfile in this repository should be able -to build images for other architectures. However, when trying to install -a compiled binary that is not available for another architecture, a dummy -placeholder will be installed instead. +Shpod supports both Intel and ARM 64 bits architectures. The Dockerfile +in this repository should be able to support other architectures fairly +easily. If a given tool isn't available on the target architecture, +a dummy placeholder will be installed instead. diff --git a/bash_profile b/bash_profile index 90af726..6f3e5b0 100644 --- a/bash_profile +++ b/bash_profile @@ -52,9 +52,10 @@ KUBE_PS1_NS_COLOR="green" PS1="\e[1m\e[31m[\$HOSTIP] \e[0m(\$(kube_ps1)) \e[34m\u@\h\e[35m \w\e[0m\n$ " export EDITOR=vim +export KUBECOLOR_LIGHT_BACKGROUND=true export PATH="$HOME/.krew/bin:$PATH" -alias k=kubectl +alias k=kubecolor complete -F __start_kubectl k . /usr/share/bash-completion/completions/kubectl.bash diff --git a/motd b/motd index f46e3e0..b1e4680 100644 --- a/motd +++ b/motd @@ -3,4 +3,5 @@ 🔎 Check "/versions.txt" to see the list of included tools. 🔗 See https://github.com/bretfisher/shpod for more information. 📦️ You can install extra packages with 'sudo apk add PKGNAME'. +🎨 Dark terminal background? Unset KUBECOLOR_LIGHT_BACKGROUND. diff --git a/tmux.conf b/tmux.conf index 4837016..a34d6fb 100644 --- a/tmux.conf +++ b/tmux.conf @@ -1 +1,2 @@ set -g status-style bg=blue,fg=white,bold +set-option -g history-limit 1000000