Refactor Minio installation to use kubectl wait for ready replicas and remove unnecessary sleep commands for improved deployment reliability

This commit is contained in:
cedricve
2025-11-26 16:49:21 +01:00
parent 9be4475ec0
commit bf6eed584e

View File

@@ -53,8 +53,6 @@ jobs:
kubectl apply -f ./base/minio/minio-tenant-base.yaml
echo "Waiting for resources to be created..."
sleep 10
kubectl get statefulsets -A
kubectl get po -A -o wide
kubectl wait --for=jsonpath='{.status.readyReplicas}'=1 statefulset/myminio-pool-0 -n minio-tenant --timeout=300s
kubectl get po -A -o wide
kubectl get po -A -o wide | grep myminio-pool-0-0 | awk '{print $3}' | grep -q '2/2' && echo "myminio-pool-0-0 pod is running with status 2/2" || (echo "myminio-pool-0-0 pod is not running with status 2/2" && exit 1)
@@ -88,7 +86,7 @@ jobs:
kubectl apply -f ./base/vault/mongodb-configmap.yaml -n kerberos-vault
kubectl apply -f ./base/vault/kerberos-vault-deployment.yaml -n kerberos-vault
kubectl apply -f ./base/vault/kerberos-vault-service.yaml -n kerberos-vault
kubectl wait --for=condition=available deployment/vault -n kerberos-vault --timeout=300s
kubectl wait --for=condition=ready deployment/vault -n kerberos-vault --timeout=300s
kubectl get pods -A -o wide
kubectl get pods -A -o wide | grep kerberos-vault | awk '{print $3}' | grep -q '1/1' && echo "kerberos-vault pod is running with status 1/1" || (echo "kerberos-vault pod is not running with status 1/1" && exit 1)
- name: Install Agent
@@ -103,7 +101,7 @@ jobs:
run: |
sed -e '/nvidia/ s/^#*/#/' -i ./base/vault/data-filtering-deployment.yaml
kubectl apply -f ./base/vault/data-filtering-deployment.yaml
kubectl wait --for=condition=available deployment/data-filtering -n kerberos-vault --timeout=300s
kubectl wait --for=condition=ready deployment/data-filtering -n kerberos-vault --timeout=300s
kubectl get pods -A -o wide
kubectl get pods -A -o wide | grep data-filtering | awk '{print $3}' | grep -q '1/1' && echo "data-filtering pod is running with status 1/1" || (echo "data-filtering pod is not running with status 1/1" && exit 1)
- name: Install Hub Helm chart