Skip to content

Commit

Permalink
Add comment and link to issue
Browse files Browse the repository at this point in the history
  • Loading branch information
lotharbach committed Jan 16, 2025
1 parent 57690b0 commit 916f972
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions pkg/internal/infrastructure/templates/main.tpl.tf
Original file line number Diff line number Diff line change
Expand Up @@ -227,6 +227,12 @@ openstack_networking_network_v2.cluster.name
data.openstack_networking_network_v2.cluster.name
{{ end -}}
{{- end -}}

// Openstack API could return an IPv6 external IP even for v4-only clusters see
// https://github.com/gardener/gardener-extension-provider-openstack/issues/897
// We filter for IPs that match the v4 pattern (4 numbers seperated by dots)
// and only return one just in case there are mulitple as the rest of the
// codebase is currently expecting a single v4 IP
{{- define "router-ip" -}}
{{ if .create.router -}}
one([for external_fixed_ip in openstack_networking_router_v2.router.external_fixed_ip : external_fixed_ip.ip_address if can(regex("^(?:[0-9]{1,3}\\.){3}[0-9]{1,3}$", external_fixed_ip.ip_address))])
Expand Down

0 comments on commit 916f972

Please sign in to comment.