Commit Graph

530 Commits

Author SHA1 Message Date
RainbowMango
9b7d8712cf Add show hidden flag to kube-proxy 2019-12-17 21:46:41 +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
Vallery Lancey
23957a6b28 Allow kube-proxy iptables mode to support dual-stack, with the meta-proxier. 2019-12-16 22:50:25 -08:00
Kubernetes Prow Robot
078344c125
Merge pull request #86016 from robscott/endpointslice-windows-proxy
Ensuring EndpointSlices are not used for Windows kube-proxy implementations
2019-12-16 21:38:18 -08:00
carlory
2fe82075b4 fix staticcheck faulures in 'cmd' pkg 2019-12-16 18:32:54 +08:00
Rob Scott
dfa04bfc04
Ensuring EndpointSlices are not used for Windows kube-proxy implementations 2019-12-06 15:39:00 -08:00
Travis Rhoden
0c5c3d8bb9
Remove pkg/util/mount (moved out of tree)
This patch removes pkg/util/mount completely, and replaces it with the
mount package now located at k8s.io/utils/mount. The code found at
k8s.io/utils/mount was moved there from pkg/util/mount, so the code is
identical, just no longer in-tree to k/k.
2019-11-15 08:29:12 -07:00
Roc Chan
31d623b4d7 Autogenerated files 2019-11-15 14:37:44 +08:00
Roc Chan
c9cf3f5b72 Service Topology implementation
* Implement Service Topology for ipvs and iptables proxier
* Add test files
* API validation
2019-11-15 13:36:43 +08:00
Rob Scott
a7e589a8c6
Promoting EndpointSlices to beta 2019-11-13 14:20:19 -08:00
Jordan Liggitt
297570e06a hack/update-vendor.sh 2019-11-06 17:42:34 -05:00
Kubernetes Prow Robot
dc8880908f
Merge pull request #83832 from gongguan/deprecate_cleanup-ipvs_flag
deprecate cleanup-ipvs flag
2019-11-01 23:59:39 -07:00
louisgong
f147b6e555 deprecate cleanup-ipvs flag 2019-11-02 10:09:50 +08:00
Joe Searcy
10879d3bd4 Add lenient decoding path for v1alpha1 kube-proxy
Removed unneeded comments

Matched style from other PR's

Only print error when lenient decoding is successful

Update Bazel for BUILD

Comment out existing strict decoder tests

Added tests for leniant path

Added comments to explain test additions

Cleanup TODO's and tests

Add explicit newline for appended config
2019-10-30 01:26:27 -04:00
zouyee
a3e0ac2951 set config.BindAddress to IPv4 address "127.0.0.1" if not specified
Signed-off-by: Zou Nengren <zouyee1989@gmail.com>
2019-10-25 21:46:41 +08:00
Kubernetes Prow Robot
af6f302e46
Merge pull request #83498 from danwinship/proxy-health
Fix kube-proxy healthz server for proxier sync loop changes
2019-10-15 23:04:58 -07:00
Kubernetes Prow Robot
0ff761b14f
Merge pull request #82927 from obitech/kube_proxy_strict_serializer
Enable strict serializer in kube-proxy
2019-10-09 11:05:50 -07:00
Dan Winship
0f10102c16 Better distinguish the two kinds of proxy health check servers
Kube-proxy runs two different health servers; one for monitoring the
health of kube-proxy itself, and one for monitoring the health of
specific services. Rename them to "ProxierHealthServer" and
"ServiceHealthServer" to make this clearer, and do a bit of API
cleanup too.
2019-10-04 10:37:58 -04:00
Kubernetes Prow Robot
74d2822662
Merge pull request #72535 from tallclair/content-type
Always set content-type & nosniff
2019-09-27 18:43:39 -07:00
obitech
f9b152abb0 Add strict serializer to codec factory in kube-proxy 2019-09-23 19:39:00 +02:00
Kubernetes Prow Robot
67d928acdc
Merge pull request #82096 from logicalhan/version-deletion
remove pkg/version and some of redundant copies of it
2019-09-17 14:27:16 -07:00
Han Kang
866ea74326 remove pkg/version and some of redundant copies of it
Change-Id: Ia58367c1b1274bfb49c8a4784051463abaf795de
2019-09-16 16:24:35 -07:00
Dan Winship
b6c3d5416a Drop iptables firewalld monitoring support
The firewalld monitoring code was not well tested (and not easily
testable), would never be triggered on most platforms, and was only
being taken advantage of from one place (kube-proxy), which didn't
need it anyway since it already has its own resync loop.

