Commit Graph

74 Commits

Author SHA1 Message Date
Kubernetes Prow Robot
fa294f3e4e
Merge pull request #115527 from sondinht/ipvs_sh
Ipvs: Enable Source Port hash flag for "mh" method.
2023-02-14 04:25:30 -08:00
Lars Ekman
50cfd6ca80 Add uablrek in pkg/util/ipvs/OWNERS 2023-02-13 19:11:21 +01:00
Son Dinh
4f75949bcb Ipvs: Add a new FlagSourceHash to "mh" distribution method.
With the flag, ipvs uses both source IP and source port (instead of
only source IP) to distribute new connections evently to endpoints
that avoids sending all connections from the same client (i.e. same
source IP) to one single endpoint.

User can explicitly set sessionAffinity in service spec to keep all
connections from a source IP to end up on the same endpoint if needed.

Change-Id: I42f950c0840ac06a4ee68a7bbdeab0fc5505c71f
2023-02-11 20:51:02 +11:00
Lars Ekman
90c03dcf9a gofmt 2022-12-23 12:34:31 +01:00
Lars Ekman
4ef7726c4e Remove obsolete test case 2022-12-23 11:46:45 +01:00
Lars Ekman
cf214d0738 Clean-up un-used code 2022-12-23 10:54:51 +01:00
Davanum Srinivas
a9593d634c
Generate and format files
- Run hack/update-codegen.sh
- Run hack/update-generated-device-plugin.sh
- Run hack/update-generated-protobuf.sh
- Run hack/update-generated-runtime.sh
- Run hack/update-generated-swagger-docs.sh
- Run hack/update-openapi-spec.sh
- Run hack/update-gofmt.sh

Signed-off-by: Davanum Srinivas <davanum@gmail.com>
2022-07-26 13:14:05 -04:00
jianfei.zhang
49e7a7b51d fix:handle error and remove Redundant type conversion
Signed-off-by: jianfei.zhang <jianfei.zhang@daocloud.io>
2022-07-19 11:30:46 +08:00
Davanum Srinivas
9682b7248f
OWNERS cleanup - Jan 2021 Week 1
Signed-off-by: Davanum Srinivas <davanum@gmail.com>
2022-01-10 08:14:29 -05:00
Manish Kumar
0a013e9a79 replace syscall with sys/unix pkg in pkg/util/ipvs 2021-12-14 00:09:02 +05:30
Davanum Srinivas
9405e9b55e
Check in OWNERS modified by update-yamlfmt.sh
Signed-off-by: Davanum Srinivas <davanum@gmail.com>
2021-12-09 21:31:26 -05:00
Dan Winship
508d574921 Remove some dead code in the ipvs proxy 2021-10-04 09:04:35 -04:00
Stephen Augustus
481cf6fbe7
generated: Run hack/update-gofmt.sh
Signed-off-by: Stephen Augustus <foo@auggie.dev>
2021-08-24 15:47:49 -04:00
Antonio Ojea
0cd75e8fec run hack/update-netparse-cve.sh 2021-08-20 10:42:09 +02:00
Soumya Ghosh Dastidar
1e949fa928 updating github.com/pkg/errors with native errors pkg
Signed-off-by: Soumya Ghosh Dastidar <gdsoumya@gmail.com>
2021-06-21 22:23:33 +05:30
Benjamin Elder
56e092e382 hack/update-bazel.sh 2021-02-28 15:17:29 -08:00
10177505
2cc888d474 Remove Const IPVSProxyMode 2020-11-05 16:17:18 +08:00
Jordan Liggitt
f33dc28094 generated: hack/update-hack-tools.sh && hack/update-vendor.sh 2020-07-25 16:45:02 -04:00
Kubernetes Prow Robot
ef198ec7ca
Merge pull request #90316 from tangcong/fix-ipvs-staticheck-err
fix ipvs staticcheck error
2020-05-19 20:34:32 -07:00
Davanum Srinivas
07d88617e5
Run hack/update-vendor.sh
Signed-off-by: Davanum Srinivas <davanum@gmail.com>
2020-05-16 07:54:33 -04:00
Davanum Srinivas
442a69c3bd
switch over k/k to use klog v2
Signed-off-by: Davanum Srinivas <davanum@gmail.com>
2020-05-16 07:54:27 -04:00
Carlos de Paula
b3d84fac52 Add error messages to IPVS module
Signed-off-by: Carlos de Paula <me@carlosedp.com>
2020-04-22 15:21:15 -03:00
tangcong
764b902d72 fix ipvs staticcheck error 2020-04-21 07:25:28 +08:00
Kubernetes Prow Robot
c2ae0bd763
Merge pull request #74073 from Nordix/issue-70020
Issue #70020; Flush Conntrack entities for SCTP
2020-04-01 22:14:24 -07:00
Ricardo Pchevuzinske Katz
5c48f209a5 Update ipvs library to the new repo and upgrade library version 2020-03-26 11:20:01 -03:00
Lars Ekman
aa8521df66 Issue #70020; Flush Conntrack entities for SCTP
Signed-off-by: Lars Ekman <lars.g.ekman@est.tech>
2020-03-11 09:56:54 +01:00
SataQiu
51c742c1dd fix staticcheck failures of pkg/util/ipconfig pkg/util/iptables pkg/util/ipvs/testing 2020-01-09 16:05:11 +08:00
Andrew Sy Kim
db2c048db9 support configuration of kube-proxy IPVS tcp,tcpfin,udp timeout
Signed-off-by: Andrew Sy Kim <kiman@vmware.com>
2019-12-17 04:35:08 -05:00
Jordan Liggitt
297570e06a hack/update-vendor.sh 2019-11-06 17:42:34 -05:00
Emrecan BATI
90ce2d50d3 Add GetKernelVersion to ipvs.KernelHandler interface
ipvs `getProxyMode` test fails on mac as `utilipvs.GetRequiredIPVSMods`
try to reach `/proc/sys/kernel/osrelease` to find version of the running
linux kernel. Linux kernel version is used to determine the list of required
kernel modules for ipvs.

