From f4a0d4cbd7c5f54c2690b545980700fd68188069 Mon Sep 17 00:00:00 2001 From: John Mazzitelli Date: Mon, 25 Nov 2024 03:40:07 -0500 Subject: [PATCH] do not allow multiple Kiali CRs with CWA=true and the same instance_name (#849) part of: https://github.com/kiali/kiali/issues/7922 --- roles/default/kiali-deploy/tasks/main.yml | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/roles/default/kiali-deploy/tasks/main.yml b/roles/default/kiali-deploy/tasks/main.yml index d3d7b78d..b5e75a1e 100644 --- a/roles/default/kiali-deploy/tasks/main.yml +++ b/roles/default/kiali-deploy/tasks/main.yml @@ -152,6 +152,24 @@ # restrict to 40 chars, not 63, because instance_name is a prefix and we need to prepend additional chars for some resource names (like "-service-account") - kiali_vars.deployment.instance_name is not regex('^(?![0-9]+$)(?!-)[a-z0-9-]{,40}(? 0 + - current_rolebinding[0].subjects is defined + - current_rolebinding[0].subjects | length > 0 + - current_rolebinding[0].subjects[0].name != kiali_vars.deployment.instance_name + '-service-account' or current_rolebinding[0].subjects[0].namespace != kiali_vars.deployment.namespace + - name: "Determine environment to store in status" set_fact: status_environment: "{{ status_environment | default({}) | combine({item.0: item.1}) }}"