Since the firewalld monitoring was the only consumer of pkg/util/dbus,
we can also now delete that.
2019-09-15 15:35:40 -04:00
Kubernetes Prow Robot
3ae81af183
Merge pull request #82521 from viviyww/master12
Modify the log of kube-proxy
2019-09-12 19:18:30 -07:00
Tim Allclair
ef6cba0b36 Always set content-type & nosniff 2019-09-11 15:01:43 -07:00
yangweiwei
2edc0468e7 Modify the log of kube-proxy
Modify the warning log of kube-proxy when we run kube-proxy server
with --proxy-mode, but in the config file, we omit it. Then it logs
like ""{"log":"W0905 09:14:40.321571       1 server_others.go:249]
Flag proxy-mode=\"\" unknown, assuming iptables proxy\n","stream":"stderr",
"time":"2019-09-05T09:14:40.321858964Z"} This may lead to confusion. I
think it should me modefied.
2019-09-11 09:06:21 +08:00
Ted Yu
f1b314bf5a Early return after sending to errCh in Options#eventHandler 2019-08-30 13:18:33 -07:00
Khaled Henidak(Kal)
ef75723564 ipvs dualstack: generated items
co-authored-by: Lars Ekman <lars.g.ekman@est.tech>
2019-08-29 23:38:25 +00:00
Khaled Henidak(Kal)
465255425e create meta-proxy for proxy-mode=ipvs (dualstack)
co-authored-by: Lars Ekman <lars.g.ekman@est.tech>
2019-08-29 23:37:37 +00:00
Kubernetes Prow Robot
4495d09282
Merge pull request #81430 from robscott/endpointslice-proxy
Adding EndpointSlice support for kube-proxy ipvs and iptables proxiers
2019-08-29 15:36:44 -07:00
Kubernetes Prow Robot
7d241f0ec1
Merge pull request #81626 from logicalhan/proxy-migration
migrate kube-proxy metrics to stability framework
2019-08-29 05:30:23 -07:00
Rob Scott
9665c590c7
Adding EndpointSlice support for kube-proxy ipvs and iptables proxiers 2019-08-29 01:06:52 -07:00
Kubernetes Prow Robot
af54eae69a
Merge pull request #81612 from rikatz/issue81060
Remove watching Endpoints of Headless Services
2019-08-28 14:44:25 -07:00
Han Kang
e1bf0b4918 group imports properly 2019-08-28 12:49:54 -07:00
Han Kang
0895ac212d migrate kube-proxy metrics to stability framework 2019-08-28 12:49:54 -07:00
Kubernetes Prow Robot
9c736445f5
Merge pull request #79846 from aramase/fix-golint-pkg/proxy
Fix golint failures in pkg/proxy
2019-08-23 00:51:17 -07:00
Kubernetes Prow Robot
37651f1cef
Merge pull request #80368 from danwinship/iptables-checks
iptables feature detection improvements
2019-08-22 13:31:20 -07:00
Ricardo Pchevuzinske Katz
e389237171 Remove watching Endpoints of Headless Services
Signed-off-by: Ricardo Pchevuzinske Katz <ricardo.katz@serpro.gov.br>
2019-08-21 16:37:09 -03:00
Aleksandr Razumov
2390e242b4
fix typo 2019-08-18 23:59:04 +03:00
Kubernetes Prow Robot
a7c81c663d
Merge pull request #78775 from johscheuer/fix-kube-proxy-cleanup-error
Check if options returning an error
2019-08-14 07:26:26 -07:00
Johannes M. Scheuermann
352564714a Handle error correctly in kubee-proxy command
Signed-off-by: Johannes M. Scheuermann <joh.scheuer@gmail.com>
2019-08-14 07:41:09 +02:00
Kubernetes Prow Robot
e084c281ac
Merge pull request #72771 from yanghaichao12/proxy0110
add a test case for HostnameOverride
2019-08-13 21:38:23 -07:00
Kubernetes Prow Robot
c8c9d2e21c
Merge pull request #77167 from paulsubrata55/spaul-kube-proxy-fix
Fix for kube-proxy to wait for some duration for the node to be defined.
2019-08-09 19:47:14 -07:00
Kubernetes Prow Robot
19e85a9092
Merge pull request #80502 from xigang/master
Update CleanupAndExit and OnServiceSynced field comment and bugfix panic params in the construct method
2019-08-07 20:10:06 -07:00
Kubernetes Prow Robot
fb5a0e0525
Merge pull request #78204 from stewart-yu/patch-1
get rid of the redundancy field in kube-proxy option
2019-08-07 20:09:17 -07:00
Dan Winship
a735c97356 kube-proxy: drop iptables version check
Kube-proxy's iptables mode used to care whether utiliptables's
EnsureRule was able to use "iptables -C" or if it had to implement it
hackily using "iptables-save". But that became irrelevant when
kube-proxy was reimplemented using "iptables-restore", and no one ever
noticed. So remove that check.
2019-08-01 12:05:31 -04: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
xigang
4ac81d7508 Update the CleanupAndExit field for the Options and the OnServiceSynced for the ServiceHandler comment 2019-07-24 09:40:29 +08:00
David Xia
fabfd950b1
cleanup: fix some log and error capitalizations
Part of https://github.com/kubernetes/kubernetes/issues/15863
2019-07-20 18:26:16 -04:00
Anish Ramasekar
2878270f5b
Fix golint failures in pkg/proxy
Review feedback - remove alias from imports

