Merge pull request #14302 from BlaineEXE/multus-support-and-test-ipv6

multus: add and test ipv6 support for validation tool
This commit is contained in:
Blaine Gardner authored and GitHub committed 2024-06-04 13:18:41 -06:00
commit f74bf4088c
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" } }'