Commit 5be819b6 authored by k8s-merge-robot's avatar k8s-merge-robot

Merge pull request #23612 from mikedanese/addon-fix

Automatic merge from submit-queue use apply instead of create to setup namespaces and tokens in addon manager when the addon manager restarts, it takes ~15 minutes (1000 seconds) to start the sync loop because it retries creation of namespace and tokens 100 times. Create fails if the tokens already exist. Just use apply.
parents 9ad3b9d6 ffa8bbde
...@@ -59,7 +59,7 @@ function create-resource-from-string() { ...@@ -59,7 +59,7 @@ function create-resource-from-string() {
local -r config_name=$4; local -r config_name=$4;
local -r namespace=$5; local -r namespace=$5;
while [ ${tries} -gt 0 ]; do while [ ${tries} -gt 0 ]; do
echo "${config_string}" | ${KUBECTL} --namespace="${namespace}" create -f - && \ echo "${config_string}" | ${KUBECTL} --namespace="${namespace}" apply -f - && \
echo "== Successfully started ${config_name} in namespace ${namespace} at $(date -Is)" && \ echo "== Successfully started ${config_name} in namespace ${namespace} at $(date -Is)" && \
return 0; return 0;
let tries=tries-1; let tries=tries-1;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment