2023-01-09 17:33:49 +00:00
|
|
|
FROM alpine:3.17@sha256:f271e74b17ced29b915d351685fd4644785c6d1559dd1f2d4189a5e851ef753a
|
2022-12-22 11:14:19 +00:00
|
|
|
|
|
|
|
LABEL maintainer="Robert Kaussow <mail@thegeeklab.de>"
|
|
|
|
LABEL org.opencontainers.image.authors="Robert Kaussow <mail@thegeeklab.de>"
|
|
|
|
LABEL org.opencontainers.image.title="kube-tools"
|
|
|
|
LABEL org.opencontainers.image.url="https://gitea.rknet.org/docker/kube-tools"
|
|
|
|
LABEL org.opencontainers.image.source="https://gitea.rknet.org/docker/kube-tools"
|
|
|
|
LABEL org.opencontainers.image.documentation="https://gitea.rknet.org/docker/kube-tools"
|
|
|
|
|
|
|
|
ARG KUBECTL_VERSION
|
|
|
|
ARG YQ_VERSION
|
|
|
|
ARG HELM_VERSION
|
|
|
|
ARG KUSTOMIZE_VERSION
|
|
|
|
ARG KUBECONFORM_VERSION
|
2023-01-10 15:35:55 +00:00
|
|
|
ARG CALICO_VERSION
|
|
|
|
ARG FLUXCD_VERSION
|
2022-12-22 11:14:19 +00:00
|
|
|
|
|
|
|
# renovate: datasource=github-releases depName=kubernetes/kubernetes
|
2023-01-20 09:04:03 +00:00
|
|
|
ENV KUBECTL_VERSION="${KUBECTL_VERSION:-v1.26.1}"
|
2022-12-22 11:14:19 +00:00
|
|
|
# renovate: datasource=github-releases depName=mikefarah/yq
|
2023-01-15 16:09:38 +00:00
|
|
|
ENV YQ_VERSION="${YQ_VERSION:-v4.30.8}"
|
2022-12-22 11:14:19 +00:00
|
|
|
# renovate: datasource=github-releases depName=helm/helm
|
2023-01-20 09:34:24 +00:00
|
|
|
ENV HELM_VERSION="${HELM_VERSION:-v3.11.0}"
|
2022-12-22 11:14:19 +00:00
|
|
|
# renovate: datasource=github-releases depName=kubernetes-sigs/kustomize
|
2022-12-22 13:23:05 +00:00
|
|
|
ENV KUSTOMIZE_VERSION="${KUSTOMIZE_VERSION:-v4.5.7}"
|
2022-12-22 11:14:19 +00:00
|
|
|
# renovate: datasource=github-releases depName=yannh/kubeconform
|
2023-01-03 14:42:34 +00:00
|
|
|
ENV KUBECONFORM_VERSION="${KUBECONFORM_VERSION:-v0.5.0}"
|
2023-01-10 15:35:55 +00:00
|
|
|
# renovate: datasource=github-releases depName=projectcalico/calico
|
2023-01-13 01:03:52 +00:00
|
|
|
ENV CALICO_VERSION="${CALICO_VERSION:-v3.25.0}"
|
2023-01-10 15:35:55 +00:00
|
|
|
# renovate: datasource=github-releases depName=fluxcd/flux2
|
2023-02-02 16:04:22 +00:00
|
|
|
ENV FLUXCD_VERSION="${FLUXCD_VERSION:-v0.39.0}"
|
2023-01-24 08:21:27 +00:00
|
|
|
# renovate: datasource=github-releases depName=cert-manager/cert-manager
|
|
|
|
ENV CERTMANAGER_VERSION="${CERTMANAGER_VERSION:-v1.11.0}"
|
2022-12-22 11:14:19 +00:00
|
|
|
|
2023-01-10 15:35:55 +00:00
|
|
|
RUN apk --update add curl tar bash python3 py3-yaml && \
|
2022-12-22 11:14:19 +00:00
|
|
|
curl -SsfL -o /usr/local/bin/kubectl "https://dl.k8s.io/release/${KUBECTL_VERSION}/bin/linux/amd64/kubectl" && \
|
|
|
|
curl -SsfL -o /usr/local/bin/kubectl-convert "https://dl.k8s.io/release/${KUBECTL_VERSION}/bin/linux/amd64/kubectl-convert" && \
|
|
|
|
curl -SsfL -o /usr/local/bin/yq "https://github.com/mikefarah/yq/releases/download/${YQ_VERSION}/yq_linux_amd64" && \
|
|
|
|
curl -SsfL "https://get.helm.sh/helm-${HELM_VERSION}-linux-amd64.tar.gz" \
|
|
|
|
| tar xz --strip-components=1 -C /usr/local/bin linux-amd64/helm && \
|
|
|
|
curl -SsfL "https://github.com/kubernetes-sigs/kustomize/releases/download/kustomize%2F${KUSTOMIZE_VERSION}/kustomize_${KUSTOMIZE_VERSION}_linux_amd64.tar.gz" \
|
|
|
|
| tar xz -C /usr/local/bin kustomize && \
|
|
|
|
curl -SsfL "https://github.com/yannh/kubeconform/releases/download/${KUBECONFORM_VERSION}/kubeconform-linux-amd64.tar.gz" \
|
|
|
|
| tar xz -C /usr/local/bin kubeconform && \
|
2023-01-10 15:35:55 +00:00
|
|
|
curl -SsfL -o /usr/local/bin/openapi2jsonschema "https://raw.githubusercontent.com/yannh/kubeconform/${KUBECONFORM_VERSION}/scripts/openapi2jsonschema.py" && \
|
2022-12-22 11:14:19 +00:00
|
|
|
chmod 755 /usr/local/bin/kubectl && \
|
|
|
|
chmod 755 /usr/local/bin/kubectl-convert && \
|
|
|
|
chmod 755 /usr/local/bin/yq && \
|
|
|
|
chmod 755 /usr/local/bin/helm && \
|
|
|
|
chmod 755 /usr/local/bin/kustomize && \
|
|
|
|
chmod 755 /usr/local/bin/kubeconform && \
|
2023-01-10 15:35:55 +00:00
|
|
|
chmod 755 /usr/local/bin/openapi2jsonschema && \
|
|
|
|
mkdir -p /etc/kube-tools/schemas/flux/master-standalone-strict && \
|
|
|
|
mkdir -p /etc/kube-tools/schemas/calico/master-standalone-strict && \
|
2023-01-24 08:21:27 +00:00
|
|
|
mkdir -p /etc/kube-tools/schemas/cert-manager/master-standalone-strict && \
|
2023-01-10 15:35:55 +00:00
|
|
|
curl -SsfL "https://github.com/fluxcd/flux2/releases/download/${FLUXCD_VERSION}/crd-schemas.tar.gz" \
|
|
|
|
| tar xz -C /etc/kube-tools/schemas/flux/master-standalone-strict && \
|
|
|
|
curl -SsfL -o /tmp/calico.crds.yaml "https://raw.githubusercontent.com/projectcalico/calico/${CALICO_VERSION}/manifests/calico.yaml" && \
|
|
|
|
cd /etc/kube-tools/schemas/calico/master-standalone-strict && \
|
|
|
|
openapi2jsonschema /tmp/calico.crds.yaml && \
|
|
|
|
for file in *.json ; do mv $file ${file//_v1/_v3} ; done && \
|
2023-01-24 08:21:27 +00:00
|
|
|
curl -SsfL -o /tmp/cert-manager.crds.yaml "https://github.com/cert-manager/cert-manager/releases/download/${CERTMANAGER_VERSION}/cert-manager.crds.yaml" && \
|
|
|
|
cd /etc/kube-tools/schemas/cert-manager/master-standalone-strict && \
|
|
|
|
openapi2jsonschema /tmp/cert-manager.crds.yaml && \
|
2022-12-22 11:14:19 +00:00
|
|
|
rm -rf /var/cache/apk/* && \
|
|
|
|
rm -rf /tmp/*
|
|
|
|
|
|
|
|
ADD overlay/ /
|
|
|
|
|
|
|
|
STOPSIGNAL SIGTERM
|
|
|
|
|
|
|
|
CMD []
|