Skip to content

Commit

Permalink
Wait for CRDs to be active before we add manifests that depend on them
Browse files Browse the repository at this point in the history
  • Loading branch information
deejgregor committed Dec 14, 2022
1 parent 2dac3a8 commit a395d94
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions start-dependencies.sh
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,7 @@ fi
# Install PostgreSQL
if [ "$INSTALL_POSTGRESQL" == "true" ]; then
kubectl apply -f https://raw.githubusercontent.com/zalando/postgres-operator/master/manifests/postgresql.crd.yaml
kubectl wait --for condition=established crd postgresqls.acid.zalan.do --timeout=10s
kubectl apply -k github.com/zalando/postgres-operator/manifests
kubectl create secret generic $PG_USER.onms-db.credentials.postgresql.acid.zalan.do --from-literal="username=$PG_USER" --from-literal="password=$PG_PASSWORD" -n $NAMESPACE --dry-run=client -o yaml | kubectl apply -f -
kubectl create secret generic $PG_ONMS_USER.onms-db.credentials.postgresql.acid.zalan.do --from-literal="username=$PG_ONMS_USER" --from-literal="password=$PG_ONMS_PASSWORD" -n $NAMESPACE --dry-run=client -o yaml | kubectl apply -f -
Expand All @@ -87,6 +88,7 @@ if [ "$INSTALL_KAFKA" == "true" ]; then
# Install Kafka via Strimzi
kubectl create secret generic kafka-user-credentials --from-literal="$KAFKA_USER=$KAFKA_PASSWORD" -n $NAMESPACE --dry-run=client -o yaml | kubectl apply -f -
kubectl apply -f "https://strimzi.io/install/latest?namespace=$NAMESPACE" -n $NAMESPACE
kubectl wait --for condition=established crd kafkas.kafka.strimzi.io -n $NAMESPACE --timeout=10s
kubectl apply -f dependencies/kafka.yaml -n $NAMESPACE
fi

Expand Down

0 comments on commit a395d94

Please sign in to comment.