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:
3 files changed
+10
-1
No files matched your search
@@ -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
|
||||
|
||||
@@ -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" } }'
|
||||
Reference in new issue
Block a user