Skip to content

Commit

Permalink
Fix update_status.yml issue when finding api route
Browse files Browse the repository at this point in the history
  • Loading branch information
rooftopcellist committed Sep 3, 2024
1 parent 43e7ae8 commit b46b472
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions roles/eda/tasks/update_status.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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'] }}"
Expand Down
4 changes: 2 additions & 2 deletions roles/eda/templates/eda-ui.ingress.yaml.j2
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}
Expand Down Expand Up @@ -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 }}
Expand Down

0 comments on commit b46b472

Please sign in to comment.