Commit Graph

569 Commits

Author SHA1 Message Date
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
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
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
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
yanghaichao12
cd5415f0ab add a test case for HostnameOverride
modify
2019-01-21 08:55:02 -05: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
1edd2723f8
autogenerated files 2019-01-06 15:48:53 +02: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
Brad Hoekstra
284cc82e71 Update bazel 2018-12-05 16:43:07 -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
Weibin Lin
2d2ecb15d2 update bazel 2018-10-09 10:27:27 +08:00
Weibin Lin
0d57ec2938 reuse func getNodeIP 2018-10-09 10:27:27 +08:00
Steve Sloka
5834f94598 Allow hostname-override flag to be used if specified
Signed-off-by: Steve Sloka <steves@heptio.com>
2018-10-02 16:09:01 -04:00
Jess Frazelle
f8ba640ced
pkg/proxy: only set sysctl if not already set
This will allow for kube-proxy to be run without `privileged` and
with only adding the capability `NET_ADMIN`.

Signed-off-by: Jess Frazelle <acidburn@microsoft.com>
2018-09-19 15:29:53 -04:00
Lucas Käldström
3ff1e53111
Move the flag registration code from pkg/apis/componentconfig to pkg/util/flag 2018-09-05 14:03:05 +03:00
Kubernetes Submit Queue
2eb14e3007
Merge pull request #64973 from nokia/k8s-sctp
Automatic merge from submit-queue (batch tested with PRs 67694, 64973, 67902). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

SCTP support implementation for Kubernetes

**What this PR does / why we need it**: This PR adds SCTP support to Kubernetes, including Service, Endpoint, and NetworkPolicy.

**Which issue(s) this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close the issue(s) when PR gets merged)*:
Fixes #44485

**Special notes for your reviewer**:

**Release note**:

```release-note

SCTP is now supported as additional protocol (alpha) alongside TCP and UDP in Pod, Service, Endpoint, and NetworkPolicy.  

```
2018-08-28 07:21:18 -07:00
Lion-Wei
47153803fb update autogenerated file 2018-08-28 09:14:27 +08:00
Lion-Wei
37e6266ef4 move external kube-proxy componentConfig to k8s.io/kube-proxy/config/ 2018-08-28 09:14:20 +08:00
liangwei
152e326722 referencing ClientConnectionConfiguration from k8s.io/apimachinery/pkg/apis/config 2018-08-28 09:10:11 +08:00
Laszlo Janosi
e466bdc67e Changes according to the approved KEP. SCTP is supported for HostPort and LoadBalancer. Alpha feature flag SCTPSupport controls the support of SCTP. Kube-proxy config parameter is removed. 2018-08-27 05:58:36 +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
liangwei
6a048c3b96 Move pkg/proxy/apis/kubeproxyconfig to pkg/proxy/apis/config 2018-08-27 10:30:42 +08:00
fisherxu
5a9bea0353 update bazel 2018-08-16 09:59:33 +08:00
x00416946 fisherxu
79e17e6cd7 use versioned api in kube-proxy 2018-08-16 09:59:33 +08:00
Di Xu
b3dfe0c652 nodes: improve handling of erroneous host names 2018-08-01 14:57:25 +08:00
stewart-yu
f1343af5d7 auto-generated file 2018-07-28 07:54:17 +08:00
stewart-yu
55251c716a update the import file for move util/pointer to k8s.io/utils 2018-07-27 19:47:02 +08:00
Kubernetes Submit Queue
fce58d25ac
Merge pull request #65425 from islinwb/ipvs_cleanup_rules
Automatic merge from submit-queue (batch tested with PRs 66136, 64999, 65425, 66120, 66074). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

Not step into ipvs.CleanupLeftovers() if canUseIPVS's false

**What this PR does / why we need it**:
Earlier we decide whether we should clean up the left-over ipvs rules inside `ipvs.CleanupLeftovers()`, therefore we call function  `ipvs.CanUseIPVSProxier()` two times (and `GetModules()` two times).  Actually no need to step into `ipvs.CleanupLeftovers()` if `canUseIPVS` is false.

