Skip to content

Commit

Permalink
fix scenario when neither hostname or ingress_hosts is defined
Browse files Browse the repository at this point in the history
  • Loading branch information
Guillaume Lefevre committed Jan 5, 2024
1 parent ac7fc08 commit 72ff073
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions roles/installer/templates/networking/ingress.yaml.j2
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,8 @@ spec:
ingressClassName: '{{ ingress_class_name }}'
{% endif %}
rules:
{% if hostname and (not ingress_hosts) %}
- host: {{ hostname }}
http:
{% if not ingress_hosts %}
- http:
paths:
- path: '{{ ingress_path }}'
pathType: '{{ ingress_path_type }}'
Expand All @@ -35,6 +34,9 @@ spec:
name: '{{ ansible_operator_meta.name }}-service'
port:
number: 80
{% if hostname %}
host: {{ hostname }}
{% endif %}
{% if ingress_controller|lower == "contour" %}
- path: '{{ ingress_path.rstrip("/") }}/websocket'
pathType: '{{ ingress_path_type }}'
Expand Down

0 comments on commit 72ff073

Please sign in to comment.