mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-23 19:56:01 +00:00
Fix NodeAuthenticator tests in dual stack
This commit is contained in:
parent
99c35dc37c
commit
676958c2bd
@ -41,14 +41,16 @@ var _ = SIGDescribe("[Feature:NodeAuthenticator]", func() {
|
|||||||
ginkgo.BeforeEach(func() {
|
ginkgo.BeforeEach(func() {
|
||||||
ns = f.Namespace.Name
|
ns = f.Namespace.Name
|
||||||
|
|
||||||
nodeList, err := f.ClientSet.CoreV1().Nodes().List(context.TODO(), metav1.ListOptions{})
|
nodes, err := e2enode.GetBoundedReadySchedulableNodes(f.ClientSet, 1)
|
||||||
framework.ExpectNoError(err, "failed to list nodes in namespace: %s", ns)
|
framework.ExpectNoError(err)
|
||||||
framework.ExpectNotEqual(len(nodeList.Items), 0)
|
|
||||||
|
|
||||||
pickedNode := nodeList.Items[0]
|
family := v1.IPv4Protocol
|
||||||
nodeIPs = e2enode.GetAddresses(&pickedNode, v1.NodeExternalIP)
|
if framework.TestContext.ClusterIsIPv6() {
|
||||||
// The pods running in the cluster can see the internal addresses.
|
family = v1.IPv6Protocol
|
||||||
nodeIPs = append(nodeIPs, e2enode.GetAddresses(&pickedNode, v1.NodeInternalIP)...)
|
}
|
||||||
|
|
||||||
|
nodeIPs := e2enode.GetAddressesByTypeAndFamily(&nodes.Items[0], v1.NodeInternalIP, family)
|
||||||
|
framework.ExpectNotEqual(len(nodeIPs), 0)
|
||||||
|
|
||||||
// make sure ServiceAccount admission controller is enabled, so secret generation on SA creation works
|
// make sure ServiceAccount admission controller is enabled, so secret generation on SA creation works
|
||||||
saName := "default"
|
saName := "default"
|
||||||
|
Loading…
Reference in New Issue
Block a user