Commit Graph

369 Commits

Author SHA1 Message Date
xh4n3
d6bc98fc5a fix wrong NumCPU in kube-proxy under static CPU policy
Signed-off-by: xh4n3 <xyn1016@gmail.com>
2021-03-05 12:38:05 +08:00
maao
d001b9b72a remove --cleanup-ipvs flag of kube-proxy
Signed-off-by: maao <maao420691301@gmail.com>
2020-12-31 11:29:38 +08:00
Kubernetes Prow Robot
aa1f912868
Merge pull request #94915 from Lion-Wei/fix-cleanup
fix kube-proxy cleanup
2020-09-30 06:21:24 -07:00
Kubernetes Prow Robot
fcbeee92f5
Merge pull request #94347 from povsister/kube-proxy-help-msg
Make kubeconfig command-line help message of kube-proxy more precise
2020-09-19 17:32:29 -07:00
Lion-Wei
dbb5438b33 fix kube-proxy cleanup 2020-09-19 17:48:20 +08:00
povsister
a290e9aa02 Update kubeconfig command-line help message for kube-proxy 2020-09-15 12:07:01 +08:00
Daniel Smith
a86afc12df update scripts 2020-09-02 10:49:40 -07:00
Daniel Smith
75f835aa08 move port definitions to a common location 2020-09-02 10:48:25 -07:00
Monis Khan
fc4f91f10b cmd/*: fail on unrecognized flags/arguments for component CLI
In case a malformed flag is passed to k8s components
such as "–foo", where "–" is not an ASCII dash character,
the components currently silently ignore the flag
and treat it as a positional argument.

Make k8s components/commands exit with an error if a positional argument
that is not empty is found. Include a custom error message for all
components except kubeadm, as cobra.NoArgs is used in a lot of
places already (can be fixed in a followup).

The kubelet already handles this properly - e.g.:
'unknown command: "–foo"'

This change affects:
- cloud-controller-manager
- kube-apiserver
- kube-controller-manager
- kube-proxy
- kubeadm {alpha|config|token|version}
- kubemark

Signed-off-by: Monis Khan <mok@vmware.com>
Signed-off-by: Lubomir I. Ivanov <lubomirivanov@vmware.com>
2020-05-28 22:06:01 +03: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
cici37
7f4d19167e Move pkg/util/configz to k8s.io/component-base 2020-04-29 12:17:25 -07:00
cici37
15c844031f Remove CCM dependency pkg/util/flag 2020-04-22 10:06:11 -07:00
Kubernetes Prow Robot
cabf5d1cdc
Merge pull request #89350 from SataQiu/fix-kube-proxy-20200323
kube-proxy: treat failure to bind to a port as fatal
2020-04-06 17:47:20 -07:00
Kubernetes Prow Robot
b7aaa59b49
Merge pull request #89585 from cwdsuzhou/March/proxy_kernel
add `kernelspace` to flag description of kube-proxy
2020-04-02 12:43:02 -07:00
SataQiu
871b90ba23 kube-proxy: add '--bind-address-hard-fail' flag to treat failure to bind to a port as fatal
Signed-off-by: SataQiu <1527062125@qq.com>
2020-04-02 13:13:10 +08:00
Tim Hockin
15632b10cb Clean up kube-proxy metrics startup 2020-03-30 10:29:14 -07:00
Tim Hockin
8747ba9370 Clean up kube-proxy healthz startup
Make the healthz package simpler, move retries back to caller.
2020-03-30 10:29:14 -07:00
caiweidong
986a7431ce Add 'kernel' to the comments of proxy-mode 2020-03-28 11:55:37 +08:00
SataQiu
c261d12bbf kube-proxy: fix confusing default value for healthz and metrics bind address, deprecate healthz-port and metrics-port flag 2020-02-25 16:59:11 +08:00
Satyadeep Musuvathy
8c6956e5bb Refactor handling of local traffic detection. 2020-02-21 17:57:34 -08:00
Ted Yu
7a0690cd59 Use ProxierHealthUpdater directly to avoid panic 2020-02-10 09:41:09 -08:00
Kubernetes Prow Robot
2796ff8538
Merge pull request #85279 from RainbowMango/pr_add_metrics_flag_to_proxy
Allow show hidden metrics in kube-proxy
2019-12-18 00:57:57 -08:00
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
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
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
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
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
Han Kang
866ea74326 remove pkg/version and some of redundant copies of it
Change-Id: Ia58367c1b1274bfb49c8a4784051463abaf795de
2019-09-16 16:24:35 -07:00
Tim Allclair
ef6cba0b36 Always set content-type & nosniff 2019-09-11 15:01:43 -07:00
Ted Yu
f1b314bf5a Early return after sending to errCh in Options#eventHandler 2019-08-30 13:18:33 -07: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
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
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
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
xigang
4ac81d7508 Update the CleanupAndExit field for the Options and the OnServiceSynced for the ServiceHandler comment 2019-07-24 09:40:29 +08: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
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
À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
JieJhih
94731c5dcd
Merge branch 'master' into proxy/server 2019-04-27 13:48:29 +08: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
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
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
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
Humble Devassy Chirammal
a2daf66a0d Use better error var name in kube-proxy code (#72849)
* Use better error var name  in  kube-proxy code

Signed-off-by: hchiramm <hchiramm@redhat.com>

* Unexport ErrReadOnlySysFS error variable

Signed-off-by: Humble Chirammal <hchiramm@redhat.com>
2019-01-14 08:00:11 -08:00
Kubernetes Prow Robot
d313c3b5e4
Merge pull request #72682 from whypro/metrics-port
Add `metrics-port` to kube-proxy cmd flags.
2019-01-11 15:53:40 -08:00
Haoyu Wang
d52ba6413d Add metrics-port to kube-proxy cmd flags. 2019-01-08 16:35:30 +08:00
Lucas Käldström
0140c82c16
Updated references from k8s.io/{apiserver,apimachinery} to the new k8s.io/component-base repo. Co-authored-by @Klaven 2019-01-06 14:01:26 +02:00
Kubernetes Prow Robot
0c7e207904
Merge pull request #72064 from jayunit100/patch-2
(one liner) Update server.go's dockerd messages to be CRI based.
2018-12-20 04:42:35 -08:00
Kubernetes Prow Robot
7ce7a80cda
Merge pull request #71355 from bradhoekstra/kube-proxy-services-optional
Make kube-proxy service abstraction optional
2018-12-19 15:27:12 -08:00
jay vyas
2f92250977 Make Error message CRI compliant, retain dockerd directions. 2018-12-16 16:16:57 -05:00
Jordan Liggitt
d440ecdd3b Update non-test code to use DefaultMutableFeatureGate 2018-11-21 11:51:33 -05:00
Brad Hoekstra
18e5736b0f Filter out services with alternate service proxy 2018-11-21 11:25:15 -05: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
k8s-ci-robot
c2d9321044
Merge pull request #69340 from stevesloka/fixHostNameOverride
Allow hostname-override arg to be used if specified
2018-10-16 13:01:32 -07:00