prole/tmp/check_readiness.sh

21 lines
872 B
Bash

#!/usr/bin/env bash
export KUBECONFIG=/Users/chrisfu/dev/knoe/knoe-k3s.kubeconfig
echo "==> Webservice puma latest log (kgqhl):"
kubectl -n gitea logs gitlab-webservice-default-675ccb7b99-kgqhl \
-c webservice --tail=8 2>&1 | grep -v LD_PRELOAD || true
echo "==> Sidekiq latest log:"
kubectl -n gitea logs gitlab-sidekiq-all-in-1-v2-679848bc8-wvxln \
--tail=10 2>&1 | grep -v LD_PRELOAD | grep -v "^$" | head -10 || true
echo "==> Available condition:"
kubectl -n gitea get gitlab gitlab \
-o jsonpath='{range .status.conditions[*]}{.type}: {.status} — {.message}{"\n"}{end}' 2>&1
echo "==> minio-create-buckets crash image + log:"
kubectl -n gitea get pod -l app=minio-create-buckets \
-o jsonpath='{.items[0].spec.containers[0].image}' 2>&1 && echo
kubectl -n gitea logs -l app=minio-create-buckets \
--tail=5 2>&1 | grep -v LD_PRELOAD | head -5 || true