Commit Graph

46 Commits

Author SHA1 Message Date
zhouya0
4d3d722ebc Add missing kube build info metric 2020-04-01 17:04:45 +08:00
Han Kang
6eee64c308 add stability level to aggregator metrics and drop blank line in cmd file 2019-08-27 12:45:01 -07:00
Han Kang
466980dd74 migrate kube-apiserver metrics to stability framework 2019-08-27 12:45:01 -07:00
Odin Ugedal
7caf51daa4
Remove duplicate error messages from cli commands
Since we never use the cobras "SilenceErrors" or "SilenceUsage",
a command executed with "cmd.Execute()" will never return an error
without printing it.

The current behavior results in all error messages being printed twice:

Example:

$ kubectl abc
Error: unknown command "abc" for "kubectl"
Run 'kubectl --help' for usage.
unknown command "abc" for "kubectl"

This applies to all cli commands using Cobra. To verify, follow the code
path of the Execute function:

https://github.com/spf13/cobra/blob/c439c4fa0937/command.go#L793
Signed-off-by: Odin Ugedal <odin@ugedal.com>
2019-06-27 21:55:14 +02:00
Stephen Chan
7cbe2d6c5f move signal handling for hyperkube apiserver and kubelet commands out of hyperkube main command 2019-05-09 21:27:44 -07:00
Marek Counts
ba81a5409a move logs into component-base
all the code changes to move move /apiserver/pkg/util/logs into /component-base/logs
2019-01-17 09:16:21 -05:00
Walter Fender
f192657380 Add gauge metric for master of leader election.
Fixes #71730
0 indicates standby, 1 indicates master, label indicates which lease.
Tweaked name and documentation
Factored in Mike Danese feedback.
Removed dependency on prometheus from client-go using adapter.
Centralized adapter import.
Fixed godeps
Fixed boilerplate.
Put in fixes for caesarxuchao
2018-12-27 09:40:33 -08:00
Jay Lim
7fbdcf889a kube-apiserver: fix missing global flags for --help
Signed-off-by: Jay Lim <jay@imjching.com>
2018-11-21 12:30:09 -05:00
Mikhail Mazurskiy
3a243090a5
Simplify random seed initialization
There is no need to set the time zone as the result does not
depend on it
2018-10-11 21:01:15 +11:00
Andrew McDermott
9cbd54018f Remove signal handler registration from pkg/kubelet
The goal of this change is to remove the registration of signal
handling from pkg/kubelet. We now pass in a stop channel.

If you register a signal handler in `main()` to aid in a controlled
and deliberate exit then the handler registered in `pkg/kubelet` often
wins and the process exits immediately. This means all other signal
handler registrations are currently racy if `DockerServer.Start()` is
directly or indirectly invoked.

This change also removes another signal handler registration from
`NewAPIServerCommand()`; a stop channel is now passed to this
function.
2018-05-24 20:44:12 +01:00
David Eads
d7ddcca231 low hanging fruit for using cobra commands 2018-01-17 13:43:43 -05:00
Dr. Stefan Schimanski
11b25366bc apiservers: add synchronous shutdown mechanism on SIGTERM+INT 2017-08-15 09:17:18 +02:00
deads2k
8e26fa25da wire in aggregation 2017-03-27 09:44:10 -04:00
deads2k
78d8a8efa8 copy pkg/util/logs to apiserver 2017-02-13 12:07:15 -05:00
Dr. Stefan Schimanski
82826ec273 pkg/util/flag: move to k8s.io/apiserver 2017-01-24 20:56:03 +01:00
Dr. Stefan Schimanski
b798527793 Rename master/options/{APIServer -> ServerRunOptions} 2016-10-31 10:55:19 +01:00
Kris
1740358573 Split the version metric out to its own package 2016-08-24 11:47:16 -07:00
Kris
8d6ce0dcc6 Remove implicit Prometheus metrics from client 2016-08-19 10:11:45 -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
Lucas Käldström
88ea80b572 Remove GOMAXPROCS() calls because they are unnecessary 2016-07-19 11:08:21 +03:00
David McMahon
ef0c9f0c5b Remove "All rights reserved" from all the headers. 2016-06-29 17:47:36 -07:00
harry
f19d59cf35 Move flag into sub pkg 2016-03-14 21:30:38 +08:00
Clayton Coleman
c0c707d92d Split apiserver flags and initialization
Make it easier to keep defaults and flags clearly identified.
2016-01-06 21:14:30 -05:00
Mike Danese
8e33cbfa28 rewrite go imports 2015-08-05 17:30:03 -07:00
Prashanth Balasubramanian
8a5445d3db Randomize apiserver watch timeouts 2015-05-21 20:52:33 -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
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
Tim Hockin
899d30f16a move pkg/master/server to cmd/kube-apiserver/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
6bdede6925 Convert kube-apiserver to hyperkube.
Part of #108.

Also:
* Added hyperkube cmd (not built by default yet).
* Added version support to hyperkube
* Remove health_check_minions flag from apiserver as it is no longer used with #3733
2015-01-30 13:06:28 -08:00
Satnam Singh
d8bda4006a Increase API rate limit on read only port of apiserver 2015-01-30 11:58:59 -08:00
Deyuan Deng
c793c4f0ab Sync node status from node controller to master. 2015-01-29 23:17:15 -05:00
Satnam Singh
7d9845fc83 Parameterize API rate limits for apiserver 2015-01-28 15:08:08 -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
Paul Morie
fd834ae84d Pods should see services only from their own ns 2015-01-14 17:06:36 -05:00
Clayton Coleman
7fd887df61 Enable v1beta3 API via --runtime_config=api/v1beta3 flag
This exposes the proper v1beta3 API endpoint when the user specifies
the --runtime_config=api/v1beta3 argument to the apiserver. v1beta3
is still considered experimental and subject to change.

--runtime_config is a map of string keys and values, that can be
specified by providing

    --runtime_config=a=b,b=c,d,e

Only the key must be specified, the value can be omitted.

Enables v1beta3 in hack/local-up-cluster.sh and hack/test-cmd.sh
2015-01-08 13:01:24 -05:00
derekwaynecarr
a56087cdf8 Remove client from attributes, remove admission control interface, fix-up error codes 2015-01-07 14:42:31 -05:00
derekwaynecarr
520ae3ef27 Implement basic admission control framework 2015-01-07 14:42:31 -05:00
Jordan Liggitt
b36a44f036 Automatically serve API on https with self-signed cert 2015-01-06 09:36:29 -05:00
Clayton Coleman
cd4135666e Make Swagger API support optional, so that consumers can define their own
OpenShift would like to also enable swagger, but we need to register our
services as swagger services prior to the SwaggerAPI being started. I've
added a bool (default false) to master.Config to enable swagger, and split
the method in master out so that a downstream consumer can call it.
2014-12-15 15:29:55 -05:00
Jordan Liggitt
2475123d3c Bump minimum TLS version from SSLv3 to TLSv1.0 2014-12-10 09:13:15 -05:00
Jordan Liggitt
09ba404fb7 x509 request authenticator 2014-12-09 09:34:16 -05:00
Jordan Liggitt
c895331277 Make master take authenticator.Request interface instead of tokenfile 2014-11-19 15:07:51 -05: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