From 572f05629d754b14fcf929a75508537f436c4fe1 Mon Sep 17 00:00:00 2001 From: John Mazzitelli Date: Thu, 31 Oct 2024 17:08:22 -0400 Subject: [PATCH] delete oauthclient if not needed (this looks like a bug we've had for a while) --- .../default/kiali-deploy/tasks/openshift/os-main.yml | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/roles/default/kiali-deploy/tasks/openshift/os-main.yml b/roles/default/kiali-deploy/tasks/openshift/os-main.yml index 4c5c0fd8..265b3cb3 100644 --- a/roles/default/kiali-deploy/tasks/openshift/os-main.yml +++ b/roles/default/kiali-deploy/tasks/openshift/os-main.yml @@ -79,6 +79,17 @@ when: - is_openshift == True +- name: Delete OAuthClient on OpenShift if not using auth.strategy openshift + k8s: + state: absent + api_version: "oauth.openshift.io/v1" + kind: "OAuthClient" + label_selectors: + - "app.kubernetes.io/instance = {{ kiali_vars.deployment.instance_name }}" + when: + - is_openshift == True + - kiali_vars.auth.strategy != "openshift" + - name: Get the Kiali Route URL include_tasks: openshift/os-get-kiali-route-url.yml when: