Commit Graph

359 Commits (ed7840ad50f31df143da18853b0a0059bf0e7216)

Author SHA1 Message Date
Jeff Grafton 20d221f75c Enable auto-generating sources rules 2017-01-05 14:14:13 -08:00
deads2k 4d7fcae85a mechanicals 2017-01-05 11:14:27 -05:00
Mike Danese 161c391f44 autogenerated 2016-12-29 13:04:10 -08:00
Kubernetes Submit Queue 64c21133f0 Merge pull request #39142 from k82cn/k8s_39136
Automatic merge from submit-queue (batch tested with PRs 39152, 39142, 39055)

Update NodeRef to v1.ObjectReference.

fixes #39136
2016-12-27 17:10:13 -08:00
Klaus Ma b0dfa4ad47 Add event when failed to open local port. 2016-12-23 04:51:12 +08:00
Klaus Ma e901800687 Update NodeRef to v1.ObjectReference. 2016-12-22 16:28:20 +08:00
Mike Danese c87de85347 autoupdate BUILD files 2016-12-12 13:30:07 -08:00
Wojciech Tyczynski aa7da5231f Update bazel files 2016-12-09 09:42:02 +01:00
Wojciech Tyczynski e8d1cba875 GetOptions in client calls 2016-12-09 09:42:01 +01:00
caiyixiang da46d1cf51 correct a few spelling mistakes 2016-12-01 16:34:25 +08:00
Chao Xu bcc783c594 run hack/update-all.sh 2016-11-23 15:53:09 -08:00
Chao Xu 643f0bbd34 other cmd/ 2016-11-23 15:53:09 -08:00
tanshanshan 2e0ea0bf8f remove repeat const declaration 2016-11-22 16:46:51 +08:00
Patrice Ferlet 439a03136f Check sysfs Type instead of Device
Some distribution, or installation use "none" device to mount sysfs (eg. Scaleway VPS). We should check the mount type instead of device.

Fix #37183
2016-11-21 14:56:10 +01:00
Kubernetes Submit Queue c52efa570d Merge pull request #36079 from apprenda/windows_kube_proxy
Automatic merge from submit-queue

Add Windows support to kube-proxy

<!--  Thanks for sending a pull request!  Here are some tips for you:
1. If this is your first time, read our contributor guidelines https://github.com/kubernetes/kubernetes/blob/master/CONTRIBUTING.md and developer guide https://github.com/kubernetes/kubernetes/blob/master/docs/devel/development.md
2. If you want *faster* PR reviews, read how: https://github.com/kubernetes/kubernetes/blob/master/docs/devel/faster_reviews.md
3. Follow the instructions for writing a release note: https://github.com/kubernetes/kubernetes/blob/master/docs/devel/pull-requests.md#release-notes
-->

**What this PR does / why we need it**:
This is the first stab at supporting kube-proxy (userspace mode) on Windows

**Which issue this PR fixes** : 
fixes #30278

**Special notes for your reviewer**:
The MVP uses `netsh portproxy` to redirect traffic from `ServiceIP:ServicePort` to a `LocalIP:LocalPort`. 
For the next version we are expecting to have guidance from Microsoft Container Networking team.

**Limitations**:
Current implementation does not support DNS queries over UDP as `netsh portproxy` currently only supports TCP. We are working with Microsoft to remediate this.

cc: @brendandburns @dcbw 

**Release note**:
<!--  Steps to write your release note:
1. Use the release-note-* labels to set the release note state (if you have access) 
2. Enter your extended release note in the below block; leaving it blank means using the PR title as the release note. If no release note is required, just write `NONE`. 
-->
```release-note
```
2016-11-09 01:26:27 -08:00
Vishnu kannan dd8ec911f3 Revert "Revert "Merge pull request #35821 from vishh/gci-mounter-scope""
This reverts commit 402116aed4.
2016-11-08 11:09:10 -08:00
Paulo Pires 23c35f24c7
Added automatic seletion of userspace proxy mode depending on the OS kube-proxy is running. 2016-11-07 09:11:35 +00:00
Zihong Zheng 55f75c37f7 Default to the old behavior for proxier sync. 2016-11-06 22:45:53 -08:00
Timothy St. Clair 2b012e822a Add minimum iptables sync period to the proxy, default is 2/sec 2016-11-04 00:38:35 -05:00
Bowei Du a06fc6ab7a Adds TCPCloseWaitTimeout option to kube-proxy for sysctl nf_conntrack_tcp_timeout_time_wait
Fixes issue-32551
2016-11-03 22:07:02 -07:00
saadali 402116aed4 Revert "Merge pull request #35821 from vishh/gci-mounter-scope"
This reverts commit 973fa6b334, reversing
changes made to 41b5fe86b6.
2016-11-03 20:23:25 -07:00
Kubernetes Submit Queue 973fa6b334 Merge pull request #35821 from vishh/gci-mounter-scope
Automatic merge from submit-queue

