Skip to content

Commit

Permalink
fix(cache): Fix cache deployer not regenerating secrets when secret n…
Browse files Browse the repository at this point in the history
…ot present (#4171)
  • Loading branch information
Bobgy committed Jul 9, 2020
1 parent 166e004 commit d727c91
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions backend/src/cache/deployer/deploy-cache-service.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
# limitations under the License.

# This script is for deploying cache service to an existing cluster.
# Prerequisite: config kubectl to talk to your cluster. See ref below:
# Prerequisite: config kubectl to talk to your cluster. See ref below:
# https://cloud.google.com/kubernetes-engine/docs/how-to/cluster-access-for-kubectl

set -ex
Expand All @@ -40,7 +40,7 @@ fi

webhook_secret_exists=false
if grep "${WEBHOOK_SECRET_NAME}" -w <cache_secret.txt; then
webhook_config_exists=true
webhook_secret_exists=true
fi

if [ "$webhook_config_exists" == "true" ] && [ "$webhook_config_exists" == "true" ]; then
Expand Down Expand Up @@ -76,8 +76,8 @@ cat ./cache-configmap-ca-bundle.yaml
kubectl apply -f ./cache-configmap-ca-bundle.yaml --namespace "${NAMESPACE}"

# TODO: Check whether we really need to check for the existence of the webhook
# Usually the Kubernetes objects appear immediately.
while true; do
# Usually the Kubernetes objects appear immediately.
while true; do
# Should fail if there are connectivity problems
kubectl get mutatingwebhookconfigurations "${MUTATING_WEBHOOK_CONFIGURATION_NAME}" --namespace "${NAMESPACE}" --ignore-not-found >webhooks.txt

Expand All @@ -87,5 +87,5 @@ while true; do
else
echo "Webhook is not visible yet. Waiting a bit."
sleep 10s
fi
fi
done

0 comments on commit d727c91

Please sign in to comment.