fix comments
2019-07-08 11:48:33 -07:00
Kubernetes Prow Robot
7bf55da3c2
Merge pull request #78789 from johscheuer/remove-experimental-note-for-ipvs
Remove experimental note for ipvs in kube-proxy arguments
2019-07-03 04:46:31 -07:00
Kubernetes Prow Robot
dd8a000a77
Merge pull request #79493 from odinuge/kube-cmd-double-print
Remove duplicate error messages from cli commands
2019-06-28 13:57:41 -07:00
Odin Ugedal
7caf51daa4
Remove duplicate error messages from cli commands
Since we never use the cobras "SilenceErrors" or "SilenceUsage",
a command executed with "cmd.Execute()" will never return an error
without printing it.

The current behavior results in all error messages being printed twice:

Example:

$ kubectl abc
Error: unknown command "abc" for "kubectl"
Run 'kubectl --help' for usage.
unknown command "abc" for "kubectl"

This applies to all cli commands using Cobra. To verify, follow the code
path of the Execute function:

https://github.com/spf13/cobra/blob/c439c4fa0937/command.go#L793
Signed-off-by: Odin Ugedal <odin@ugedal.com>
2019-06-27 21:55:14 +02:00
Vallery Lancey
dc0f14312e Removed deprecated --resource-container flag from kube-proxy. 2019-06-16 08:36:42 -07:00
Johannes M. Scheuermann
cd6718e3d2 Remove experimental note for ipvs in kube-proxy arguments 2019-06-07 15:47:44 +02:00
Ricardo Pchevuzinske Katz
82c42bb6ee Remove deprecated flag --conntrack-max from kube-proxy 2019-06-01 18:10:28 -03:00
Anish Ramasekar
aa07730275
Remove deprecated flag --cleanup-iptables from kube-proxy
Remove deprecated flag --cleanup-iptables from kube-proxy

update license

