mirror of https://github.com/k3s-io/k3s
Merge pull request #75237 from aojea/ipv6_downward
Add IPv6 support to the Downward e2e API testk3s-v1.15.3
commit
ed2ab71710
|
@ -78,7 +78,7 @@ var _ = Describe("[sig-node] Downward API", func() {
|
|||
expectations := []string{
|
||||
fmt.Sprintf("POD_NAME=%v", podName),
|
||||
fmt.Sprintf("POD_NAMESPACE=%v", f.Namespace.Name),
|
||||
"POD_IP=(?:\\d+)\\.(?:\\d+)\\.(?:\\d+)\\.(?:\\d+)",
|
||||
fmt.Sprintf("POD_IP=%v|%v", framework.RegexIPv4, framework.RegexIPv6),
|
||||
}
|
||||
|
||||
testDownwardAPI(f, podName, env, expectations)
|
||||
|
@ -105,7 +105,7 @@ var _ = Describe("[sig-node] Downward API", func() {
|
|||
}
|
||||
|
||||
expectations := []string{
|
||||
"HOST_IP=(?:\\d+)\\.(?:\\d+)\\.(?:\\d+)\\.(?:\\d+)",
|
||||
fmt.Sprintf("HOST_IP=%v|%v", framework.RegexIPv4, framework.RegexIPv6),
|
||||
}
|
||||
|
||||
testDownwardAPI(f, podName, env, expectations)
|
||||
|
|
|
@ -65,6 +65,10 @@ const (
|
|||
maxNetProxyPodsCount = 10
|
||||
// SessionAffinityChecks is number of checks to hit a given set of endpoints when enable session affinity.
|
||||
SessionAffinityChecks = 10
|
||||
// Regex to match IPv4 addresses
|
||||
RegexIPv4 = "(?:\\d+)\\.(?:\\d+)\\.(?:\\d+)\\.(?:\\d+)"
|
||||
// Regex to match IPv6 addresses
|
||||
RegexIPv6 = "(?:(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){6})(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\.){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:::(?:(?:(?:[0-9a-fA-F]{1,4})):){5})(?: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|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\.){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,4}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\.){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,5}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,6}(?:(?:[0-9a-fA-F]{1,4})))?::))))"
|
||||
)
|
||||
|
||||
var netexecImageName = imageutils.GetE2EImage(imageutils.Netexec)
|
||||
|
|
Loading…
Reference in New Issue