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 9451cef
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 3 deletions.
3 changes: 3 additions & 0 deletions dev/eda-cr/eda-openshift-cr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,9 @@ spec:
- redhat-operators-pull-secret
admin_password_secret: custom-admin-password

# Disable UI
ui_disabled: false

# -- Example image overrides
# image: quay.io/ansible/eda-server
# image_version: main
Expand Down
2 changes: 1 addition & 1 deletion roles/eda/tasks/update_status.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
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
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 9451cef

Please sign in to comment.