Logic to determine kernel version is moved to GetKernelVersion
method in LinuxKernelHandler which implements ipvs.KernelHandler.
Mock KernelHandler is used in the test cases.

Read and parse file is converted to go function instead of execing cut.
2019-07-31 22:10:44 +03:00
Andrew Sy Kim
3629ed10fa add myself and lbernail as IPVS approvers
Signed-off-by: Andrew Sy Kim <kiman@vmware.com>
2019-07-11 19:06:59 -04:00
Andrew Sy Kim
f6d9a45643 add myself and Laurent as ipvs proxy reviewers
Signed-off-by: Andrew Sy Kim <kiman@vmware.com>
2019-05-29 01:43:50 -04:00
Andrew Sy Kim
15682dfc2a export serviceKey and realServerKey in fake ipvs for easier test fixtures
Signed-off-by: Andrew Sy Kim <kiman@vmware.com>
2019-05-19 23:09:42 +02:00
Ed Bartosh
2914171ed4 kubeadm: reimplement IPVS check
Used existing IPVS Proxier API CanUseIPVSProxier instead
of custom implementation.

Fixes kubernetes/kubeadm#975
2019-03-14 16:52:21 +02:00
Ed Bartosh
09a2e49a94 kubeadm: fix RequiredIPVSKernelModulesAvailable warning message
RequiredIPVSKernelModulesAvailable warning confuses users suggesting
that the IPVS proxier will not be used, which is not always the case.

Made the warning message less confusing:

        [WARNING RequiredIPVSKernelModulesAvailable]:
The IPVS proxier may not be used because the following required kernel
modules are not loaded: [ip_vs_rr ip_vs_wrr ip_vs_sh]
or no builtin kernel ipvs support was found: map[ip_vs_wrr:{}
ip_vs_sh:{} nf_conntrack_ipv4:{} ip_vs:{} ip_vs_rr:{}].
However, these modules may be loaded automatically by kube-proxy for you
if they are available on your system.

