Merge pull request #14306 from rook/mergify/bp/release-1.14/pr-14302

multus: add and test ipv6 support for validation tool (backport #14302)
This commit is contained in:
Travis Nielsen authored and GitHub committed 2024-06-06 10:38:34 -06:00
commit 72193e915a
3 files changed
+10 -1

No files matched your search

+3
View File
@@ -7,7 +7,10 @@ metadata:
data:
server.conf: |
server {
# listen on all IPv4 addrs
listen 8080;
# listen on all IPv6 addrs
listen [::]:8080;
server_name localhost;
# return the client ip upon connect
+6
View File
@@ -113,6 +113,12 @@ func (vt *ValidationTest) generateClientTemplateConfig(
if attachCluster && serverClusterAddr != "" {
netNamesAndAddresses["cluster"] = serverClusterAddr
}
for name, addr := range netNamesAndAddresses {
if strings.Contains(addr, ":") {
// it's an IPv6 address and needs square brackets around it to support :<port> addition
netNamesAndAddresses[name] = "[" + addr + "]"
}
}
return clientTemplateConfig{
NodeType: nodeType,
ClientType: clientType,
@@ -17,4 +17,4 @@ metadata:
labels:
annotations:
spec:
config: '{ "cniVersion": "0.3.1", "type": "macvlan", "master": "eth0", "mode": "bridge", "ipam": { "type": "whereabouts", "range": "192.168.30.0/24" } }'
config: '{ "cniVersion": "0.3.1", "type": "macvlan", "master": "eth0", "mode": "bridge", "ipam": { "type": "whereabouts", "range": "fc00::/96" } }'