update license
2019-05-31 11:09:37 -07:00
Zaalouk, Adel
27f8d363a9 Organize kube-proxy flags 2019-05-24 11:39:01 +02:00
stewart-yu
da375fb154 get rid of the redundancy field in kube-proxy option 2019-05-24 09:37:06 +08:00
Kubernetes Prow Robot
aabd8f9beb
Merge pull request #77313 from bjhaid/cleanup_kube_proxy
Clean up kube-proxy.
2019-05-10 21:30:12 -07:00
Brad Hoekstra
62e58a66aa Fix some lint errors in pkg/proxy 2019-05-09 16:48:29 -04:00
Àbéjídé Àyodélé
109f1c479e Clean up kube-proxy.
These are based on recommendation from
[staticcheck](http://staticcheck.io/).

- Removes dead type/function along with the import that the function
introduced.
- Removes unused struct fields.
- Removes select nested in a tight for loop, the select does not have a
default, so it will be blocking.
2019-05-09 14:39:03 +00:00
Kubernetes Prow Robot
5b34d95ec5
Merge pull request #77381 from JieJhih/network/golint
Fix golint
2019-05-07 00:23:54 -07:00
Kubernetes Prow Robot
a8787dac30
Merge pull request #76927 from mrkm4ntr/unnecessary-goroutine
Do not generate unnecessary goroutines
2019-05-06 21:31:53 -07:00
JieJhih Jhang
21e4f0039e fix golint 2019-05-03 14:31:51 +08:00
Kubernetes Prow Robot
b9fbed1324
Merge pull request #76875 from JieJhih/proxy/file
handle file close error
2019-04-29 22:49:35 -07:00
Subrata Paul
dd9402f451 Fix for kube-proxy to wait for some duration for the node to be defined
Kube-proxy must atleast wait for some duration for the node to defined so that it can fetch the node IP. This node IP is currently used in ipvs proxier for the node-port services.
2019-04-28 00:25:18 +05:30
Kubernetes Prow Robot
a0b8d1cbb8
Merge pull request #76732 from JieJhih/proxy/server
os exit when option is true
2019-04-27 11:18:21 -07:00
JieJhih
94731c5dcd
Merge branch 'master' into proxy/server 2019-04-27 13:48:29 +08:00
Zihong Zheng
028d4e8fe7 Add OWNERS file for cmd/kube-proxy 2019-04-26 17:22:29 -07:00
Kubernetes Prow Robot
4dc05dd9df
Merge pull request #76320 from JieJhih/config/kube_proxy
support ipv6 in bind address
2019-04-26 17:14:22 -07:00
JieJhih Jhang
48f431aae5 os exit when option is true 2019-04-24 16:32:11 +08:00
Shintaro Murakami
f8e81337da Do not generate unnecessary goroutine 2019-04-23 16:22:14 +09:00
JieJhih Jhang
84d29664c4 handle file close error 2019-04-21 16:28:46 +08:00
JieJhih Jhang
08e320fa4e support ipv6 in bind address
use split host port func instead trim specific character

add unit test for metrics and healthz bind address

recover import package

refactor set default kube proxy configuration

fix ipv4 condition

fix set default port condition

rewrite call function occasion to reduce error

set ipv6 default value

move get GetBindAddressHostPort to util

use one func to handle deprecated series

update bazel

define address type

return earlier in the error case

refactor set default kube proxy configuration logic

recover import package

preserve some of the original comments

add get default address func

add append port if needed unit test

rewrite unit test for deprecated flags

remove unused codes
2019-04-17 15:31:42 +08:00
Kubernetes Prow Robot
2490e035d7
Merge pull request #71735 from dcbw/userspace-proxy-ratelimiting
proxy/userspace: respect minSyncInterval
2019-04-16 19:14:03 -07:00
SataQiu
cc199c74fc fix golint failures of cmd/kube-proxy/app 2019-04-13 06:20:52 +08:00
Dan Williams
4b07f80d20 proxy: consolidate ServicesHandler/EndpointsHandler into ProxyProvider
Proxies should be able to cleanly figure out when endpoints have been synced,
so make all ProxyProviders also implement EndpointsHandler and pass those
through to loadbalancers when required.
2019-04-05 16:16:35 -05:00
Kubernetes Prow Robot
84b561033e
Merge pull request #76175 from stealthybox/refactor-mediatype-loops
Refactor loops over `SupportedMediaTypes()` where mediaType is used to match a single SerializerInfo{}
2019-04-04 23:54:07 -07:00
Vallery Lancey
3c9989258a Fixed --cleanup-ipvs help text 2019-04-04 18:35:24 -07:00
leigh capili
47e52d2981 Refactor loops over SupportedMediaTypes() where mediaType is used to match a single SerializerInfo{}
We have an existing helper function for this:  runtime.SerializerInfoForMediaType()

This is common prep-work for encoding runtime.Objects into JSON/YAML for transmission over the wire or writing to ComponentConfigs.
2019-04-04 19:01:01 -06:00
Vallery Lancey
eff9b4036e Revert "Deprecated --cleanup-ipvs flag in kube-proxy"
This reverts commit 4f1bb2bd2f.
2019-04-04 16:59:05 -07:00
Vallery Lancey
4f1bb2bd2f Depricated --cleanup-ipvs flag in kube-proxy 2019-04-04 12:51:36 -07:00
Vallery Lancey
cdce2d0ef9 Removed cleanup for non-current kube-proxy modes in newProxyServer() 2019-04-03 15:27:21 -07:00
Kubernetes Prow Robot
40a0647efa
Merge pull request #73380 from vllry/kube-proxy-cleanup
Superficial kube-proxy cleanup
2019-03-27 17:22:04 -07:00
Vallery Lancey
a23e442161 Fix a bad merge leftover in kube-proxy 2019-03-13 21:43:06 -07:00
Vallery Lancey
22ff746e4a
Merge branch 'master' into kube-proxy-cleanup 2019-03-13 13:31:48 -07:00
Laurent Bernaille
09f821ddb5 [kube-proxy/ipvs] Add flag to enable strict ARP 2019-03-12 15:56:22 +01:00
Kubernetes Prow Robot
c06ca11b5d
Merge pull request #70896 from ksubrmnn/overlay_dsr
Adding Windows Overlay support to Kube Proxy
2019-02-20 12:53:13 -08:00
Marek Counts
160ed26c20 autogen files to support new project structure. 2019-02-15 10:29:31 -05:00
Marek Counts
7744f90830 Moved flag and globalflag
Moved all flag code from `staging/src/k8s.io/apiserver/pkg/util/[flag|globalflag]` to `component-base/cli/[flag|globalflag]` except for the term function because of unwanted dependencies.
2019-02-15 10:28:13 -05:00
Manjunath A Kumatagi
782409255a Use ioutil.TempDir for temporary dir creating 2019-02-07 12:27:19 -05:00
ksubrmnn
a47e99e37a Add Windows flags for KubeProxyConfiguration 2019-02-05 10:39:23 -08:00
Kubernetes Prow Robot
73ccf56edd
Merge pull request #59176 from dixudx/reload_kubeproxy_config
exit kube-proxy when configuration file changes
2019-02-01 18:29:06 -08:00
Brad Hoekstra
6117316752 Refactor service-proxy-name label 2019-01-29 11:28:35 -05:00
Di Xu
cc16d64368 exit kube-proxy when configuration file changes 2019-01-29 18:05:51 +08:00
Vallery Lancey
c22d855612 Renamed variables colliding with package names, and added TODOs on uncaught-errors 2019-01-28 16:19:54 -08:00
Vallery Lancey
65637e7621 Remove redundant import names in kube-proxy 2019-01-27 15:01:17 -08:00
Vallery Lancey
3bb5914548 Updated kube-proxy error strings to not use capitals/punctuation 2019-01-27 14:08:54 -08:00
Vallery Lancey
d8369fd391 Amend TODO comment about ClientConnectionConfiguration's types (#73375) 2019-01-27 13:50:21 -08:00