**Which issue(s) this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close the issue(s) when PR gets merged)*:
Fixes #

**Special notes for your reviewer**:

**Release note**:

```release-note
NONE
```
2018-07-12 15:14:16 -07:00
Weibin Lin
69398f8411 Get ipv6 nodeIP when in ipv6 cluster 2018-07-11 15:37:43 +08:00
Weibin Lin
405d5f802c Not step into ipvs.CleanupLeftovers() if canUseIPVS's false 2018-06-25 11:18:18 +08: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
Kubernetes Submit Queue
440b2b6ea7
Merge pull request #61077 from islinwb/fix_ipvs_warninfo
Automatic merge from submit-queue. If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

Init ipvsInterface only when ipvs modules are present

**What this PR does / why we need it**:

**Which issue(s) this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close the issue(s) when PR gets merged)*:
Fixes #61074 

**Special notes for your reviewer**:

**Release note**:

```release-note
NONE
```
2018-05-31 20:01:26 -07:00
Kubernetes Submit Queue
f5254dab8a
Merge pull request #58442 from m1093782566/ipvs-ga
Automatic merge from submit-queue. If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

Declare IPVS-based kube-proxy GA and remove feature gateway

**What this PR does / why we need it**:

As discussed in sig-network meeting, we decided to target IPVS-based kube-proxy GA in 1.10.

This PR declares IPVS-based kube-proxy GA and remove feature gateway.

**Which issue(s) this PR fixes**:

Fixes: #58443

issue in feature repo: https://github.com/kubernetes/features/issues/265

**Special notes for your reviewer**:

**Release note**:

```release-note
Declare IPVS-based kube-proxy GA
```

@quinton-hoole
2018-05-30 21:21:42 -07:00
m1093782566
674a31e4d6 remove ipvs feature gateway 2018-05-30 10:43:16 +08:00
xuzhonghu
6ad56325ca kube-proxy should not depend on kubectl 2018-05-18 09:24:38 +08:00
Weibin Lin
ff8b70c409 Init ipvsInterface only when ipvs modules are present 2018-05-17 15:04:20 +08:00
Rohit Ramkumar
056ae4421c Add --ipvs-exclude-cidrs flag to kube-proxy. 2018-04-13 10:09:14 -07:00
Kubernetes Submit Queue
5be9578e34
Merge pull request #58731 from yue9944882/feature/beginport-and-offset-expr-port-range
Automatic merge from submit-queue (batch tested with PRs 60457, 60331, 54970, 58731, 60562). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

implement begin-port+offset port range parsing

**What this PR does / why we need it**:

Allocate specific numbers of port from a host by indicating a begin port and its offsets.
This can be used for kube-proxy configuration.

**Which issue(s) this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close the issue(s) when PR gets merged)*:
Fixes #58730

**Special notes for your reviewer**:

**Release note**:

```release-note
"beginPort+offset" format support for port range which affects kube-proxy only
```
2018-03-19 23:42:18 -07:00
yue9944882
68ad76bf53 move enum into function local 2018-03-09 14:20:58 +08:00
Alin-Gheorghe Balutoiu
4ea363d98e Add support for binaries to run as Windows services
This patch adds support for kubernetes to integrate
with Windows SCM.

As a first step both `kubelet` and `kube-proxy` can be registered as a service.

To create the service:
PS > sc.exe create <component_name> binPath= "<path_to_binary> --service <other_args>"
CMD > sc create <component_name> binPath= "<path_to_binary> --service <other_args>"

Please note that if the arguments contain spaces, it must be escaped.
Example:
PS > sc.exe create kubelet binPath= "C:\kubelet.exe --service --hostname-override 'minion' <other_args>"
CMD > sc create kubelet binPath= "C:\kubelet.exe --service --hostname-override 'minion' <other_args>"

