From a89bc71269516ffd6e80f7e52bea50ea0665abbb Mon Sep 17 00:00:00 2001 From: Dennis Marttinen Date: Fri, 7 Mar 2025 17:54:38 +0200 Subject: [PATCH] feat: add an alias for watching the Supernetes controller logs The `watchlogs` alias helps a lot when following the Supernetes controller logs, since `kubectl` is fast enough to keep up with a high log frequency. Signed-off-by: Dennis Marttinen --- Dockerfile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index eff1bec..6c41545 100644 --- a/Dockerfile +++ b/Dockerfile @@ -96,9 +96,9 @@ RUN update-ca-certificates && \ register-python-argcomplete pipx >> ~/.bashrc && pipx ensurepath && \ pipx install python-openstackclient && ~/.local/bin/openstack complete >> ~/.bashrc && \ echo "pipx install -e /bootstrap &> /dev/null &" >> ~/.bashrc && \ - echo 'export PATH="${KREW_ROOT:-$HOME/.krew}/bin:$PATH"' >> ~/.bashrc + echo 'export PATH="${KREW_ROOT:-$HOME/.krew}/bin:$PATH"' >> ~/.bashrc && \ + echo 'alias watchlogs="while :; do kubectl -n supernetes logs -f deployments/supernetes-controller; sleep 1; done"' >> ~/.bashrc # PATH="$HOME/.krew/bin:$PATH" kubectl krew install ... # Sleep forever, use `exec` to enter the container ENTRYPOINT ["/bin/sh", "-c", "trap 'exit 0' INT TERM; sleep infinity & wait"] -