Skip to content

Commit

Permalink
Merge pull request kubernetes#122373 from danwinship/linux-proxy
Browse files Browse the repository at this point in the history
Properly build-tag the Linux kube-proxy backend code
  • Loading branch information
k8s-ci-robot authored Jan 4, 2024
2 parents 91c57de + c1ce1e0 commit c0dc420
Show file tree
Hide file tree
Showing 41 changed files with 107 additions and 314 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
//go:build !windows
// +build !windows
//go:build linux
// +build linux

/*
Copyright 2018 The Kubernetes Authors.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
//go:build !windows
// +build !windows
//go:build linux
// +build linux

/*
Copyright 2014 The Kubernetes Authors.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
//go:build !windows
// +build !windows
//go:build linux
// +build linux

/*
Copyright 2018 The Kubernetes Authors.
Expand Down
3 changes: 3 additions & 0 deletions pkg/proxy/conntrack/cleanup.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
//go:build linux
// +build linux

/*
Copyright 2023 The Kubernetes Authors.
Expand Down
3 changes: 3 additions & 0 deletions pkg/proxy/conntrack/conntrack.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
//go:build linux
// +build linux

/*
Copyright 2016 The Kubernetes Authors.
Expand Down
3 changes: 3 additions & 0 deletions pkg/proxy/conntrack/conntrack_test.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
//go:build linux
// +build linux

/*
Copyright 2015 The Kubernetes Authors.
Expand Down
3 changes: 3 additions & 0 deletions pkg/proxy/iptables/number_generated_rules_test.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
//go:build linux
// +build linux

/*
Copyright 2022 The Kubernetes Authors.
Expand Down
3 changes: 3 additions & 0 deletions pkg/proxy/iptables/proxier.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
//go:build linux
// +build linux

/*
Copyright 2015 The Kubernetes Authors.
Expand Down
3 changes: 3 additions & 0 deletions pkg/proxy/iptables/proxier_test.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
//go:build linux
// +build linux

/*
Copyright 2015 The Kubernetes Authors.
Expand Down
3 changes: 3 additions & 0 deletions pkg/proxy/ipvs/graceful_termination.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
//go:build linux
// +build linux

/*
Copyright 2015 The Kubernetes Authors.
Expand Down
4 changes: 2 additions & 2 deletions pkg/proxy/ipvs/graceful_termination_test.go
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
//go:build !windows
// +build !windows
//go:build linux
// +build linux

/*
Copyright 2019 The Kubernetes Authors.
Expand Down
3 changes: 3 additions & 0 deletions pkg/proxy/ipvs/ipset.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
//go:build linux
// +build linux

/*
Copyright 2017 The Kubernetes Authors.
Expand Down
3 changes: 3 additions & 0 deletions pkg/proxy/ipvs/ipset/ipset.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
//go:build linux
// +build linux

/*
Copyright 2017 The Kubernetes Authors.
Expand Down
3 changes: 3 additions & 0 deletions pkg/proxy/ipvs/ipset/ipset_test.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
//go:build linux
// +build linux

/*
Copyright 2017 The Kubernetes Authors.
Expand Down
3 changes: 3 additions & 0 deletions pkg/proxy/ipvs/ipset/testing/fake.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
//go:build linux
// +build linux

/*
Copyright 2017 The Kubernetes Authors.
Expand Down
3 changes: 3 additions & 0 deletions pkg/proxy/ipvs/ipset/testing/fake_test.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
//go:build linux
// +build linux

/*
Copyright 2017 The Kubernetes Authors.
Expand Down
3 changes: 3 additions & 0 deletions pkg/proxy/ipvs/ipset/types.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
//go:build linux
// +build linux

/*
Copyright 2017 The Kubernetes Authors.
Expand Down
4 changes: 2 additions & 2 deletions pkg/proxy/ipvs/ipset_test.go
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
//go:build !windows
// +build !windows
//go:build linux
// +build linux

/*
Copyright 2017 The Kubernetes Authors.
Expand Down
82 changes: 0 additions & 82 deletions pkg/proxy/ipvs/netlink_unsupported.go

This file was deleted.

9 changes: 5 additions & 4 deletions pkg/proxy/ipvs/proxier.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
//go:build linux
// +build linux

/*
Copyright 2017 The Kubernetes Authors.
Expand Down Expand Up @@ -489,10 +492,8 @@ func NewDualStackProxier(
initOnly bool,
) (proxy.Provider, error) {

safeIpset := newSafeIpset(ipset)

// Create an ipv4 instance of the single-stack proxier
ipv4Proxier, err := NewProxier(v1.IPv4Protocol, ipt[0], ipvs, safeIpset, sysctl,
ipv4Proxier, err := NewProxier(v1.IPv4Protocol, ipt[0], ipvs, ipset, sysctl,
exec, syncPeriod, minSyncPeriod, filterCIDRs(false, excludeCIDRs), strictARP,
tcpTimeout, tcpFinTimeout, udpTimeout, masqueradeAll, masqueradeBit,
localDetectors[0], hostname, nodeIPs[v1.IPv4Protocol], recorder,
Expand All @@ -501,7 +502,7 @@ func NewDualStackProxier(
return nil, fmt.Errorf("unable to create ipv4 proxier: %v", err)
}

ipv6Proxier, err := NewProxier(v1.IPv6Protocol, ipt[1], ipvs, safeIpset, sysctl,
ipv6Proxier, err := NewProxier(v1.IPv6Protocol, ipt[1], ipvs, ipset, sysctl,
exec, syncPeriod, minSyncPeriod, filterCIDRs(true, excludeCIDRs), strictARP,
tcpTimeout, tcpFinTimeout, udpTimeout, masqueradeAll, masqueradeBit,
localDetectors[1], hostname, nodeIPs[v1.IPv6Protocol], recorder,
Expand Down
4 changes: 2 additions & 2 deletions pkg/proxy/ipvs/proxier_test.go
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
//go:build !windows
// +build !windows
//go:build linux
// +build linux

/*
Copyright 2017 The Kubernetes Authors.
Expand Down
104 changes: 0 additions & 104 deletions pkg/proxy/ipvs/safe_ipset.go

This file was deleted.

3 changes: 3 additions & 0 deletions pkg/proxy/ipvs/testing/fake.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
//go:build linux
// +build linux

/*
Copyright 2017 The Kubernetes Authors.
Expand Down
3 changes: 3 additions & 0 deletions pkg/proxy/ipvs/testing/fake_test.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
//go:build linux
// +build linux

/*
Copyright 2017 The Kubernetes Authors.
Expand Down
3 changes: 3 additions & 0 deletions pkg/proxy/ipvs/testing/util.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
//go:build linux
// +build linux

/*
Copyright 2017 The Kubernetes Authors.
Expand Down
3 changes: 3 additions & 0 deletions pkg/proxy/ipvs/util/ipvs.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
//go:build linux
// +build linux

/*
Copyright 2017 The Kubernetes Authors.
Expand Down
3 changes: 3 additions & 0 deletions pkg/proxy/ipvs/util/ipvs_test.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
//go:build linux
// +build linux

/*
Copyright 2017 The Kubernetes Authors.
Expand Down
Loading

0 comments on commit c0dc420

Please sign in to comment.