Skip to content

Commit 0ef54e1

Browse files
committed
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
1 parent f6e00cf commit 0ef54e1

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

images/kindnetd/cmd/kindnetd/main.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -252,7 +252,7 @@ func makeNodesReconciler(cniConfig *CNIConfigWriter, hostIP string, ipFamily IPF
252252

253253
// obtain the PodCIDR gateway
254254
var nodeIPv4, nodeIPv6 string
255-
for _, ip := range nodeIPs.List() {
255+
for _, ip := range sets.List(nodeIPs) {
256256
if isIPv6String(ip) {
257257
nodeIPv6 = ip
258258
} else {
@@ -285,8 +285,8 @@ func makeNodesReconciler(cniConfig *CNIConfigWriter, hostIP string, ipFamily IPF
285285
}
286286

287287
// internalIPs returns the internal IP addresses for node
288-
func internalIPs(node corev1.Node) sets.String {
289-
ips := sets.NewString()
288+
func internalIPs(node corev1.Node) sets.Set[string] {
289+
ips := sets.New[string]()
290290
// check the node.Status.Addresses
291291
for _, address := range node.Status.Addresses {
292292
if address.Type == "InternalIP" {

images/kindnetd/go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
module sigs.k8s.io/kind/images/kindnetd
22

3-
go 1.17
3+
go 1.18
44

55
require (
66
github.com/coreos/go-iptables v0.6.0

0 commit comments

Comments
 (0)