Example to start the service:
PS > Start-Service kubelet; Start-Service kube-proxy
CMD > net start kubelet && net start kube-proxy

Example to stop the service:
PS > Stop-Service kubelet (-Force); Stop-Service kube-proxy (-Force)
CMD > net stop kubelet && net stop kube-proxy

Example to query the service:
PS > Get-Service kubelet; Get-Service kube-proxy;
CMD > sc.exe queryex kubelet && sc qc kubelet && sc.exe queryex kube-proxy && sc.exe qc kube-proxy

Signed-off-by: Alin Balutoiu <abalutoiu@cloudbasesolutions.com>
Signed-off-by: Alin Gabriel Serdean <aserdean@ovn.org>
Co-authored-by: Alin Gabriel Serdean <aserdean@ovn.org>
2018-03-07 00:51:36 +01:00
yue9944882
6203e52324 implement begin-port+offset port range parsing 2018-02-28 14:33:05 +08:00
Ryan Hitchman
01a9f83028 Move linux-only getProxyMode tests to a linux-only file. 2018-02-27 13:53:32 -08:00
m1093782566
bc850adce4 add nodeport-addresses flag for kube-proxy 2018-02-26 23:48:46 +08:00
Davanum Srinivas
fc4426f040 Partial revert to fix local-up-cluster.sh 2018-02-24 14:10:27 -05:00
stewart-yu
25e110dffc [kube-proxy]enhance kubeproxy init flag 2018-02-23 17:14:19 +08:00
Kubernetes Submit Queue
0d777b16e0
Merge pull request #59719 from hzxuzhonghu/pprof-profiling
Automatic merge from submit-queue (batch tested with PRs 59463, 59719, 60181, 58283, 59966). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

components pprof profiling make use of existing genericapiserver's

**What this PR does / why we need it**:

fix #60278

Instead of writing private pprof, all components make use of generic apiserver existing profiling.

**Release note**:

```release-note
NONE
```
2018-02-23 00:34:22 -08:00
Kubernetes Submit Queue
da564ef4fb
Merge pull request #57962 from xiangpengzhao/proxy-feature-gates
Automatic merge from submit-queue. If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

 Migrate FeatureGates type of kube-proxy from string to map[string]bool

**What this PR does / why we need it**:
Migration of FeatureGates type. This is a follow-up of #53025.

**Which issue(s) this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close the issue(s) when PR gets merged)*:
ref: #53025
https://github.com/kubernetes/kubernetes/pull/57754#discussion_r160023416

**Special notes for your reviewer**:
/cc @luxas @mtaufen @ncdc 

**Release note**:

```release-note
action required: kube-proxy: feature gates are now specified as a map when provided via a JSON or YAML KubeProxyConfiguration, rather than as a string of key-value pairs.
```
2018-02-22 19:32:41 -08:00
hzxuzhonghu
398a0a9e66 update bazel 2018-02-22 16:43:13 +08:00
hzxuzhonghu
33976838d9 kube-proxy make use of generic apiserver profiling 2018-02-22 16:43:12 +08:00
Kubernetes Submit Queue
097d3f13d1
Merge pull request #54191 from MrHohn/kube-proxy-metrics-flag-fix
Automatic merge from submit-queue. If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

kube-proxy: Fix flag validation for healthz-bind-address and metrics-bind-address

**What this PR does / why we need it**: `--healthz-bind-address` and `--metrics-bind-address` are broken for kube-proxy as they do not allow `ip:port` format, though they claim to support it.

**Which issue this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close that issue when PR gets merged)*: Fixes #53754

**Special notes for your reviewer**:
cc @ncdc 

**Release note**:

```release-note
Fix kube-proxy flags validation for --healthz-bind-address and --metrics-bind-address to allow specifying ip:port.
```
2018-02-21 18:46:41 -08:00
Kubernetes Submit Queue
96ec318718
Merge pull request #59842 from ixdy/update-rules_go-02-2018
Automatic merge from submit-queue. If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

 Update bazelbuild/rules_go, kubernetes/repo-infra, and gazelle dependencies

