Commit Graph

95 Commits (750881c0ab62a9f59d53582bc33826caa167aa83)

Author SHA1 Message Date
stewart-yu 75e39073a3 split KubeControllerManagerConfiguration into fewer options struct 2018-04-13 08:40:54 +08:00
Kubernetes Submit Queue 60c6d0e0ba
Merge pull request #60197 from hzxuzhonghu/controller-manager-handler-chain
Automatic merge from submit-queue (batch tested with PRs 60197, 61614, 62074, 62071, 62301). 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>.

Refactor controller-manager: turn Serve func into handlerchain builder

**What this PR does / why we need it**:
follow up #59582 fix
> turn Serve func into a handler chain builder https://github.com/kubernetes/kubernetes/pull/59582#discussion_r167258465

**Special notes for your reviewer**:

**Release note**:

```release-note
NONE
```
2018-04-10 08:56:15 -07:00
Mikhail Mazurskiy 468655b76a
Use typed events client directly 2018-04-01 18:57:29 +10:00
Davanum Srinivas ba2778b17a Set leader-elect for kube-scheduler to true
Thanks to some great sleuthing by ikruglov!

kube-controller-manager defaults --leader-elect to true. We should
do the same for kube-scheduler. kube-scheduler used to have this
set to true, but it got lost during refactoring in:
efb2bb71cd
2018-03-30 10:52:01 -04:00
hzxuzhonghu 540a1de161 Refactor controller-manager: turn Serve func into handlerchain builder 2018-03-06 09:37:25 +08:00
hzxuzhonghu 8908c5d0a0 run update bazel 2018-02-28 17:25:03 +08:00
hzxuzhonghu 97be082fb1 cloud-controller-manager get /healthz instead of calling restclient.ServerAPIVersions to wait for apiserver being healthy 2018-02-28 17:24:59 +08:00
Kubernetes Submit Queue 6a7656b693
Merge pull request #59814 from sttts/sttts-ctrl-mgr-owners
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>.

cmd/controller-manager: add OWNERS for generic controller-manager code

This should have the same owners as kube-controller-manager.
2018-02-23 15:43:26 -08:00
hzxuzhonghu 398a0a9e66 update bazel 2018-02-22 16:43:13 +08:00
hzxuzhonghu c51fc2986b controller-manager make use of generic apiserver profiling 2018-02-22 16:43:07 +08:00
Dr. Stefan Schimanski 5ee35dbcff cmd/controller-manager: add OWNERS for generic controller-manager code 2018-02-14 09:48:08 +01:00
Dr. Stefan Schimanski 5483ab7679 Update generated files 2018-02-13 11:16:48 +01:00
Dr. Stefan Schimanski cecd663c21 controller-manager: add authz/n to options, nil by default 2018-02-13 11:16:48 +01:00
Dr. Stefan Schimanski f4564ea0b8 controller-manager: add SecureServingOptions 2018-02-13 11:16:47 +01:00
stewart-yu 0cbe0a6034 controller-manager: switch to config/option struct pattern 2018-02-13 11:16:17 +01:00
Khaled Henidak(Kal) 359d8191f9 Remove --service-sync-period flag which was not in use 2018-02-05 18:16:27 +00:00
Walter Fender 070a7b5823 Seperate loop and plugin control
Seperate loop and plugin control in the kube-controller-manager.
Adding an "--external-plugin" flag to specify a plugin to load when
cloud-provider is set to "external". Flag has no effect currently
when the cloud-provider is not set to external. The expectation is
that the cloud provider and external plugin flags would go away once
all cloud providers are on stage 2 cloud-controller-manager solutions.

Managing the control loops more directly based on start up flags.
Addressing issue brought up by @wlan0

Switched to using the main node controller in CCM.
Changes to enable full NodeController to start in CCM.
Fix related tests.
Unifying some common code between KCM and CCM.
Fix related tests and comments.
Folded in feedback from @jhorwit2 and @wlan0
2017-12-18 10:58:45 -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
Deyuan Deng 019b7fc74c Separate minion controller from master. 2014-10-30 20:24:15 -04:00
Daniel Smith 82bbcee8d9 Move port definitions to their own package 2014-10-20 11:28:12 -07:00
Brendan Burns ab6065944c Merge pull request #1584 from thockin/net
Flag-compatible IP type
2014-10-06 13:35:48 -07:00
Tim Hockin 0ad0a247c4 Flag-compatible IP type 2014-10-06 11:29:22 -07:00
Brendan Burns e6991d0a66 Extract the service controller from the apiserver, put it in the controller manager for now. 2014-10-03 15:27:22 -07:00
Clayton Coleman ff2eca97d9 Refactor the client (again) to better support auth
* Allows consumers to provide their own transports for common cases.
* Supports KUBE_API_VERSION on test cases for controlling which
  api version they test against
* Provides a common flag registration method for CLIs that need
  to connect to an API server (to avoid duplicating flags)
* Ensures errors are properly returned by the server
* Add a Context field to client.Config
2014-10-01 15:23:37 -04:00
derekwaynecarr b7b1193919 Add context object to kubecfg/client 2014-09-30 14:27:19 -04:00
Clayton Coleman 5483333e29 Allow server and client to take api version as argument
* Defaults to v1beta1
* apiserver takes -storage_version which controls etcd storage version
  and the version of the client used to connect to other apiservers
