Commit Graph

60 Commits (48c6b7ea96526952e33ff9bee913660b274b5cef)

Author SHA1 Message Date
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