**What this PR does / why we need it**: updates our bazelbuild/rules_go dependency in order to bump everything to go1.9.4. I'm separating this effort into two separate PRs, since updating rules_go requires a large cleanup, removing an attribute from most build rules.

**Release note**:

```release-note
NONE
```
2018-02-19 22:23:05 -08:00
Jeff Grafton
ef56a8d6bb Autogenerated: hack/update-bazel.sh 2018-02-16 13:43:01 -08:00
Davanum Srinivas
265e5ae085 Log the command line flags
With d7ddcca231, we lost the logging
of the flags. We should at least log what the command line flags
were used to start processes as those incredibly useful for trouble shooting.
2018-02-15 18:04:04 -05:00
xiangpengzhao
37c6510290 Make command-line flag --feature-gates compatible 2018-02-11 15:27:42 +08:00
xiangpengzhao
58bb1447e9 Auto generated files. 2018-02-11 14:40:13 +08:00
xiangpengzhao
57071d85ee Migrate FeatureGates type of kube-proxy from string to map[string]bool 2018-02-11 14:40:13 +08:00
Kubernetes Submit Queue
ab83d374df
Merge pull request #57754 from ncdc/fix-kube-proxy-config-docs-and-json-tags
Automatic merge from submit-queue. If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

kube-proxy: fix field name comments & json tags

**What this PR does / why we need it**: correct some minor issues in the comments and json tags for some of the fields in the kube-proxy config structs.

**Which issue(s) this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close the issue(s) when PR gets merged)*:
Fixes #

**Special notes for your reviewer**:

**Release note**:

```release-note
The udpTimeoutMilliseconds field in the kube-proxy configuration file has been renamed to udpIdleTimeout. Action required: administrators need to update their files accordingly.
```