[Kubelet] Use the custom mounter script for Nfs and Glusterfs only

This patch reduces the scope for the containerized mounter to NFS and GlusterFS on GCE + GCI clusters

This patch also enabled the containerized mounter on GCI nodes

Shepherding multiple PRs through the submit queue is painful. Hence I combined them into this PR. Please review each commit individually.

cc @jingxu97 @saad-ali

https://github.com/kubernetes/kubernetes/pull/35652 has also been reverted as part of this PR
2016-11-03 04:32:19 -07:00
Kubernetes Submit Queue 175954fb12 Merge pull request #35090 from YuPengZTE/devConntrack
Automatic merge from submit-queue

In error, the first letter should be lowcase

**What this PR does / why we need it**:
Fix the typo of the first letter in error

**Special notes for your reviewer**:
Reference here: https://github.com/golang/go/wiki/CodeReviewComments#error-strings

Signed-off-by: YuPengZTE yu.peng36@zte.com.cn
2016-11-03 02:47:11 -07:00
Vishnu Kannan 414e4ae549 Revert "Adding a root filesystem override for kubelet mounter"
This reverts commit e861a5761d.
2016-11-02 15:18:09 -07:00
Chao Xu 850729bfaf include multiple versions in clientset
update client-gen to use the term "internalversion" rather than "unversioned";
leave internal one unqualified;
cleanup client-gen
2016-10-29 13:30:47 -07:00
Vishnu kannan e861a5761d Adding a root filesystem override for kubelet mounter
This is useful for supporting hostPath volumes via containerized
mounters in kubelet.

Signed-off-by: Vishnu kannan <vishnuk@google.com>
2016-10-26 21:42:59 -07:00
Mike Danese 763c4987f2 autogenerated 2016-10-24 14:47:27 -07:00
Jan Chaloupka 4fde09d308 Replace client with clientset in code 2016-10-23 22:00:35 +02:00
Mike Danese 3b6a067afc autogenerated 2016-10-21 17:32:32 -07:00
Kubernetes Submit Queue c07c73efbb Merge pull request #34385 from m1093782566/m109-kube-proxy-sys
Automatic merge from submit-queue

Generify kube-proxy conntracker setmax() and refactor util/sysctl

<!--  Thanks for sending a pull request!  Here are some tips for you:
1. If this is your first time, read our contributor guidelines https://github.com/kubernetes/kubernetes/blob/master/CONTRIBUTING.md and developer guide https://github.com/kubernetes/kubernetes/blob/master/docs/devel/development.md
2. If you want *faster* PR reviews, read how: https://github.com/kubernetes/kubernetes/blob/master/docs/devel/faster_reviews.md
3. Follow the instructions for writing a release note: https://github.com/kubernetes/kubernetes/blob/master/docs/devel/pull-requests.md#release-notes
-->

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

