From a399468b692fea1fd5b9c7030bf307dcd457e781 Mon Sep 17 00:00:00 2001 From: Hari Sekhon Date: Tue, 7 May 2024 10:08:36 +0400 Subject: [PATCH] updated .envrc-kubernetes --- .envrc-kubernetes | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.envrc-kubernetes b/.envrc-kubernetes index bb6237d3..04e9bd21 100644 --- a/.envrc-kubernetes +++ b/.envrc-kubernetes @@ -98,10 +98,10 @@ kube_context(){ echo >&2 fi - # race condition - kubectl config get-contexts fails to find the context and switch in many runs without this sleep + # race condition - 'kubectl config get-contexts' fails to find the context and switch in many runs without this sleep context_found=0 local i - for ((i=0; i < 10; i++)); do + for ((i=0; i < 5; i++)); do # surprisingly unreliable - if kubectl config get-contexts -o name | grep -Fxq "$context" can miss even after these succeed #if [ -s "$KUBECONFIG" ]; then #if cmp --quiet "$from_kubeconfig" "$KUBECONFIG"; then