This was extracted from my currently unmerged f074b28fe9, as requested [here](https://github.com/kubernetes/kubernetes/pull/52198#pullrequestreview-85538637).

@kubernetes/sig-network-pr-reviews @luxas
2018-02-05 19:43:42 -08:00
Zihong Zheng
316c3696df kube-proxy: Fix flag validation for healthz-bind-address and metrics-bind-address 2018-01-31 14:02:30 -08:00
chentao1596
b31a9ecbb4 Delete redundant symbols 2018-01-17 15:44:56 +08:00
Andy Goldstein
fa3fb91a76 kube-proxy: fix field name comments & json tags
Signed-off-by: Andy Goldstein <andy.goldstein@gmail.com>
2018-01-02 10:20:43 -05:00
Jeff Grafton
efee0704c6 Autogenerate BUILD files 2017-12-23 13:12:11 -08:00
Kubernetes Submit Queue
bb94058b4f
Merge pull request #56390 from m1093782566/test-mode
Automatic merge from submit-queue. If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

Test Proxy Mode

**What this PR does / why we need it**:

Currently, IPVS-based kube-proxy is protected by feature gateway and there is no UT for it. We should test ipvs proxy mode when feature gateway is set.

**Which issue(s) this PR fixes**:
Fixes #56404

**Special notes for your reviewer**:

**Release note**:

```release-note
NONE
```
2017-12-15 21:59:32 -08:00
zacharysarah
9ca41b451a Doc updates for 1.9 2017-12-11 13:03:17 -06:00
m1093782566
10aea7e88c update bazel BUILD file 2017-11-28 09:33:10 +08:00
m1093782566
1a10652173 test ipvs proxy mode when feature gateway set 2017-11-28 09:33:09 +08:00
m1093782566
7b372143c5 test ipvs proxy mode when feature gateway unset 2017-11-27 20:06:51 +08:00
m1093782566
dc2e57ba74 refactor canUseIPVSMode and test it 2017-11-27 20:06:47 +08:00
Tim Hockin
79778288de Fix NewProxyServer
Different OSes need different args.  This is not a great fix, but better
than adding an arg to Windows which doesn't need it.
2017-11-22 14:17:10 -08:00
m1093782566
f3e744b661 add cleanup-ipvs flag 2017-11-21 15:05:23 +08:00
Kubernetes Submit Queue
3df3c580b7
Merge pull request #54219 from m1093782566/ipset
Automatic merge from submit-queue. If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

Using ipset doing SNAT and packet filter in IPVS kube-proxy

**What this PR does / why we need it**:

Try ipset in ipvs proxy mode.

**Which issue this PR fixes**: 

fixes #54203

xref: #53393, #53775

**Special notes for your reviewer**:

**Release note**:

```release-note
Using ipset doing SNAT and packet filtering in IPVS kube-proxy
```

/sig network

/area kube-proxy
2017-11-19 22:09:13 -08:00
m1093782566
268da85445 fix fakeIPSet ut error 2017-11-19 12:39:43 +08:00
m1093782566
fbf8a13376 use ipset doing snat and packet filter in ipvs proxy 2017-11-15 18:02:58 +08:00
Doug MacEachern
7950609b31 Enforce use of fixed size int types in the API
Changes 'int' to 'int32', enforced by import_known_versions_test

Follow up to PR #53402
2017-11-13 11:28:59 -08:00
Dr. Stefan Schimanski
bec617f3cc Update generated files 2017-11-09 12:14:08 +01:00
Dr. Stefan Schimanski
012b085ac8 pkg/apis/core: mechanical import fixes in dependencies 2017-11-09 12:14:08 +01:00
Kubernetes Submit Queue
11fc906c2b
Merge pull request #54052 from m1093782566/netlink
Automatic merge from submit-queue (batch tested with PRs 55247, 55324, 55261, 55147, 54052). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

Implement dummy device operation by netlink for ipvs proxier

**What this PR does / why we need it**:

Currently, we implement network interface operations, e.g. create a dummy device and delete a dummy interface via ip cmd and then collect the exist code. For example, we assume the following command:
```
ip link add kube-ipvs0 type dummy 
```
returns 2 means the dummy device `kube-ipvs0` exists, see https://github.com/kubernetes/kubernetes/blob/master/pkg/proxy/ipvs/proxier.go#L1529 .

However, from the man page of ip command, exit status 2 just means an error was reported by the kernel, see http://man7.org/linux/man-pages/man8/ip.8.html#EXIT_STATUS.

So, that's a bug.

This PR implements dummy device operation by netlink for ipvs proxier so that can get ride of ip command operations.

**Which issue this PR fixes**: 

fixes #54054

**Special notes for your reviewer**:

**Release note**:

```release-note
NONE
```

/sig network
/area kube-proxy
/kind bug
2017-11-09 00:59:32 -08:00
Andy Goldstein
ea78586832 Re-allow 0 for kube-proxy conntrack settings
When kube-proxy was refactored to use a configuration file, the ability
to use 0 for conntrack min, max, max per core, and tcp timeouts was
inadvertently broken; if you specified 0, it would instead apply the
default value from defaults.go.

This change restores the ability to use 0 to mean 0.

Signed-off-by: Andy Goldstein <andy.goldstein@gmail.com>
2017-11-07 14:45:30 -05:00
xiangpengzhao
291647e6d9 Use "kubeproxy.config.k8s.io" as final group name. 2017-11-04 11:42:36 +08:00
xiangpengzhao
ff36eefd17 Rename kubeproxy config pkg and group. 2017-11-04 11:42:36 +08:00
xiangpengzhao
91ab8fe1e7 NewOptions doesn't need to return error in signature. 2017-11-04 11:38:57 +08:00
xiangpengzhao
1d589600bc Use global Scheme for API group. 2017-11-04 11:38:57 +08:00
xiangpengzhao
2b938b985c Use const GroupName instead of hard-code. 2017-11-04 11:38:57 +08:00
xiangpengzhao
75b9fb28bf auto generated files 2017-11-04 11:38:57 +08:00
xiangpengzhao
5c8c1f43fa move KubeProxyConfiguration out of componentconfig API group 2017-11-04 11:38:57 +08:00
Kubernetes Submit Queue
676e28ff7a
Merge pull request #54848 from xiangpengzhao/add-ipvsscheduler-testcase
Automatic merge from submit-queue (batch tested with PRs 54906, 54120, 54934, 54915, 54848). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

Improve unit test coverage for kube-proxy configuration.

**What this PR does / why we need it**:

**Which issue(s) this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close the issue(s) when PR gets merged)*:
Fixes #

