From 8f67aaa48c8924a3953909ba7faed8373e92652a Mon Sep 17 00:00:00 2001 From: waTeim Date: Thu, 26 Oct 2023 15:38:51 -0400 Subject: [PATCH 1/2] Add proxy_rewrite default behavior --- tycho/__init__.py | 2 +- tycho/model.py | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/tycho/__init__.py b/tycho/__init__.py index 99f794b..2c68bd6 100644 --- a/tycho/__init__.py +++ b/tycho/__init__.py @@ -1 +1 @@ -VERSION = "1.17.2" +VERSION = "1.17.3" diff --git a/tycho/model.py b/tycho/model.py index 7cb613d..cc1a534 100644 --- a/tycho/model.py +++ b/tycho/model.py @@ -458,6 +458,8 @@ def parse (config, name, principal, system, service_account, env={}, services={} "security_context": security_context, "init_security_context": init_security_context } + if spec.get('proxy_rewrite_rule',None) != None: + system_specification["proxy_rewrite"]["enabled"] = spec.get('proxy_rewrite_rule') logger.debug (f"parsed-system: {json.dumps(system_specification, indent=2)}") system = System(**system_specification) system.source_text = yaml.dump (system) From af61a3c40b40950b716e117fcc77f9a032f66c7d Mon Sep 17 00:00:00 2001 From: waTeim Date: Thu, 26 Oct 2023 16:18:22 -0400 Subject: [PATCH 2/2] Take out unnecessary None --- tycho/model.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tycho/model.py b/tycho/model.py index cc1a534..a41b653 100644 --- a/tycho/model.py +++ b/tycho/model.py @@ -458,7 +458,7 @@ def parse (config, name, principal, system, service_account, env={}, services={} "security_context": security_context, "init_security_context": init_security_context } - if spec.get('proxy_rewrite_rule',None) != None: + if spec.get('proxy_rewrite_rule') != None: system_specification["proxy_rewrite"]["enabled"] = spec.get('proxy_rewrite_rule') logger.debug (f"parsed-system: {json.dumps(system_specification, indent=2)}") system = System(**system_specification)