Fix Kube-proxy `conntrack.go` **TODO** [here](https://github.com/kubernetes/kubernetes/blob/master/cmd/kube-proxy/app/conntrack.go#L56). This PR consists of two parts:

* Generify kube-proxy `realConntracker.SetMax(int)` 

That is, change

`ioutil.WriteFile("/sys/module/nf_conntrack/parameters/hashsize", []byte(strconv.Itoa(max/4)), 0640)` 

to

`sysctl.New().WriteValue("/sys/module/nf_conntrack/parameters/hashsize", max/4)`

* Refactor `sysctl.SetSysctl()` and `sysctl.GetSysctl()` to `WriteValue(path string, value string) error` and `GetValue(path value) (error, string)`
2016-10-21 00:18:53 -07:00
Jing Xu 34ef93aa0c Add mounterPath to mounter interface
In order to be able to use new mounter library, this PR adds the
mounterPath flag to kubelet which passes the flag to the mount
interface. If flag is empty, mount uses default mount path.
2016-10-20 14:15:27 -07:00
m1093782566 ad89825065 build util function for write sys file
Change-Id: I8f122b4314c1d983e7ba1ce1d66ce876bef0dca9
2016-10-20 14:18:24 +08:00
YuPengZTE 927d7a07d2 In error, the first letter should be lowcase
Signed-off-by: YuPengZTE <yu.peng36@zte.com.cn>
2016-10-19 14:25:47 +08:00
Clayton Coleman 957c0955aa
Run defaulting on the scheduler startup 2016-10-18 21:07:35 -04:00
Tim Hockin 957c85a8fd Add a lower-bound for conntrack 2016-09-26 20:25:40 -07:00
Kubernetes Submit Queue a61a1f51f3 Merge pull request #29732 from ping035627/ping035627-patch-0728
Automatic merge from submit-queue

Optimise the getConntrackMax function

The PR optimise the getConntrackMax function, make it more concise.
2016-09-26 19:56:00 -07:00
PingWang 3bce910d0f delete null value
Signed-off-by: PingWang <wang.ping5@zte.com.cn>
2016-09-07 08:27:17 +08:00
Angus Salkeld f785f3d3ef Clean up IPTables caps i.e.: sed -i "s/Iptables/IPTables/g" 2016-08-29 10:34:42 +10:00
Kubernetes Submit Queue 6fcbbe8663 Merge pull request #31404 from m1093782566/m109-proxy-log-level
Automatic merge from submit-queue

[kube-proxy] Modify log level from Info to Warning when proxyMode unknown

<!--  Thanks for sending a pull request!  Here are some tips for you:
1. If this is your first time, read our contributor guidelines https://github.com/kubernetes/kubernetes/blob/master/CONTRIBUTING.md and developer guide https://github.com/kubernetes/kubernetes/blob/master/docs/devel/development.md
2. If you want *faster* PR reviews, read how: https://github.com/kubernetes/kubernetes/blob/master/docs/devel/faster_reviews.md
3. Follow the instructions for writing a release note: https://github.com/kubernetes/kubernetes/blob/master/docs/devel/pull-requests.md#release-notes
-->

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

Currently, we use `glog.Infof` to print the log when proxy-mode is unknown, I think we may need to modify to `glog.Warningf`.

**Which issue this PR fixes**: 

fixes #31405
2016-08-28 16:14:53 -07:00
m1093782566 23aadeadb8 modify log Info to Warning when proxyMode unknown
Change-Id: I39f143d07fb43261afb0d6cbd67bff054796ebcc
2016-08-25 10:20:22 +08:00
Kris 1740358573 Split the version metric out to its own package 2016-08-24 11:47:16 -07:00
Justin Santa Barbara 2c103af2b6 Create testable implementation of sysctl
This is so we can test kubenet Init, which calls sysctl
2016-08-23 01:42:37 -04:00
Kubernetes Submit Queue b51d5c3cc0 Merge pull request #30638 from krousey/metrics_registration
Automatic merge from submit-queue

Remove implicit Prometheus metrics from client

**What this PR does / why we need it**: This PR starts to cut away at dependencies that the client has.

**Release note**:
<!--  Steps to write your release note:
1. Use the release-note-* labels to set the release note state (if you have access) 
2. Enter your extended release note in the below block; leaving it blank means using the PR title as the release note. If no release note is required, just write `NONE`. 
-->
```release-note
The implicit registration of Prometheus metrics for request count and latency have been removed, and a plug-able interface was added. If you were using our client libraries in your own binaries and want these metrics, add the following to your imports in the main package: "k8s.io/pkg/client/metrics/prometheus". 
```

cc: @kubernetes/sig-api-machinery @kubernetes/sig-instrumentation @fgrzadkowski  @wojtek-t
2016-08-21 16:47:05 -07:00
Kris 8d6ce0dcc6 Remove implicit Prometheus metrics from client 2016-08-19 10:11:45 -07:00
Jeff Lowdermilk 51198f59da Add --feature-gates to kube-system components
apiserver,scheduler,controller-manager,proxy,kubelet all get
flag. Using one variable to plumb through config via salt/init
scripts for GCE and GKE
2016-08-19 09:07:43 -07:00
Kubernetes Submit Queue c19e9cc89d Merge pull request #26044 from smarterclayton/multiversion_encode
Automatic merge from submit-queue

Guarantee that Encode handles nested objects again
2016-08-18 21:10:55 -07:00
Clayton Coleman 5f8366aac3
Convert() should accept the new conversion Context value
Allows Convert() to reuse the same conversions as ConvertToVersion
without being overly coupled to the version.
2016-08-18 14:45:20 -04:00
Minhan Xia 1acaa1db09 Revert "Revert "syncNetworkUtil in kubelet and fix loadbalancerSourceRange on GCE"" 2016-08-18 10:19:48 -07:00
Daniel Smith 2aa0bb2dfc Revert "syncNetworkUtil in kubelet and fix loadbalancerSourceRange on GCE" 2016-08-16 18:12:28 -07:00
Minhan Xia 643fc3803b add firewall chain to filter request based on loadbalancer source range 2016-08-15 17:42:41 -07:00
PingWang ee567e1ea0 optimise the getConntrackMax function
Signed-off-by: PingWang <wang.ping5@zte.com.cn>
2016-08-15 09:42:09 +08:00
Kubernetes Submit Queue ba1666fb7b Merge pull request #30293 from girishkalele/kube-proxy-hostname
Automatic merge from submit-queue

kube-proxy: Propagate hostname to iptables proxier

Need to propagate the hostname (i.e. Nodename) from kube-proxy to the iptables proxier to allow kube-proxy to determine local endpoints.

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.kubernetes.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.kubernetes.io/reviews/kubernetes/kubernetes/30293)
<!-- Reviewable:end -->
2016-08-10 02:00:37 -07:00
Girish Kalele 5d6abf59ff kube-proxy: Propagate hostname to iptables proxier 2016-08-09 10:05:29 -07:00
Chao Xu a771578a1c move pkg/util/ files to their own package to reduce client-go dependencies 2016-08-05 23:32:02 -07:00
Harry Zhang 15d0f5cfd5 Move linedelimiter to it's own pkg
Refactoring resource container
2016-07-29 02:29:26 -04:00
Lucas Käldström 88ea80b572 Remove GOMAXPROCS() calls because they are unnecessary 2016-07-19 11:08:21 +03:00
Tim Hockin 1f37281dae Scale kube-proxy conntrack limits by cores
For large machines we want more conntrack entries than smaller machines.
2016-07-15 16:36:40 -07:00
Random-Liu 4246853211 Prevent kube-proxy from panicing when sysfs is mounted as read-only.
Send a node event when this happens and hint to the administrator
about the remediation.
2016-07-10 22:32:51 -07:00
David McMahon ef0c9f0c5b Remove "All rights reserved" from all the headers. 2016-06-29 17:47:36 -07:00
Wojciech Tyczynski 0f881d6120 Use protobufs by default to communicate with apiserver 2016-05-21 11:38:32 +02:00
Clayton Coleman fdb110c859
Fix the rest of the code 2016-04-29 17:12:10 -04:00
Wojciech Tyczynski d6896fa45a Allow setting content-type in binaries 2016-04-21 14:12:13 +02:00
CJ Cullen 760568796f Masquerade traffic from off-cluster going through kube-proxy. 2016-04-19 21:39:34 -07:00
goltermann 32d569d6c7 Fixing all the "composite literal uses unkeyed fields" Vet errors. 2016-03-25 15:25:09 -07:00
k8s-merge-robot 4e4ad61260 Merge pull request #23366 from goltermann/vet
Auto commit by PR queue bot
2016-03-24 21:50:56 -07:00
goltermann 34d4eaea08 Fixing several (but not all) go vet errors. Most are around string formatting, or unreachable code. 2016-03-22 17:26:50 -07:00
harry f19d59cf35 Move flag into sub pkg 2016-03-14 21:30:38 +08:00
Mike Danese 5ec02bd021 add http handler to export configuration state 2016-02-24 14:12:28 -08:00
k8s-merge-robot b32078d89b Merge pull request #20496 from matthewdupre/masquerade-config
Auto commit by PR queue bot
2016-02-08 10:49:20 -08:00
Matt Dupre 9925cddc11 Change iptables fwmark to use single configurable bit instead of whole mark space 2016-02-08 11:12:09 +00:00
Jan Chaloupka 4389b3f0d6 Rewritte util.* -> wait.* wherever reasonable 2016-02-07 12:02:20 +01:00
k8s-merge-robot c26087db45 Merge pull request #19611 from thockin/proxy-sysctl-decouple
Auto commit by PR queue bot
2016-02-06 23:01:48 -08:00
Tim Hockin 41ba8ced6d Dont log errors on proxy leftover cleanup 2016-02-07 02:41:50 +00:00
Jordan Liggitt 544af0a910 Set kube-proxy arg default values 2016-02-06 11:01:13 -05:00
Mike Danese ee4e60d78c componentconfig: move kube proxy defaulting into the exetrnal api 2016-02-03 11:04:24 -08:00
Tim Hockin 11f75e61b9 Inject a kernel-compat tester for kube-proxy test 2016-02-02 22:11:39 -08:00
Tim Hockin 7ed83ad4f9 Make kube-proxy default to iptables (regression)
This was accidentally introduced as part of the component config changes.
2016-02-02 12:45:11 -08:00
Mike Danese 309eac5f7f update proxy server 2016-01-28 15:46:40 -08:00
Alex Mohr 1b6cc1e263 Merge pull request #19823 from erictune/test-spew
Stop test spew on non-Linux.
2016-01-21 10:45:25 -08:00
Eric Tune 0bb716d6b2 Stop test spew on non-Linux.
Make kube-proxy test not run on non-linux to avoid
error spew.
2016-01-19 06:54:38 -08:00
Harry Zhang 936a11e775 Use networking to hold network related pkgs
Change names of unclear methods

