From 91631f3bde306f2d421b113aa158b0f899f39768 Mon Sep 17 00:00:00 2001 From: Joe Martin Date: Mon, 27 May 2024 18:43:39 -0700 Subject: [PATCH] Fixed issue with load balancer never being set to true --- kubernetes/manifests/avs-gke-values.yaml | 2 +- quote-semantic-search/quote-search/config.py | 6 ++---- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/kubernetes/manifests/avs-gke-values.yaml b/kubernetes/manifests/avs-gke-values.yaml index 5b2df67..5e4fae5 100644 --- a/kubernetes/manifests/avs-gke-values.yaml +++ b/kubernetes/manifests/avs-gke-values.yaml @@ -36,7 +36,7 @@ aerospikeVectorSearchConfig: service: enabled: true annotations: - networking.gke.io/load-balancer-type: "Internal" + networking.gke.io/load-balancer-type: "External" ports: - name: "svc-port" port: 5000 diff --git a/quote-semantic-search/quote-search/config.py b/quote-semantic-search/quote-search/config.py index fbb3992..7b4f378 100644 --- a/quote-semantic-search/quote-search/config.py +++ b/quote-semantic-search/quote-search/config.py @@ -3,13 +3,11 @@ def get_bool_env(name, default): env = os.environ.get(name) - if env is None: return default + env = env.lower() - env = env.lower() - - if os.environ.get(name) in ["true", "1"]: + if env in ["true", "1"]: return True else: return False