* Changed signature of client.New to add version parameter
* All controller code and component code prefers the oldest (most common)
  server version
2014-09-18 23:27:28 -04:00
Brendan Burns 99f7a4f25d Add healthz handlers to the controller manager and scheduler 2014-09-12 21:13:33 -07:00
Filipe Brandenburger 1d8067450c Rename `pkg/version/flag` to `pkg/version/verflag`
This avoids some conflict with the built-in `flag` module in Go. The
module was already being renamed to `verflag` on import anyways, so we
might as well just call it that.

Tested:
- hack/build-go.sh and ran the resulting binaries with -version args.

Signed-off-by: Filipe Brandenburger <filbranden@google.com>
2014-08-29 23:19:32 -07:00
Clayton Coleman 818f357128 Client should validate the incoming host value
Convert host:port and URLs passed to client.New() into the proper
values, and return an error if the value is invalid.  Change CLI
to return an error if -master is invalid.  Remove Client.rawRequest
which was not in use, and fix the involved tests. Add NewOrDie

Preserves the behavior of the client to not auth when a non-https
URL is passed (although in the future this should be corrected).
2014-08-28 13:47:36 -04:00
Joe Beda 2ea2c55d16 Fix e2d tests w/ http prefix in kube client init 2014-08-27 16:53:57 -07:00
Clayton Coleman 9006eadcfe kube-proxy can read config from the apiserver
All clients that talk to a "master" as a host:port or URL
(scheme://host:port) parameter.  Add tests.
2014-08-27 15:49:01 -04:00
Tim Hockin 0f97a73c1b Rename a bunch of "Make" functions to "New"
Also rename some to other names that make better reading.  There are still a
bunch of "make" functions but they do things like assemble a string from parts
or build an array of things.  It seemed that "make" there seemed fine.  "New"
is for "constructors".
2014-08-20 21:27:19 -07:00
Daniel Smith b430cebe72 Remove etcd dependency from controller manager. 2014-08-04 14:29:49 -07:00
Yuki Yugui Sonoda 331fd0d986 Extract "pkg/version".PrintAndExitIfRequested() to its own package
because it causes a runtime panic if a binary which has its own implementation
of "-version" flag tries to reuse a package library which indirectly depend on
"pkg/version".

e.g. If such an user-defined binary tires to link "pkg/api" or "pkg/client",
the binary fails with a runtime panic "flag redefined: version".
2014-08-01 15:05:27 +09:00
Filipe Brandenburger 7e56609139 Handle -version flag on all commands
Tested: Passed -version argument to kubelet (and all other binaries):
  $ output/go/bin/kubecfg -version
  Kubernetes version 0.1, build 6454a541fd56

Signed-off-by: Filipe Brandenburger <filbranden@google.com>
2014-07-30 18:48:56 -07:00
Kelsey Hightower dc7ee7c333 normalize -etcd_servers flag across all commands
The -etcd_servers flag is used inconsistently by the Kubernetes commands,
both externally and internally.

This patch fixes the issue by using the same type to represent a list of
etcd servers internally, and declares the -etcd_servers flag consistently
across all commands.

This patch should be 100% backwards compatible with no changes in behavior.
2014-07-20 07:48:47 -07:00
Yuki Yugui Sonoda c25f44c137 Fixes golint errors in cmd/. 2014-07-08 16:08:24 +09:00
Tim Hockin 9f9e75f508 Switch to glog for logging, bridge logging to glog.
1) imported glog to third_party (previous commit)
2) add support for third_party/update.sh to update just one pkg
3) search-and-replace:
  s/log.Printf/glog.Infof/
  s/log.Print/glog.Info/
  s/log.Fatalf/glog.Fatalf/
  s/log.Fatal/glog.Fatal/
4) convert glog.Info.*, err into glog.Error*

Adds some util interfaces to logging and calls them from each cmd, which
will set the default log output to write to glog.  Pass glog-wrapped
Loggers to etcd for logging.

Log files will go to /tmp - we should probably follow this up with a
default log dir for each cmd.

The glog lib is sort of weak in that it only flushes every 30 seconds, so
we spin up our own flushing goroutine.
2014-06-24 20:51:57 -07:00
Daniel Smith 61a494d303 First step of combination. 2014-06-24 09:38:22 -07:00
Daniel Smith e74ac01a62 Move run logic into package 2014-06-18 13:10:39 -07:00
Daniel Smith a24116c7bd Move controller to it's own package, it's not part of the registry. 2014-06-18 13:10:39 -07:00
Daniel Smith a047dc4930 No underscores in variable names. Add option to set hostname at command line. 2014-06-15 10:24:36 -07:00
Daniel Smith 8178240bbe Add a binary and scripts for running a local kubernetes cluster. 2014-06-12 09:35:04 -07:00
Brendan Burns 6018497174 Task -> Pod part #3 2014-06-08 22:38:45 -07:00
Joe Beda 2c4b3a562c First commit 2014-06-06 16:40:48 -07:00