Use net as pkg name for short
2016-01-15 13:46:16 +08:00
Nagarjun c98364e79b insert space after comment character in cmd folder 2016-01-08 16:25:57 +05:30
Clayton Coleman 715b77cbcd Split proxy and scheduler arguments
Keep options and flags distinct from initialization
2016-01-06 21:34:31 -05:00
Tim Hockin da0ac31182 Set conntrack params in kube-proxy
Add flags to control max connections (set to 256k vs 64k default) and TCP
established timeout (set to 1 day vs 5 day default).  Flags can be set to 0 to
mean "don't change it".

This is only set at startup, and not wrapped in a rectifier loop.

Tested manually.
2015-12-30 15:46:40 -08:00
Avesh Agarwal 3d5207fd73 This commit adds type information to events.
This addresses issue #15624.
2015-11-24 09:59:54 -05:00
Mike Danese 65b8d43543 remove code that puts kube-proxy into a special cgroup since it runs in a container now 2015-11-23 10:20:58 -08:00
Tim Hockin 970c045848 Enable iptables kube-proxy by default in master 2015-11-13 18:38:01 -08:00
k8s-merge-robot ec9b493647 Merge pull request #14639 from gmarek/hollow-proxy
Auto commit by PR queue bot
2015-10-27 18:22:38 -07:00
gmarek 5a4e4d4d57 Add a HollowProxy to the HollowNode. 2015-10-27 18:23:29 +01:00
feisky 13dce74adb Gendocs for docs/admin/kube-* 2015-10-25 19:24:23 +08:00
Steve Sloka 4302208aa9 globally search/replace 'KubeApiQps' to 'KubeAPIQPS' and 'KubeApiBurst' to 'KubeAPIBurst' to match GO rules 2015-10-23 08:24:19 -04:00
Abhishek Shah d172ca6986 Added UdpIdleTimeout flag 2015-10-21 17:25:35 -07:00
k8s-merge-robot 6dc3dcf36a Merge pull request #15414 from thockin/exp-beta-annotations
Auto commit by PR queue bot
2015-10-20 17:45:32 -07:00
Clayton Coleman 9440d17041 Proxy resync period should not be 30 seconds 2015-10-15 11:26:49 -04:00
Tim Hockin 4a2e64d3eb Add beta annotation for kube-proxy 2015-10-14 15:31:37 -07:00
Dawn Chen 69a8dc64c7 Merge pull request #15247 from spiffxp/kube-api-limits
Expose kube-api burst/qps settings for kube components
2015-10-12 15:19:46 -07:00
Aaron Crickenberger 69351e3e88 Expose kube-api burst/qps settings for kube components
Default to hardcodes for components that had them, and 5.0 qps, 10 burst
for those that relied on client defaults