**Special notes for your reviewer**:
/cc @ncdc 

**Release note**:

```release-note
NONE
```
2017-11-02 23:02:18 -07:00
Kubernetes Submit Queue
b006bc5d04
Merge pull request #54120 from m1093782566/fix-proxy-mode
Automatic merge from submit-queue (batch tested with PRs 54906, 54120, 54934, 54915, 54848). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

Fix kube-proxy fall back to iptables firstly when unable to load kernel modules

**What this PR does / why we need it**:

Fix kube-proxy fall back to iptables firstly when unable to load kernel modules

**Which issue this PR fixes**: 

fixes #54121

**Special notes for your reviewer**:

**Release note**:

```release-note
NONE
```

/kind bug
/sig network
/area kube-proxy
2017-11-02 23:02:10 -07:00
m1093782566
ea930dbe5c fix kube-proxy mode 2017-11-03 09:41:54 +08:00
xiangpengzhao
9abf4b1d73 Add test case for validateIPVSSchedulerMethod. 2017-10-31 16:22:05 +08:00
xiangpengzhao
36a3193ca9 Add test case for validateHostPort. 2017-10-31 16:06:32 +08:00
xiangpengzhao
cac6db5d94 Add test case for validateClientConnectionConfiguration. 2017-10-31 15:48:02 +08:00
Kubernetes Submit Queue
878814b550
Merge pull request #53973 from m1093782566/validate-sheduler
Automatic merge from submit-queue. If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

validate ipvs scheduler

**What this PR does / why we need it**:

validate ipvs scheduler options

**Which issue this PR fixes**: 

closes #53975

**Special notes for your reviewer**:

It depends on work of #53780.

**Release note**:

```release-note
NONE
```

/sig network

/area kube-proxy
2017-10-29 23:52:08 -07:00
Kubernetes Submit Queue
e44b585151 Merge pull request #54315 from dims/fix-panic-on-kubeproxy-cleanup
Automatic merge from submit-queue (batch tested with PRs 53946, 53993, 54315, 54143, 54532). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

Fix kube-proxy panic on cleanup

**What this PR does / why we need it**:

Set the execer properly when we initialize ProxyServer or we will
end up with a panic.

**Which issue this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close that issue when PR gets merged)*: fixes #
Fixes #54305

**Special notes for your reviewer**:

**Release note**:

```release-note
NONE
```
2017-10-25 21:20:32 -07:00
Kubernetes Submit Queue
9807360fe3 Merge pull request #53956 from m1093782566/proxy-metrics
Automatic merge from submit-queue (batch tested with PRs 52479, 53956). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

Register sync proxy rules latency metrics in app level

**What this PR does / why we need it**:

IMO, should may should register proxy metrics in app level instead of in specific proxy mode, e.g. iptables, ipvs, winkernel...

By registering sync proxy rules latency metrics in app level, we can reuse codes among different proxiers.

**Which issue this PR fixes**: 

closes #53957

**Special notes for your reviewer**:

@wojtek-t What do you think about it?

**Release note**:

