feat: wait for k8s pods
This commit is contained in:
1 parent
e10e388543
commit
4221a7aed2
1 file changed
+5
@@ -851,6 +851,11 @@ function k8s-apply() {
|
||||
kubectl apply -f k8s/odoo-svc.yaml
|
||||
|
||||
ODOO_POD=$(kubectl get pods -o=name --all-namespaces | grep odoo | sed 's/pod\///')
|
||||
POSTGRES_POD=$(kubectl get pods -o=name --all-namespaces | grep postgres | sed 's/pod\///')
|
||||
|
||||
kubectl wait --for=condition=Ready "$ODOO_POD"
|
||||
kubectl wait --for=condition=Ready "$POSTGRES_POD"
|
||||
|
||||
echo "Init Odoo database in $ODOO_POD pod:"
|
||||
kubectl exec "$ODOO_POD" -- env
|
||||
kubectl exec "$ODOO_POD" -- /bin/bash -c "odoo -d odoo -i web --db_host \$HOST -r\$USER -w\$PASSWORD --stop-after-init --no-http"
|
||||
|
||||
Reference in new issue
Block a user