Unclear if maybe it'd be better to just assume these are set as part of
the incoming kubeconfig.  For now just exposing them as flags since it's
easier for me to manually tweak.
2015-10-12 11:56:15 -04:00
Avesh Agarwal 888a488162 Adds new tests and increases code coverage. 2015-10-06 18:24:08 -04:00
Avesh Agarwal 8fb96afff4 This removes unused params passed to proxy server. 2015-10-06 18:21:16 -04:00
k8s-merge-robot bd58984844 Merge pull request #14736 from aveshagarwal/master-proxy-crash
Auto commit by PR queue bot
2015-10-02 18:37:38 -07:00
k8s-merge-robot 698441cad3 Merge pull request #14655 from aveshagarwal/master-proxy-issue
Auto commit by PR queue bot
2015-09-30 22:51:20 -07:00
Avesh Agarwal af90318222 Fixes crash when proxy is run with --cleanup-iptables=true. 2015-09-30 23:13:13 -04:00
Avesh Agarwal 310d4f48e6 Fixes erroneous declaration of oomAdjuster.
Fixes duplication of execer, dbus, iptInterface.
Fixes default assignment of SyncPeriod.
2015-09-29 23:00:14 -04:00
k8s-merge-robot b661cfd21e Merge pull request #14643 from liguangbo/change_Oom_to_OOM
Auto commit by PR queue bot
2015-09-29 18:54:22 -07:00
Avesh Agarwal 7c1ff97e39 execer is already created earliler, and so there is no need to create it
again.
2015-09-28 09:56:57 -04:00
liguangbo 12299087da Change Oom to OOM 2015-09-28 18:18:04 +08:00
Tim Hockin 026054f73e Set iptables refresh to 30s 2015-09-25 14:02:24 -07:00
gmarek 1c25c2cd99 Refactor KubeProxy to allow mocking of all moving parts. 2015-09-23 18:47:05 +02:00
Tim Hockin bd3cd82a12 Change kube-proxy flag: annotation for proxy-mode
This changes the --legacy-userspace-proxy flag to be a string flag
--proxy-mode.  If specified, the flag will be respected ('userspace' and
'iptables' being valid values).  If left blank (default) we will choose the
"best".  best means userspace for now UNLESS the user adds an annotation
(net.experimental.kubernetes.io/proxy-mode) to their node, in which case we
will try to use that.

