Skip to content

Commit 7514907

Browse files
committed
quick-start: make apk fail fast
apk add may fail due to things like transient upstream unavailability. Prior to this change we would get stuck in an infinite loop of trying to invoke curl. This change makes the simplest change to make it fail and let K8s handle restarting the init container.
1 parent 4b62877 commit 7514907

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

deployments/charts/quick-start/values.yaml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -743,6 +743,9 @@ backend-operator:
743743
- sh
744744
- -c
745745
- |
746+
# Mostly used to fail fast if there is a transient issue with apk add.
747+
# For simplicity let K8s restart and retry the container.
748+
set -e
746749
apk add --no-cache curl jq
747750
echo "Waiting for backend-operator-token to be created..."
748751
until curl -s http://quick-start.osmo/api/auth/access_token/service | jq -e '.[] | select(.token_name == "backend-operator-token")' >/dev/null 2>&1; do
@@ -791,6 +794,9 @@ backend-operator:
791794
- sh
792795
- -c
793796
- |
797+
# Mostly used to fail fast if there is a transient issue with apk add.
798+
# For simplicity let K8s restart and retry the container.
799+
set -e
794800
apk add --no-cache curl jq
795801
echo "Waiting for backend-operator-token to be created..."
796802
until curl -s http://quick-start.osmo/api/auth/access_token/service | jq -e '.[] | select(.token_name == "backend-operator-token")' >/dev/null 2>&1; do

0 commit comments

Comments
 (0)