From 69e2552f011df3da7bb3372e1973562255c34acd Mon Sep 17 00:00:00 2001 From: "David.Houck" Date: Fri, 13 Dec 2024 17:08:54 -0500 Subject: [PATCH] Add ingress-nginx version to strict-validate-path-type use expression Signed-off-by: David.Houck --- roles/baseline/defaults/main.yml | 2 +- roles/baseline/tasks/ingress-nginx.yaml | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/roles/baseline/defaults/main.yml b/roles/baseline/defaults/main.yml index 8eb971a1..ec37a676 100644 --- a/roles/baseline/defaults/main.yml +++ b/roles/baseline/defaults/main.yml @@ -104,7 +104,7 @@ INGRESS_NGINX_STRICT_VALIDATE_PATH_TYPE: config: strict-validate-path-type: "false" -# Ingress-nginx - Required for 2024.12 or later with v1.12+ but OK for any ingress-nginx version +# Ingress-nginx - Required for ingress-nginx v1.12+ INGRESS_NGINX_ANNOTATIONS_RISK_LEVEL: controller: config: diff --git a/roles/baseline/tasks/ingress-nginx.yaml b/roles/baseline/tasks/ingress-nginx.yaml index 1d823e95..eddb9237 100644 --- a/roles/baseline/tasks/ingress-nginx.yaml +++ b/roles/baseline/tasks/ingress-nginx.yaml @@ -85,7 +85,7 @@ - name: Disable strict_validate_path_type in INGRESS_NGINX_CONFIG set_fact: INGRESS_NGINX_CONFIG: "{{ INGRESS_NGINX_CONFIG | combine(INGRESS_NGINX_STRICT_VALIDATE_PATH_TYPE, recursive=True) }}" - when: V4_CFG_CADENCE_VERSION is version('2024.11', "<=") and V4_CFG_CADENCE_NAME|lower != "fast" + when: (V4_CFG_CADENCE_VERSION is version('2024.11', "<=") and V4_CFG_CADENCE_NAME|lower != "fast") and INGRESS_NGINX_CHART_VERSION is version('4.12.0', ">=") tags: - install - update @@ -93,7 +93,7 @@ - name: Add annotations_risk_level to INGRESS_NGINX_CONFIG set_fact: INGRESS_NGINX_CONFIG: "{{ INGRESS_NGINX_CONFIG | combine(INGRESS_NGINX_ANNOTATIONS_RISK_LEVEL, recursive=True) }}" - when: (V4_CFG_CADENCE_VERSION is version('2024.12', ">=") or V4_CFG_CADENCE_NAME|lower == "fast") or INGRESS_NGINX_CHART_VERSION is version('4.12.0', ">=") + when: (V4_CFG_CADENCE_VERSION is version('2024.12', ">=") or V4_CFG_CADENCE_NAME|lower == "fast") and INGRESS_NGINX_CHART_VERSION is version('4.12.0', ">=") tags: - install - update