This allows people to try it on a single machine without fear of global failure
and without it getting rolled back on reboots.  It is a poor-man's config blob.
2015-09-21 18:06:24 -07:00
Dan Winship 30ea22f40e Make kube-proxy resync its rules on firewalld restart 2015-09-15 11:17:40 -04:00
Dan Winship 8bc9c40796 Watch for firewalld restart, to allow reloading iptables rules 2015-09-15 11:17:40 -04:00
Daniel Smith b225c1d47a Run gofmt (separate commit for easy rebases) 2015-09-10 17:17:59 -07:00
Daniel Smith 15b30b8b09 Move version agnostic parts of client
pkg/client/unversioned/cache -> pkg/client/cache
pkg/client/unversioned/record -> pkg/client/record
2015-09-10 17:17:59 -07:00
k8s-merge-robot 3879bee562 Merge pull request #13670 from aveshagarwal/proxy-fixes
Auto commit by PR queue bot
2015-09-09 09:55:52 -07:00
k8s-merge-robot 5a01a760b2 Merge pull request #13669 from aveshagarwal/proxy-birthcry-fix
Auto commit by PR queue bot
2015-09-08 17:33:05 -07:00
Avesh Agarwal f94c57ac30 If ForceUserspaceProxy is true, check for iptables based proxy
should not be performed.
2015-09-08 19:54:07 -04:00
Paul Morie 7f5e70022b Fix typo in kube-proxy server.go 2015-09-08 14:03:45 -04:00
Avesh Agarwal 599100dc64 Fixed kube-proxy birthCry event as it seemed to start too early and
had a possibility to not start successfully after the event was already
posted.
2015-09-08 09:33:42 -04:00
caogaojin 60cb4406e9 Cleanup deprecated Forever function
Since util.Forever function has been deprecated, we should cleanup these
pieces of code.
2015-08-24 10:31:59 +08:00
BenTheElder 81ab51709a Add --cleanup-iptables flag to kube-proxy
Adds a flag to cleanup iptables rules created by kube-proxy per
https://github.com/mesosphere/kubernetes-mesos/issues/353#issuecomment-1
27382832
2015-08-21 14:44:11 -04:00
BenTheElder 1f2076ce64 Add flag to masquerade all in kube-proxy when using iptables proxier 2015-08-20 20:12:32 -04:00
Kris Rousey ae6c64d9bb Moving everyone to unversioned client 2015-08-18 10:23:03 -07:00
Tim Hockin 3a5c23d727 test for and set bridge-nf-call-iptables sysctl 2015-08-17 20:57:44 -07:00
Eric Paris 30d34d0e59 Reduce false positives with verify-flag-underscore.sh by updating regex
Check to make sure there is not an alphanumeric character immeditely
before or after the 'flag'.  It there is an alphanumeric character then
this is obviously not actually the flag we care about.  For example if
the project declares a flag "valid-name" but the regex finds something
like "invalid_name" we should not match.  Clearly this "invalid_name" is
not actually a wrong usage of the "valid-name" flag.
2015-08-13 21:06:39 -04:00
Tim Hockin 776132e1ae Make kube-proxy iptables sync period configurable 2015-08-13 09:53:32 -07:00
BenTheElder ae569e20b5 Partially Implement #3760 2015-08-12 02:39:15 -04:00
CJ Cullen 103a39c621 Merge pull request #12464 from jiangyaoguo/add-events-for-kube-proxy
Add Birthcry event to kube-proxy
2015-08-11 17:10:03 -07:00
jiangyaoguo 6889f693db Add birthcry event to kube-proxy
1. Add HostnameOverride parameter for kube-proxy as kubelet did.
2. Add Birthcry event for kube-proxy.
3. Because record event need apiserver client, adjust order of code partly.
2015-08-11 14:24:07 +08:00
Eric Paris fe6b633e2a Convert for util.IP to just use a net.IP
pflag can handle IP addresses so use the pflag code instead of doing it
ourselves. This means our code just uses net.IP and we don't have all of
the useless casting back and forth!
2015-08-10 10:15:05 -04:00
BenTheElder 1f6baa6549 Move userspace code to sub-package in proxy.
Moves the userspace code in proxy to a sub-package and adds the
ProxyProvider interface.

