mirror of
https://github.com/kubernetes-sigs/kind.git
synced 2025-12-01 07:26:05 +07:00
switch kindnetd to generic sets
kindnetd is typically pre-compiled and not installed with "go get", kind development already uses much more recent go so requiring 1.18 for kindnetd is fine
This commit is contained in:
@@ -252,7 +252,7 @@ func makeNodesReconciler(cniConfig *CNIConfigWriter, hostIP string, ipFamily IPF
|
||||
|
||||
// obtain the PodCIDR gateway
|
||||
var nodeIPv4, nodeIPv6 string
|
||||
for _, ip := range nodeIPs.List() {
|
||||
for _, ip := range sets.List(nodeIPs) {
|
||||
if isIPv6String(ip) {
|
||||
nodeIPv6 = ip
|
||||
} else {
|
||||
@@ -285,8 +285,8 @@ func makeNodesReconciler(cniConfig *CNIConfigWriter, hostIP string, ipFamily IPF
|
||||
}
|
||||
|
||||
// internalIPs returns the internal IP addresses for node
|
||||
func internalIPs(node corev1.Node) sets.String {
|
||||
ips := sets.NewString()
|
||||
func internalIPs(node corev1.Node) sets.Set[string] {
|
||||
ips := sets.New[string]()
|
||||
// check the node.Status.Addresses
|
||||
for _, address := range node.Status.Addresses {
|
||||
if address.Type == "InternalIP" {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
module sigs.k8s.io/kind/images/kindnetd
|
||||
|
||||
go 1.17
|
||||
go 1.18
|
||||
|
||||
require (
|
||||
github.com/coreos/go-iptables v0.6.0
|
||||
|
||||
Reference in New Issue
Block a user