From 838dd2750255766aec1461bb8bbc953204b78db7 Mon Sep 17 00:00:00 2001 From: Hari Sekhon Date: Tue, 7 May 2024 10:08:11 +0400 Subject: [PATCH] updated .envrc --- .envrc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.envrc b/.envrc index 81d2a3c7..e1d1e887 100644 --- a/.envrc +++ b/.envrc @@ -110,10 +110,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