This is in preparation for landing an implementation of
https://github.com/GoogleCloudPlatform/kubernetes/issues/3760, which
will mostly be in another sub package for iptables.
2015-08-07 20:07:15 -04:00
Ananya Kumar 6ef3de1d5f Add QoS support on node 2015-08-07 11:18:16 -07:00
Mike Danese 8e33cbfa28 rewrite go imports 2015-08-05 17:30:03 -07:00
jiangyaoguo 79ed954ec2 replace Reflector with client.cache.Reflector in kube-proxy 2015-06-29 11:21:50 +08:00
James DeFelice 4abcf7449c implementation of proxy port allocation 2015-06-02 12:28:25 +00:00
Clayton Coleman de36967c7e Proxier should return typed errors 2015-05-15 13:50:05 -04:00
Robert Bailey c47b9178b4 Replace the auth config file with a kubeconfig file when
starting the kubelet on GCE.
2015-05-13 01:03:28 -07:00
Eric Paris 6b3a6e6b98 Make copyright ownership statement generic
Instead of saying "Google Inc." (which is not always correct) say "The
Kubernetes Authors", which is generic.
2015-05-01 17:49:56 -04:00
Tim Hockin a3d45fada8 Change flags to use dashes in help 2015-04-27 15:11:03 -07:00
Eric Tune 6081fa52a7 controller, scheduler, proxy use kubeconfig
--master option still supported.
--kubeconfig option added to kube-proxy,
kube-scheduler, and kube-controller-manager
binaries.

Kube-proxy now always makes some kind of API
source, since that is its only kind of config.
Warn if it is using a default client, which probably won't work.

Uses the clientcmd builder.
2015-04-17 12:44:17 -07:00
Eric Tune 6b93e5ba9d Kube-proxy learns to read a kubeconfig
--master flag is still supported for distros that need it.
But now, --kubeconfig flag can be used instead, or in addition,
to specify the auth info, and/or the location of the master.

