Docker image with a script to automatically resize PersistentVolumes in Kubernetes
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
|
|
FROM bitnami/kubectl:1.22
|
|
|
|
|
|
|
|
USER root
|
|
|
|
|
|
|
|
RUN apt-get update && \
|
|
|
|
apt-get install -y git bc && \
|
|
|
|
rm -r /var/lib/apt/lists /var/cache/apt/archives
|
|
|
|
|
|
|
|
RUN mkdir -p /tmp/krew && chown 1001 /tmp/krew
|
|
|
|
RUN mkdir -p /.krew && chown 1001 /.krew
|
|
|
|
|
|
|
|
ADD check_full_pvs.sh /
|
|
|
|
RUN chmod g+rwX /check_full_pvs.sh
|
|
|
|
|
|
|
|
USER 1001
|
|
|
|
|
|
|
|
RUN cd /tmp/krew && curl -fsSLO "https://github.com/kubernetes-sigs/krew/releases/latest/download/krew-linux_amd64.tar.gz" && \
|
|
|
|
tar zxvf "krew-linux_amd64.tar.gz" && ./krew-linux_amd64 install krew && rm -f krew-linux_amd64*
|
|
|
|
|
|
|
|
ENV PATH="$HOME/.krew/bin:/opt/bitnami:$PATH"
|
|
|
|
|
|
|
|
RUN kubectl krew install df-pv
|
|
|
|
|
|
|
|
ENTRYPOINT [ "/check_full_pvs.sh" ]
|