```release-note
NONE
```
2017-10-24 00:48:26 -07:00
m1093782566
876c73024c migrate ip cmd to netlink 2017-10-24 13:26:07 +08:00
m1093782566
9dce640213 fix review comments 2017-10-24 10:30:38 +08:00
Davanum Srinivas
b370cc1bc6 Fix kube-proxy panic on cleanup
Set the execer properly when we initialize ProxyServer or we will
end up with a panic.
2017-10-20 14:20:22 -04:00
Lion-Wei
ee3fbf9c5a add ProxyModeIPVS in proxy mode validation 2017-10-19 14:34:37 +08:00
m1093782566
518936fb5f validate ipvs scheduler 2017-10-17 09:45:28 +08:00
m1093782566
dab9b84b67 add proxy metrics in app level 2017-10-16 21:10:51 +08:00
Jeff Grafton
aee5f457db update BUILD files 2017-10-15 18:18:13 -07:00
Kubernetes Submit Queue
1c17d985ca Merge pull request #52183 from MrHohn/kube-proxy-incluster-host
Automatic merge from submit-queue (batch tested with PRs 52883, 52183, 53915, 53848). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

[GCE kube-up] Don't provision kubeconfig file for kube-proxy service account

**What this PR does / why we need it**:

Offloading the burden of provisioning kubeconfig file for kube-proxy service account from GCE startup scripts. This also helps us decoupling kube-proxy daemonset upgrade from node upgrade.

Previous attempt on https://github.com/kubernetes/kubernetes/pull/51172, using InClusterConfig for kube-proxy based on discussions on https://github.com/kubernetes/client-go/issues/281.

**Which issue this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close that issue when PR gets merged)*: fixes #NONE 

**Special notes for your reviewer**:
/assign @bowei @thockin 
cc @luxas @murali-reddy

**Release note**:

```release-note
NONE
```
2017-10-13 17:33:31 -07:00
Zihong Zheng
bc9d4ad66e Allow kube-proxy using InClusterConfig() 2017-10-13 14:40:35 -07:00
Kubernetes Submit Queue
a9264728d7 Merge pull request #53786 from xiangpengzhao/remove-func
Automatic merge from submit-queue (batch tested with PRs 53776, 53786, 53352, 51567). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

Clean up unused func checkKnownProxyMode

**What this PR does / why we need it**:
Minor cleanup.

**Which issue this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close that issue when PR gets merged)*: fixes #

**Special notes for your reviewer**:

**Release note**:

```release-note
NONE
```
2017-10-12 19:27:34 -07:00
xiangpengzhao
991a75e1e3 Clean up unused func checkKnownProxyMode 2017-10-12 16:40:52 +08:00
Davanum Srinivas
3c9fd43385 Parse cluster-cidr only if it is specified
In iptables/proxier.go, there is code to check the length of the
CIDR and setup nat/iptables only if the length of the string is
greater than zero. However in PR #49087, strong validation was
added so kube proxy currently bails out and basically mandates
a valid cidr has to be specified. Let us go back to the earlier
behavior.
2017-10-11 16:48:51 -04:00
Joe Heck
c629ec961c clarifying CLI output
backporting documentation changes made to generated CLI documentation
so that the source is correct for updates to the documentation and
kubernetes website. This is part of what is needed to resolve
https://github.com/kubernetes/kubernetes.github.io/issues/5618
and is updated based on review feedback while fixing that bug at
https://github.com/kubernetes/kubernetes.github.io/pull/5824
2017-10-10 11:56:06 -07:00
allencloud
fd82adb012 validate kube-proxy options
Signed-off-by: allencloud <allen.sun@daocloud.io>
Signed-off-by: Allen Sun <allen.sun@daocloud.io>
2017-10-09 14:12:15 +08:00
Kubernetes Submit Queue
db614dea24 Merge pull request #53044 from Mashimiao/kube-proxy-dep-fix
Automatic merge from submit-queue (batch tested with PRs 53044, 52956, 53512, 53028). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

Fix wrong deprecated option info

Signed-off-by: Ma Shimiao <mashimiao.fnst@cn.fujitsu.com>