To verify IPVS support:

   Run "lsmod | grep 'ip_vs\|nf_conntrack'" and verify each of the above
modules are listed.

If they are not listed, you can use the following methods to load them:

1. For each missing module run 'modprobe $modulename' (e.g., 'modprobe
ip_vs', 'modprobe ip_vs_rr', ...)
2. If 'modprobe $modulename' returns an error, you will need to install
the missing module support for your kernel.

Fixes: kubernetes/kubeadm#975
2019-02-13 22:54:34 +02:00
Kubernetes Prow Robot
5b7a790d35
Merge pull request #72185 from dcbw/owners-label-sig-network
OWNERS: add label:sig/network to a bunch of places
2019-02-08 10:36:16 -08:00
Roy Lenferink
b43c04452f Updated OWNERS files to include link to docs 2019-02-04 22:33:12 +01:00
Laurent Bernaille
1412d53b62 [kube-proxy/ipvs] Protect Netlink calls with a mutex 2018-12-27 10:53:27 +01:00
Dan Williams
2e339188ed OWNERS: add label:sig/network to a bunch of places 2018-12-19 00:00:02 -06:00
Davanum Srinivas
954996e231
Move from glog to klog
- Move from the old github.com/golang/glog to k8s.io/klog
- klog as explicit InitFlags() so we add them as necessary
- we update the other repositories that we vendor that made a similar
change from glog to klog
  * github.com/kubernetes/repo-infra
  * k8s.io/gengo/
  * k8s.io/kube-openapi/
  * github.com/google/cadvisor
- Entirely remove all references to glog
- Fix some tests by explicit InitFlags in their init() methods

Change-Id: I92db545ff36fcec83afe98f550c9e630098b3135
2018-11-10 07:50:31 -05:00
Weibin Lin
7a591ed361 update bazel 2018-11-05 10:33:31 +08:00
Weibin Lin
4b90559369 use 'nf_conntrack' instead of 'nf_conntrack_ipv4' for linux kernel >= 4.19 2018-11-05 10:33:31 +08:00
liangwei
456c351e31 fix bugs introduced by ipvs graceful termination 2018-09-30 16:40:13 +08:00
liangwei
9e4f84f42e ipvs connection based graceful termination 2018-09-27 15:16:48 +08:00
liangwei
80ff8b359c ipvs support graceful termination 2018-09-27 15:14:51 +08:00
Laszlo Janosi
cbe94df8c6 gofmt update 2018-08-27 05:59:50 +00:00
Laszlo Janosi
a6da2b1472 K8s SCTP support implementation for the first pull request
The requested Service Protocol is checked against the supported protocols of GCE Internal LB. The supported protocols are TCP and UDP.

SCTP is not supported by OpenStack LBaaS. If SCTP is requested in a Service with type=LoadBalancer, the request is rejected. Comment style is also corrected.

SCTP is not allowed for LoadBalancer Service and for HostPort. Kube-proxy can be configured not to start listening on the host port for SCTP: see the new SCTPUserSpaceNode parameter

changed the vendor github.com/nokia/sctp to github.com/ishidawataru/sctp. I.e. from now on we use the upstream version.

netexec.go compilation fixed. Various test cases fixed

SCTP related conformance tests removed. Netexec's pod definition and Dockerfile are updated to expose the new SCTP port(8082)

SCTP related e2e test cases are removed as the e2e test systems do not support SCTP

sctp related firewall config is removed from cluster/gce/util.sh. Variable name sctp_addr is corrected to sctpAddr in pkg/proxy/ipvs/proxier.go

cluster/gce/util.sh is copied from master
2018-08-27 05:56:27 +00:00
Jeff Grafton
23ceebac22 Run hack/update-bazel.sh 2018-06-22 16:22:57 -07:00
Jeff Grafton
a725660640 Update to gazelle 0.12.0 and run hack/update-bazel.sh 2018-06-22 16:22:18 -07:00
stewart-yu
5f4025c029 auto generated file 2018-05-22 11:20:47 +08:00