mirror of
https://github.com/dredx/prole.git
synced 2026-09-23 12:03:59 +00:00
45 lines
1.6 KiB
Bash
45 lines
1.6 KiB
Bash
#!/usr/bin/env bash
|
|
export KUBECONFIG=/Users/chrisfu/dev/knoe/knoe-k3s.kubeconfig
|
|
|
|
echo "==> minio-create-buckets actual image:"
|
|
kubectl -n gitea get pod -l "app=minio-create-buckets" \
|
|
-o jsonpath='{.items[0].spec.containers[0].image}' 2>&1 && echo
|
|
|
|
echo "==> minio-create-buckets crash log:"
|
|
kubectl -n gitea logs -l "app=minio-create-buckets" --tail=5 2>&1 \
|
|
| grep -v LD_PRELOAD | head -8 || true
|
|
|
|
echo "==> Patching CR: set minio mcImage to docker.io minio/mc ARM64..."
|
|
kubectl -n gitea patch gitlab gitlab --type=merge -p '{
|
|
"spec":{"chart":{"values":{
|
|
"minio":{
|
|
"mcImage":{
|
|
"repository":"minio/mc",
|
|
"tag":"RELEASE.2022-10-20T23-30-35Z"
|
|
}
|
|
}
|
|
}}}}'
|
|
|
|
echo "==> Deleting crash job so operator recreates with new image..."
|
|
kubectl -n gitea delete jobs -l "app=minio-create-buckets" --ignore-not-found
|
|
|
|
echo "==> Waiting 8min for Puma boot + Sidekiq ready + registry ready..."
|
|
sleep 480
|
|
|
|
echo "==> Final status:"
|
|
kubectl -n gitea get pods --no-headers \
|
|
-o wide | grep -v jemalloc | grep -v Completed \
|
|
| awk '{printf "%-52s %-5s %-8s %s\n",$1,$2,$4,$7}' | sort
|
|
|
|
echo "==> GitLab CR phase + condition:"
|
|
kubectl -n gitea get gitlab gitlab \
|
|
-o jsonpath='{.status.phase}{"\n"}{.status.conditions[*].message}' 2>&1 && echo
|
|
|
|
echo "==> Sidekiq readiness:"
|
|
kubectl -n gitea get pod -l app=sidekiq \
|
|
-o jsonpath='{.items[0].status.containerStatuses[0].ready}' 2>&1 && echo
|
|
|
|
echo "==> Webservice readiness:"
|
|
kubectl -n gitea get pod -l app=webservice \
|
|
-o jsonpath='{range .items[*]}{.metadata.name}: {.status.containerStatuses[*].ready}{"\n"}{end}' 2>&1
|