A subsequent PR will change salt to generate a kubeconfig,
and to make kube-proxy use it, for salt-based clouds.
2015-04-16 23:42:54 -07:00
Victor Marmol 587cfa4274 Run Kube-proxy in "/kube-proxy" container. 2015-04-14 10:29:05 -07:00
Eric Paris 036937227f Use Fprintf to print formatted strings
Shouldn't be using Fprint() with a format string.
2015-04-14 10:51:57 -04:00
Eric Paris 8e7d14196f Fix printing errors from failed binary runs
I had the kublet die on startup and the only error was "0x401da0"  Which
I assume is an address of the err.Error function.  The other way to fix
this, I think, would be to use err.Error(), however that could cause
fmt.Fprintf() problems, debuging on the error message people used.

Now I get a nice clean error I can understand:

"cAdvisor.New() err = mountpoint for cpu not found"
2015-04-10 17:56:47 -04:00
Robert Bailey 8174cef3a3 Enable pprof on the kube-proxy's healthz http server. 2015-04-10 12:05:32 -07:00
Robert Bailey ebde44c032 Separate the bind address for the healthz server from the bind address from
the proxy itself. Default the bind address for the healthz server to localhost.
2015-03-26 10:40:48 -07:00
Clayton Coleman 015bc3b7bd Remove global map from healthz
It currently is impossible to use two healthz handlers on different
ports in the same process.  This removes the global variables in favor
of requiring the consumer to specify all health checks up front.
2015-03-19 19:49:44 -04:00
Eric Tune 2ca265ae3b Remove --etcd_servers flag from kubelet and proxy.
All the distros that use this have been updated,
or have PRs out to update them, or owners
have been asked to fix RPMs.

Removing this prevents further use of this model.

Remove now dead code: EtcdClientOrDie

Remove now dead pkg/proxy/config/etcd.go.

Remove unused imports.
2015-03-10 09:29:09 -07:00
Tim Hockin 0a7b89cc00 keep hyperkube noise in one place 2015-02-20 08:49:12 -08:00
Tim Hockin 8c2ff81ae0 move pkg/proxy/server to cmd/kube-proxy/app 2015-02-20 08:49:12 -08:00
Daniel Smith fcddefa184 Set GOMAXPROCS. Print errors on stderr. 2015-02-19 10:30:31 -08:00
Joe Beda 638069b879 Convert proxy server to hyperkube 2015-02-02 14:03:13 -08:00
Joe Beda 6bd6b905f5 Address code review comments
Add some documentation.
Create new util.InitFlags() function to merge and parse in one step.
2015-01-15 09:12:20 -08:00
Joe Beda dcd00c936e Move all kubernetes to posix flags 2015-01-15 09:12:19 -08:00
Vishnu Kannan 6f53f33fda Set oom_score_adj for kubelet and kube-proxy to a low value to help them survive system memory pressure. 2014-12-24 00:34:28 +00:00
James DeFelice e27b8f0df7 proxy should fail fast if proxier is nil, rather than panic later 2014-12-15 12:56:35 -05:00
Eric Tune 0c2a4302f5 Fix race that drops the first event on restart.
RegisterHandlers was called after the listening for events had already begun.
So, there was a race where sometimes the first update would, with the
initial state, would notify an empty list of listeners.
This showed up in services.sh e2e test as empty service and endpoint maps
after the test step which restarts the kube-proxy.

Perhaps due to timing, this doesn't show up with etcd source, but does
show up with apiserver as a source.  A separate PR makes APIserver
the source as a default, and depends on this.

This took me several days to debug.
2014-12-02 22:04:45 -08:00
Mike Danese 5bda95f9fe added healthz check to the proxy with configurable port 2014-11-23 09:07:19 -08:00
Joe Beda 66d287f7e4 Merge branch 'rename-to-kube' of https://github.com/eparis/kubernetes into eparis-rename-to-kube
* 'rename-to-kube' of https://github.com/eparis/kubernetes:
  rename kube server binaries to kube-

Conflicts:
	docs/salt.md
2014-11-17 09:52:10 -08:00
Eric Paris a99c3c7963 rename kube server binaries to kube-
apiserver becomes kube-apiserver
controller-manager -> kube-controller-manager
scheduler and proxy similarly.

Only thing I promise is that right now hack/build-go.sh and
build/release.sh exit with 0.  That's it.  Who knows if any of this
actually works....
2014-11-13 20:08:26 -05:00