From b46b472eba992f4fe89c7106885107d3826cc6d3 Mon Sep 17 00:00:00 2001 From: "Christian M. Adams" Date: Mon, 2 Sep 2024 16:28:44 -0400 Subject: [PATCH] Fix update_status.yml issue when finding api route --- roles/eda/tasks/update_status.yml | 4 ++-- roles/eda/templates/eda-ui.ingress.yaml.j2 | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/roles/eda/tasks/update_status.yml b/roles/eda/tasks/update_status.yml index de2a4147..2b6ab354 100644 --- a/roles/eda/tasks/update_status.yml +++ b/roles/eda/tasks/update_status.yml @@ -41,14 +41,14 @@ api_version: 'route.openshift.io/v1' kind: Route namespace: '{{ ansible_operator_meta.namespace }}' - name: '{{ ui_disabled | bool | ternary(ansible_operator_meta.name + "-api", ansible_operator_meta.name) }}' + name: "{{ ansible_operator_meta.name }}{{ '' if ui_disabled else '-ui' }}" register: route_url - name: Update URL status operator_sdk.util.k8s_status: api_version: '{{ api_version }}' kind: "{{ kind }}" - name: "{{ ansible_operator_meta.name }}" + name: "{{ ansible_operator_meta.name }}{{ '' if ui_disabled else '-ui' }}" namespace: "{{ ansible_operator_meta.namespace }}" status: URL: "https://{{ route_url['resources'][0]['status']['ingress'][0]['host'] }}" diff --git a/roles/eda/templates/eda-ui.ingress.yaml.j2 b/roles/eda/templates/eda-ui.ingress.yaml.j2 index 6dfe9fdb..8227369c 100644 --- a/roles/eda/templates/eda-ui.ingress.yaml.j2 +++ b/roles/eda/templates/eda-ui.ingress.yaml.j2 @@ -5,7 +5,7 @@ apiVersion: '{{ ingress_api_version }}' {% endif %} kind: Ingress metadata: - name: '{{ ansible_operator_meta.name }}-ingress' + name: '{{ ansible_operator_meta.name }}-ui-ingress' namespace: '{{ ansible_operator_meta.namespace }}' labels: {{ lookup("template", "../common/templates/labels/common.yaml.j2") | indent(width=4) | trim }} @@ -52,7 +52,7 @@ apiVersion: '{{ route_api_version }}' {% endif %} kind: Route metadata: - name: '{{ ansible_operator_meta.name }}' + name: '{{ ansible_operator_meta.name }}-ui' namespace: '{{ ansible_operator_meta.namespace }}' labels: {{ lookup("template", "../common/templates/labels/common.yaml.j2") | indent(width=4) | trim }}