Skip to content

Commit

Permalink
upd v1 gateway route with validate upstream
Browse files Browse the repository at this point in the history
  • Loading branch information
ikethecoder committed Nov 15, 2024
1 parent a5b56f5 commit 7743dfd
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 6 deletions.
5 changes: 2 additions & 3 deletions microservices/gatewayApi/v1/routes/gateway.py
Original file line number Diff line number Diff line change
Expand Up @@ -272,9 +272,8 @@ def write_config(namespace: str) -> object:
protected_kube_namespaces = json.loads(app.config['protectedKubeNamespaces'])

dp = get_data_plane(ns_attributes)
do_validate_upstreams = app.config['data_planes'][dp]["validate-upstreams"]
if do_validate_upstreams is None:
do_validate_upstreams = False

do_validate_upstreams = app.config['data_planes'][dp].get("validate-upstreams", False)

log.debug("Validate upstreams %s %s" % (dp, do_validate_upstreams))

Expand Down
4 changes: 1 addition & 3 deletions microservices/gatewayApi/v2/routes/gateway.py
Original file line number Diff line number Diff line change
Expand Up @@ -268,9 +268,7 @@ def write_config(namespace: str) -> object:
try:
protected_kube_namespaces = json.loads(app.config['protectedKubeNamespaces'])

do_validate_upstreams = app.config['data_planes'][dp].get("validate-upstreams")
if do_validate_upstreams is None:
do_validate_upstreams = False
do_validate_upstreams = app.config['data_planes'][dp].get("validate-upstreams", False)

log.debug("Validate upstreams %s %s" % (dp, do_validate_upstreams))
validate_upstream(gw_config, ns_attributes, protected_kube_namespaces, do_validate_upstreams)
Expand Down

0 comments on commit 7743dfd

Please sign in to comment.