**What this PR does / why we need it**:
`--cleanup-iptables` is replaced by `--cleanup` not `--cleanup-proxyrules`

**Release note**:
```
None
```
2017-10-05 18:29:37 -07:00
Kubernetes Submit Queue
daa0d81703 Merge pull request #52614 from leblancd/v6_proxy_bind_address
Automatic merge from submit-queue. If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

Add check for IPv6 '::' when calculating kube-proxy's node IP

kube-proxy currently checks for a bind address of 0.0.0.0 (IPv4 all-zeros)
when calculating kube-proxy's node IP, but it does not check for
an address of '::' (IPv6 all-zeros). For either of those all-zeros
addresses, the node IP should be determined based on the hostname,
rather than using the address directly.

Also added a helpful log message when the kube-proxy protocol is
determined to be IPv6.

fixes #52613



**What this PR does / why we need it**:
This PR adds a check for a bind address of IPv6 '::' (all zeros) when kube-proxy is calculating its node IP,
similar to what is done for a bind address of IPv4 0.0.0.0. For either of these all-zeros addresses,
kube-proxy should derive the node IP based on the hostname, rather than use the bind address
directly.

**Which issue this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close that issue when PR gets merged)*: fixes #52613

**Special notes for your reviewer**:

**Release note**:

```release-note
NONE
```
2017-10-04 19:55:04 -07:00
Kubernetes Submit Queue
1cd6a50809 Merge pull request #47640 from xiangpengzhao/fix-bin-ver
Automatic merge from submit-queue. If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

Add version info to kube-scheduler, kube-proxy and kubelet logs.

**What this PR does / why we need it**:
#46047 add such info to apiserver and CM. This adds version info to other binaries.

**Which issue this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close that issue when PR gets merged)*: related to #46047 

**Special notes for your reviewer**:

**Release note**:

```release-note
NONE
```
2017-09-28 20:02:59 -07:00
Ma Shimiao
bd6c0d2b55 Fix wrong deprecated option info in
Signed-off-by: Ma Shimiao <mashimiao.fnst@cn.fujitsu.com>
2017-09-26 16:07:31 +08:00
Dane LeBlanc
6d71eb590b Add check for IPv6 '::' when calculating kube-proxy's node IP
kube-proxy currently checks for a bind address of 0.0.0.0 (IPv4 all-zeros)
when calculating kube-proxy's node IP, but it does not check for
an address of '::' (IPv6 all-zeros). For either of those all-zeros
addresses, the node IP should be determined based on the hostname,
rather than using the address directly.

Also added a helpful log message when the kube-proxy protocol is
determined to be IPv6.

fixes #52613
2017-09-25 17:54:57 -04:00
Kubernetes Submit Queue
bc6d20cf33 Merge pull request #52403 from m1093782566/ut-ipvs-config
Automatic merge from submit-queue (batch tested with PRs 52355, 52537, 52551, 52403, 50673). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>..

Clear TODO: Adding UT for loading ipvs config

**What this PR does / why we need it**:

Clear TODO: Adding UT for loading ipvs config

**Which issue this PR fixes**: 

**Special notes for your reviewer**:

**Release note**:

```release-note
NONE
```
2017-09-23 15:27:00 -07:00
xiangpengzhao
af09159419 Add version info to kube-scheduler, kube-proxy and kubelet logs. 2017-09-21 17:46:24 +08:00
Madhan Raj Mookkandy
a8d797afdd Add exception to golint check
(*) Fix cleanup of NodePort resources. (*) Fix the logic to select existing policies

Fix review comment

Fix Bazel

Update GoDep License

Fix NodePort forwarding to target port

Fix Darwin Build break. +1

Implement IsCompatible to validate kernel support for kernel mode
2017-09-18 11:11:22 -07:00
Madhan Raj Mookkandy
63020d5f72 Vendor changes
Vendoring (NEW) in github.com/Microsoft/hcsshim
2017-09-14 16:00:07 -07:00