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:
Benjamin Elder
2023-08-24 14:51:24 -07:00
parent 5f59a835fa
commit f9a254d7da
2 changed files with 4 additions and 4 deletions

View File

@@ -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" {

View File

@@ -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