Skip to content

Commit 670f562

Browse files
[ci_gen_kustomize_values] BGP: generate gateway IP for network bridges from CIDR
Use `ansible.utils.nthhost(1)` to derive the bridge gateway IP directly from the network CIDR instead of requiring a hardcoded `gateway` field in `values.yaml`. This ensures the `internalapi` and `storage` bridge gateway addresses in BGP deployments are always consistent with the configured subnet. Required by the NNCP fix in the `architecture` repo (OSPRH-32725), where the NNCP desired state must include the bridge gateway IP so NMState does not remove it during periodic reconciliation cycles, which otherwise causes `ovn-controller` to lose connectivity to the OVN SB DB pods. Related-Issue: #OSPRH-32725 Assisted-By: Claude Sonnet 4.6 Signed-off-by: Eduardo Olivares <eolivare@redhat.com>
1 parent 8b22a75 commit 670f562

2 files changed

Lines changed: 2 additions & 0 deletions

File tree

roles/ci_gen_kustomize_values/templates/bgp-l3-xl/network-values/values.yaml.j2

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -108,6 +108,7 @@ data:
108108
{% endfor %}
109109
{% endif %}
110110
{% endif %}
111+
gateway: {{ network.network_v4 | ansible.utils.nthhost(1) }}
111112
prefix-length: {{ network.network_v4 | ansible.utils.ipaddr('prefix') }}
112113
mtu: {{ network.mtu | default(1500) }}
113114
{% if network.vlan_id is defined %}

roles/ci_gen_kustomize_values/templates/bgp_dt01/network-values/values.yaml.j2

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -114,6 +114,7 @@ data:
114114
{% endfor %}
115115
{% endif %}
116116
{% endif %}
117+
gateway: {{ network.network_v4 | ansible.utils.nthhost(1) }}
117118
prefix-length: {{ network.network_v4 | ansible.utils.ipaddr('prefix') }}
118119
mtu: {{ network.mtu | default(1500) }}
119120
{% if network.vlan_id is defined %}

0 commit comments

Comments
 (0)