Commit Graph

610 Commits

Author SHA1 Message Date
dahefanteng 2a250d73b1 remove repeated type conversion
Kubernetes-commit: c12e6dbb80282fa0859a483883bf15b7ba85f01c
2017-10-09 10:03:24 +08:00
Jeff Grafton f4dbe23125 update BUILD files
Kubernetes-commit: aee5f457dbfd70c2d15c33e392dce6a3ca710116
2017-10-12 13:52:10 -07:00
hzxuzhonghu 670d5651ed rename test file name
Kubernetes-commit: 81d87466c89772c11b460cdb02df488ffb58d770
2017-09-29 14:51:55 +08:00
hzxuzhonghu c00f087950 remove unused filed
Kubernetes-commit: b8100ceec3866119ae7efad602a2ae4aca7e13c6
2017-09-29 14:44:13 +08:00
Eric Chiang 1f5bdb8525 generic webhook: set a default timeout for webhook requests
Add a 30 second timeout for all HTTP requests that the webhook sends
so they timeout instead of hanging forever.

Kubernetes-commit: 2de3ee5c48503d3b3214aef55ae7fd0dacc40457
2017-10-11 17:44:29 -07:00
Cao Shufeng b920c935aa run hack/update-all.sh
Kubernetes-commit: b69285af7ff117018f9cd6c756e2d6b352cd9d42
2017-10-12 11:29:41 +08:00
Cao Shufeng f7e881914a support micro time for advanced audit
Kubernetes-commit: 817bc6954ca9af02013fd8f492f8ef865c217b0d
2017-09-25 11:56:30 +08:00
xiangpengzhao 19cfabed24 Mark etcd-quorum-read as deprecated.
Kubernetes-commit: 2a454dcea0b867bab44796a86a8b27f04b49528d
2017-10-12 19:42:12 +08:00
Jordan Liggitt 37b44cbe7f Change --etcd-quorum-read default to true
Kubernetes-commit: 2400185f45ac3eee1f90aa5f4d5287fa65d0feba
2017-10-10 00:16:33 -04:00
Michael Taufen 8e0c55d47a Make feature gates loadable from a map[string]bool
Command line flag API remains the same. This allows ComponentConfig
structures (e.g. KubeletConfiguration) to express the map structure
behind feature gates in a natural way when written as JSON or YAML.

For example:

KubeletConfiguration Before:
```
apiVersion: kubeletconfig/v1alpha1
kind: KubeletConfiguration
featureGates: "DynamicKubeletConfig=true,Accelerators=true"
```

KubeletConfiguration After:
```
apiVersion: kubeletconfig/v1alpha1
kind: KubeletConfiguration
featureGates:
  DynamicKubeletConfig: true
  Accelerators: true
```

Kubernetes-commit: 131b419596a3d4fce1020c3b11f78034b5880593
2017-09-25 13:36:19 -07:00
Clayton Coleman 5f039fac0c Avoid intermediate List allocations as items added to the list
Pick a reasonable middle ground between allocating larger chunks of
memory (2048 * ~500b for pod slices) and having many small allocations
as the list is resized by preallocating capacity based on the expected
list size. At worst, we'll allocate a 1M slice for pods and only add
a single pod to it (if the selector is very specific).

Kubernetes-commit: ce0dc76901bd1ce36ca20c5cf96b89088d0e95a2
2017-10-09 22:16:13 -04:00
Clayton Coleman d70f8cc7f2 Use watch cache when rv=0 even when limit is set
Kubernetes-commit: 6a76931e2cfd53991a2da20795b929fcaf7877e7
2017-09-25 14:22:25 -04:00
Clayton Coleman f24913f06e Promote continuation token schema to v1
Change the filtering logic to require a leading path and clean that
afterwards.

Kubernetes-commit: ac8808b792f624fa04aa7c589bd5aca1b9afde39
2017-09-24 18:09:54 -04:00
Clayton Coleman 2f9b480e69 Fill partial pages on the server rather than forcing client to
The etcd3 storage now attempts to fill partial pages to prevent clients
having to make more round trips (latency from server to etcd is lower
than client to server). The server makes repeated requests to etcd of
the current page size, then uses the filter function to eliminate any
matches. After this change the apiserver will always return full pages,
but we leave the language in place that clients must tolerate it.

Reduces tail latency of large filtered lists, such as viewing pods
assigned to a node.

Kubernetes-commit: da7124e5e5c0385dd5bcfc72ef035effc7708913
2017-09-24 18:06:57 -04:00
Clayton Coleman 17e1e4d3cb Enable API chunking and promote to beta for 1.9
All list watchers default to using chunking.

Kubernetes-commit: 113889e72da573946f3389b628251647c2a858b9
2017-09-23 15:21:54 -04:00
p0lyn0mial 136304ddb2 removes k8s.io/kubernetes/pkg/api dependency from the webhook plugin.
Kubernetes-commit: fa96700b76de3df759b3dddb747da575c909acec
2017-10-09 22:15:25 +02:00
Chao Xu 9074f20eb7 generated
Kubernetes-commit: bbac32c299eb0660e89870a7fbc698c79af04b51
2017-10-04 17:27:09 -07:00
Chao Xu 9696b0c05e move initializer to the generic apiserver
move k8s.io/kubernetes/plugin/pkg/admission/initialization to
k8s.io/apiserver/pkg/admission/plugin/initialization/initialization.go;
move k8s.io/kubernetes/pkg/kubeapiserver/admission/configuration to
k8s.io/apiserver/pkg/admission/configuration.

Kubernetes-commit: 89a0511fcb22caf23427587c026952b2a387f293
2017-10-04 16:54:08 -07:00
Dr. Stefan Schimanski 633dca03ee Update generated files
Kubernetes-commit: ecb65a6a71d8e76c069a9d9d0b52f552f35cd0d9
2017-10-06 14:09:55 +02:00
Dr. Stefan Schimanski 3cfc602704 apimachinery: mechanical removal of ObjectCopier plumbing
Kubernetes-commit: 509df603b18d356777176953e5d160b6f3d0bba9
2017-10-06 13:30:12 +02:00
p0lyn0mial f189d35f0e removes Authorizer and ExternalClientSet from kubeapiserver's admission initializer.
Kubernetes-commit: 6b1f1d14148fe3962594d8f4c9ca15d1c6171819
2017-10-03 18:08:30 +02:00
Mike Danese 6d34454396 stop assigning satnam reviews
Kubernetes-commit: 9de1d1f57736fd6e5c45f7c41398de31073181cc
2017-10-02 18:11:25 -07:00
Di Xu a9d3dd8d8f fix some typos in api types
Kubernetes-commit: a1cee9ab3bc50310498554f3929676b577943062
2017-07-19 22:07:12 +08:00
Jordan Liggitt 64d1b8400e Make feature gate enablement checks lock-free
Kubernetes-commit: 55692c52e1d6f3922bf4af2b6cbe2b0eef886fbd
2017-09-21 14:51:04 -04:00
Hitoshi Mitake a7bf68f0d6 storage, etcd3: add an option for configuring interval of compaction requests from apiserver
This commit adds an option for controlling request of compaction to
etcd3 from apiserver. There is a situation that apiserver cannot fully
own its etcd cluster (e.g. sharing it with canal). In such a case,
apiserver should have limited access in terms of etcd's auth
functionality so it don't have a priviledge to issue compaction
requests. It means that the compaction requests should be issued by
other component and apiserver's compaction requests are needless.

For such use cases, this commit adds a new flag
`storagebackend.Config.CompactionInterval`. If the flag is non 0,
apiserver issues the compaction requests like current behaviour (the
default is 5 minutes). If it is 0, apiserver doesn't issue the
requests. It can be configured with a newly added option of apiserver
`--etcd-compaction-interval`.

Kubernetes-commit: 87d4d3e92be6b93517f189082b0451cee6957ee5
2017-09-01 14:06:25 +09:00
p0lyn0mial 941c87ca76 moved admission interfaces WantsClientCert, WantsAuthorizer and WantsExternalKubeClientSet to apiserver
Kubernetes-commit: 475493ced69f47dd78d72ff98bf2c5853fc5ea19
2017-09-27 22:05:34 +02:00
Clayton Coleman d1431e49e4 Endpoints can add a get or connect options type in their group
optionsExternalVersion is being used for shared types (meta.k8s.io). The
installer should first look in the current API group for GET and CONNECT
options objects before checking in `v1`.

Kubernetes-commit: 0e4b20fbf9ff299c37a5055e082fa27dbf2b49c0
2017-09-25 17:03:34 -04:00
Brendan Burns 5621f05378 Add 201/202 to the list of returned codes.
Kubernetes-commit: 449082f55d323bf4acf6963c4d093c044742762c
2017-09-26 22:31:19 -07:00
p0lyn0mial 1c446c37e3 adds two new fields to AdmissionOption.
The first one being RecommendedPluginOrder the second one being DefaultOffPlugins.
In case a cluster-admin did not provide plugin names they will be derived from these fields.

Kubernetes-commit: 7a92947588070a8eedd0bf50edcfbf0fcc1d4096
2017-08-24 21:36:39 +02:00
Clayton Coleman 2aa97c4081 Add a negotiate method media type for use in explicit contexts
Kubernetes-commit: 26d87e49cbbc4caa9e0eef47fce9115c1f43566e
2017-09-23 15:07:55 -04:00
Shyam Jeedigunta 649cc4c05e Modify traces in deletion handler
Kubernetes-commit: c4ca2c734963afd442ff6c43631d004092ea74e8
2017-09-27 00:48:06 +02:00
Clayton Coleman 4175a07239 Track gauge of all long running API requests
Allows a caller to know how many exec, log, proxy, and watch calls are
running at the current moment.

Kubernetes-commit: fabce1b893f96bdf466c1fdb1fcf825210c008ae
2017-09-19 20:35:29 -04:00
Clayton Coleman 1caba4b96e Collapse all metrics handlers into common code
Remove the MonitorRequest method and replace with a method that takes
request.RequestInfo, which is our default way to talk about API objects.
Preserves existing semantics for calls.

Kubernetes-commit: 10e6dc5ed3573118c56fa8823b387e47c8e8ae06
2017-09-11 14:53:18 -04:00
Jim Minter 4e1a340bd1 ProducesObject should only update the returned API object resource documentation
Kubernetes-commit: e18eeb2d63f67b1e0dd3e79982beb7879242c3bb
2017-09-05 15:34:15 -05:00
Jeff Grafton eabf5a2c6e Use buildozer to delete licenses() rules
Kubernetes-commit: 02fb4200dcdf8636eac5953d04b2c4af912f443b
2017-09-21 14:54:29 -07:00
Jeff Grafton ecbbfb0461 Use buildozer to remove deprecated automanaged tags
Kubernetes-commit: 532bd482dfbe25c6fc970d2175f7e02fec2fc8c0
2017-09-21 14:53:56 -07:00
Jordan Liggitt 78261d54df Preserve leading and trailing slashes on proxy subpaths
Kubernetes-commit: 04eede9b2a2a24571cb084fcb952c6a2a2a2bdd1
2017-09-22 22:35:20 -04:00
Walter Fender 9a6c2541ac Ensure we log the flag apiserver starts with.
Trying to make sure we always log the flags an instance of apiserver
starts with.
This can be especially valuable for emailed logs or e2e/kubemark tests.

Kubernetes-commit: 366459aee84a4de1f0342a464bd479a5d12e6f0f
2017-09-08 10:00:50 -07:00
Shiyang Wang 548cb7f4e2 move specialDefaultResourcePrefixes out of vendor/k8s.io/apiserver
Kubernetes-commit: 0084d70b56fb0b262f75f1b837001be04a694fb6
2017-09-07 10:19:30 +08:00
tengqm 65c833f23a Fix apiserver help message
Kubernetes-commit: acad74670dd1167ea0e90b2eeef6946d3871bdbf
2017-09-04 17:22:25 +08:00
Kubernetes Publisher 7b23343a61 conversion-gen: make staging dirs independent of living in vendor/
Kubernetes-commit: f5451127512e42294564efae97d4cb669df54f49
2017-09-22 11:42:06 +00:00
Kubernetes Publisher d7e7a0ab18 Update the test under audit policy
Kubernetes-commit: ea1694eab1a1b251b31ce006cc48594a7eb05add
2017-09-22 11:42:06 +00:00
Kubernetes Publisher 0f62a50c16 etcd3 store: retry w/live object on conflict
In GuaranteedUpdate, if it was called with a suggestion (e.g. via the
watch cache), and the suggested object is stale, perform a live lookup
and then retry the update.

Signed-off-by: Andy Goldstein <andy.goldstein@gmail.com>

Kubernetes-commit: bf33df16b52508974ddedacd814010cfe0fb79f0
2017-09-22 11:42:06 +00:00
Kubernetes Publisher 8fc21589fe Increase sliding window to 5hr for request_latencies metric
Kubernetes-commit: e1ba3da16c9bebccb3902952d56b59f2e2dbb900
2017-09-22 11:42:05 +00:00
Kubernetes Publisher 24ccf40372 Add extra steps to delete resource handler trace
Kubernetes-commit: 6089cadab3d136455b1b4376d819464fb0d2379a
2017-09-22 11:42:05 +00:00
Kubernetes Publisher 7d0b0b91fc Report "resource" scope where possible
Also rename the variables to match the concept

Kubernetes-commit: c13a3c03201c9082c4b373b7af8b99d7effd5a62
2017-09-22 11:42:04 +00:00
Kubernetes Publisher 7727b5a3a8 Report scope on all apiserver metrics
Counting list of namespaces is != list across all namespaces (same for
latency)

Kubernetes-commit: 545aba778d5d039a3b8a0f0939fdf8f8261ae1a8
2017-09-22 11:42:04 +00:00
Kubernetes Publisher 4c578f11a1 Normalize WATCHLIST to WATCH in metrics
This causes confusion and doesn't match what we authorize on

Kubernetes-commit: 5e46d5b5450f7e7db87e860440f1bb1f8f523ffa
2017-09-22 11:42:04 +00:00
Clayton Coleman 644d9a8cf1 Allow watch cache to be disabled per type
Currently setting watch cache size for a given resource does not disable
the watch cache. This commit adds a new `default-watch-cache-size` flag
to map to the existing field, and refactors how watch cache sizes are
calculated to bring all of the code into one place. It also adds debug
logging to startup to allow us to verify watch cache enablement in
production.

Kubernetes-commit: fc2d201e155296f311ae0a9278b00dcae2d68708
2017-09-09 21:44:33 +00:00
Maciej Szulik 6959d4a79a Fill in creationtimestamp in audit events
Kubernetes-commit: 3dd3e7aa5243228b49211f4bb40022a719cc57ac
2017-09-09 21:44:33 +00:00
Chao Wang 221a6a181e A policy with 0 rules should return an error
Kubernetes-commit: 0ad4282fd0b31e1d12b711696efb134bdc2f83cc
2017-09-09 21:44:32 +00:00
Dr. Stefan Schimanski 9f41d17af2 Update bazel
Kubernetes-commit: fbd310dbc7312fcae4267dd64326a1e7b4a0a8ae
2017-09-09 21:44:32 +00:00
Dr. Stefan Schimanski a063c5336d apiserver: avoid panics on nil sub-option structs
Kubernetes-commit: b153268da79d2acf14e042945959801c3dba8221
2017-09-09 21:44:32 +00:00
Dr. Stefan Schimanski 97e22b00fa apiserver: split core API creation from secure serving
Kubernetes-commit: 2b64d3a0fd2ccdad4b2f21acb484a36e04381856
2017-09-09 21:44:32 +00:00
Dr. Stefan Schimanski 75cf96f31e apiserver: stratify versioned informer construction
Kubernetes-commit: ca3f7453464f6866a3bf467c8b9d8e132484cfb4
2017-09-09 21:44:32 +00:00
Dr. Stefan Schimanski 8ec769da6b apiserver: allow disabling authz/n via options
Kubernetes-commit: dffe50f8bd820295f7f1fbc56a6269b6b8c6966b
2017-09-09 21:44:32 +00:00
Dr. Stefan Schimanski e4b1b0656b apiserver: make config completion structural recursion
Kubernetes-commit: 1bcea54104cb7f53e58924dd5413cf4ba7ceb587
2017-09-09 21:44:32 +00:00
Cao Shufeng d2f7a0c820 Log a warning when --audit-policy-file not passed to apiserver
Kubernetes-commit: 3b91f1cc0d32278a9baf2a4b9b4e416cbfb2457f
2017-09-09 21:44:31 +00:00
Di Xu e69ddb7b01 fix format of forbidden messages
Kubernetes-commit: 95738d5a0eeb179325858e52ff83ff86de6fce0b
2017-09-09 21:44:31 +00:00
Clayton Coleman 702960b762 Provide field info in storage configuration
Kubernetes-commit: 1fde2698ec152901856062eb89cc5d2742925ce2
2017-09-09 21:44:30 +00:00
CaoShufeng 5d22e67a97 enhance unit tests of advance audit feature
This change does three things:
    1. use auditinternal for unit test in filter stage
    2. add a seperate unit test for Audit-ID http header
    3. add unit test for audit log backend

Kubernetes-commit: c030026b544da2dd7ef7201019bdc0ac255c2d23
2017-09-09 21:44:30 +00:00
Cao Shufeng 0c7ac2906f set AdvancedAuditing feature gate to true by default
Kubernetes-commit: 1388426898f46de5e8730c3f71ce3ccaf50337b8
2017-09-09 21:44:30 +00:00
Cao Shufeng 26f73b45d4 fix docstring of advanced audit policy
Kubernetes-commit: 22f4c1ad4db102d66ec829a64ab601919f2019f5
2017-09-05 14:03:27 +00:00
Dr. Stefan Schimanski 433a5a01a7 audit: fix fuzzer
Kubernetes-commit: 58dd0879a754baff151913184ab5e1cd924fb19d
2017-09-05 14:03:26 +00:00
Cao Shufeng 3827624a56 generated: update API resources
./hack/update-codegen.sh
./hack/update-generated-protobuf.sh

Kubernetes-commit: b50acbdf0152f59e5fd6b065560aed4f85717a7a
2017-09-04 14:03:48 +00:00
Cao Shufeng 4905dd9b0c Provide a way to omit Event stages in audit policy
Updates https://github.com/kubernetes/kubernetes/issues/48561
This provide a way to omit some stages for each audit policy rule.

For example:
  apiVersion: audit.k8s.io/v1beta1
  kind: Policy
  - level: Metadata
    resources:
       - group: "rbac.authorization.k8s.io"
         resources: ["roles"]
    omitStages:
      - "RequestReceived"

RequestReceived stage will not be emitted to audit backends with
previous config.

Kubernetes-commit: 47ba91450fbe7d9002bfc9d4a48a73256252821f
2017-09-04 14:03:48 +00:00
David Eads 9f885389e9 make url parsing in apiserver configurable
Kubernetes-commit: ccc7c9bdfa80caee93953a96dec0d689d93f08e5
2017-09-04 14:03:48 +00:00
Cao Shufeng 92f836da87 update generated protobuf for audit v1beta1 api
Kubernetes-commit: ea519bc06020d2b2a68fa46a3f57c9d66827659d
2017-09-04 14:03:47 +00:00
mbohlool eaf131e1fc Provide whole delegate chain to kube aggregator
Kubernetes-commit: 7cbdb90890ac89ec15be2b21b5cbdc51e94e42d6
2017-09-04 14:03:46 +00:00
Maciej Szulik 3c2866020c Switch audit output to v1beta1
Kubernetes-commit: f3487f08c6c2444adde9ba110263c9132769332b
2017-09-03 14:04:14 +00:00
David Eads 56e7f5b9c2 expose discovery information on scalable resources
Kubernetes-commit: 65d0f188f68f6428ccc0a776adff496d972faa56
2017-09-03 14:04:14 +00:00
Cao Shufeng d781318aca audit real impersonated user info
Log the newest impersonated user info in the second audit event. This
will help users to debug rbac problems.

Kubernetes-commit: 1c3dc52531b7761921c8855cafc58b669da111f1
2017-09-03 14:04:13 +00:00
Chao Xu 6a1592b4e4 update initializer names to valid ones in tests
Kubernetes-commit: 85ee09e4c901e9fcf725bb4797ea2b3c278ee96c
2017-09-03 14:04:13 +00:00
Clayton Coleman 460257fd61 Server side implementation of paging for etcd3
Add a feature gate in the apiserver to control whether paging can be
used. Add controls to the storage factory that allow it to be disabled
per resource. Use a JSON encoded continuation token that can be
versioned. Create a 410 error if the continuation token is expired.

Adds GetContinue() to ListMeta.

Kubernetes-commit: 8952a0cb722b77459cf2701632a30f5b264f5aba
2017-09-03 14:04:12 +00:00
Maciej Szulik 677d724b3a Allow audit to log authorization failures
Kubernetes-commit: 9fef244d4ccce0ea8daf37ab86a7af4892d000cf
2017-09-03 14:04:12 +00:00
Morgan Bauer c5c5445b49 basic logging for healthz installer
- InstallHandler is the public interface through which all interaction
   occurs.
 - It is good to know whether the default ping is occurring to know due
   to manual installation or automatic installation.
 - It is good to know how many handlers are installed to see whether
   code changes are taking effect.
 - It is good to know the names of the handlers that are installed to
   make sure that a handler a user thinks is installed is being
   installed at runtime.
 - Print all the checkers once

Kubernetes-commit: efa66227d4fbcfad9fec21755b898f5d10d3344c
2017-09-03 14:04:11 +00:00
Chen Rong b4c851a534 generated
Kubernetes-commit: ed8adf6e51d76b3652be3b433b2dab590f1ff1f0
2017-09-03 14:04:11 +00:00
xilabao a50d8a0b4f add selfsubjectrulesreview api
Kubernetes-commit: f14c1384387ac196e87334b5a0e05e01d7581387
2017-09-03 14:04:10 +00:00
Cao Shufeng 626d406dd0 run hack/update-codecgen.sh and hack/update-bazel.sh
Kubernetes-commit: f94ca49e6307a7a668a7f5eb037891ac2045e167
2017-09-01 16:38:54 +00:00
Cao Shufeng 9ab155429e Split APIVersion into APIGroup and APIVersion in audit events
audit.Event.ObjectRef.APIVersion currently holds both the the API group and
version, separated by a /. This change break these out into separate fields.

This is part of:
https://github.com/kubernetes/kubernetes/issues/48561

Kubernetes-commit: c57eebfe2f8d36361d510f0afd926777a44cccd2
2017-09-01 16:38:54 +00:00
Tim Hockin 39fbd1db4a Remove generated JSON code
Kubernetes-commit: 9e2fccd1de5384a6ecadf54849f612a10ecfe93a
2017-09-01 16:38:01 +00:00
Eric Chiang b4c852ede3 generated: update API resources
./hack/update-codegen.sh
	./hack/update-codecgen.sh
	./hack/update-generated-protobuf.sh

Kubernetes-commit: 9caff69027e09f4617f06f30a6359072503ecc47
2017-09-01 16:38:01 +00:00
Eric Chiang 1fa829c7c8 Audit policy v1beta1 now supports matching subresources and resource names.
policy:
	- level: Metadata
	  resources:
	  - group: ""
	    resources ["pods/logs"]
	- level: None
	  resources:
	  - group: ""
	    resources: ["configmaps"]
	    resourceNames: ["controller-leader"]

The top level resource no longer matches the subresource. For example "pods"
no longer matches requests to the logs subresource on pods.

```release-note
Audit policy supports matching subresources and resource names, but the top level resource no longer matches the subresouce. For example "pods" no longer matches requests to the logs subresource of pods. Use "pods/logs" to match subresources.
```

Kubernetes-commit: 85491f1578b9b97751a332d3b957d874cecf27b3
2017-09-01 16:38:01 +00:00
Chenxingyu 22f326be0a make api request verb can be overrided and make "GET" pod log request reported as "CONNECT" pod log request for metrics
Kubernetes-commit: e49315f2db93f5fb2333794ad8064ab7a44053d7
2017-09-01 16:37:09 +00:00
Jordan Liggitt 605d377a4e Make feature gate threadsafe
Kubernetes-commit: d3546434b7252167b851a40a339d8ed2049ee5e5
2017-09-01 16:37:08 +00:00
Nikhita Raghunath 3669fc6851 Add feature gate for CustomResourceValidation
update feature gates for generic apiserver

Add apiextensions-apiserver features to golint_failures

Ignore alpha feature if gate is disabled

Kubernetes-commit: 6ba1523a8e36c3121a9e08bfac7b4f342bb8ccb3
2017-09-01 16:37:08 +00:00
Saksham Sharma b9e05868ba Unify cloudprovided and normal KMS plugins
Kubernetes-commit: 6a4afc897c2ed4fb80f1b6121a06f86bc8095cd8
2017-09-01 16:37:07 +00:00
huangjiuyuan ce838cffe4 modifying the comment of BeforeDelete function to improve readibility
Kubernetes-commit: 4ce3b6cf4f8486e4335d05d7f573ad1859c14ce8
2017-09-01 16:37:07 +00:00
Jordan Liggitt 8494697027 Feature gate initializers field
Kubernetes-commit: 658956f0631c6bd3ecf9f756db4a0710efea98ea
2017-08-29 13:18:50 +00:00
Joe Betz e1e8bebf50 Add --request-timeout to allow the global request timeout of 60 seconds to be configured.
Kubernetes-commit: cb764756c6f152bfb866b161315369bc47ebf13c
2017-08-29 13:18:50 +00:00
Cao Shufeng 892932fb62 Fix forbidden message format
Before this change:
 # kubectl get pods --as=tom
 Error from server (Forbidden): pods "" is forbidden: User "tom" cannot list pods in the namespace "default".
After this change:
 # kubectl get pods --as=tom
 Error from server (Forbidden): pods is forbidden: User "tom" cannot list pods in the namespace "default".

Kubernetes-commit: ab0918673728fc50fc539017c86bbc03fceb0adc
2017-08-29 13:18:50 +00:00
Jordan Liggitt 064c57bb9b Generated files
Kubernetes-commit: c7defb806fc6c69deb4ab57655c3fa323ba8bebd
2017-08-29 13:18:49 +00:00
Slava Semushin b274c2ad9a Fix benchmarks to really test reverse order of the keys.
Kubernetes-commit: 734be0c49f3d283ec086c9aef2dc63142b481c19
2017-08-29 13:18:49 +00:00
Cao Shufeng e74487ab1a set --audit-log-format default to json
Updates: https://github.com/kubernetes/kubernetes/issues/48561

Kubernetes-commit: 130f5d10adf13492f3435ab85a50d357a6831f6e
2017-08-29 13:18:49 +00:00
xiangpengzhao 49516f112c Remove deprecated flag "long-running-request-regexp".
Kubernetes-commit: 72f4ab70e28a945ce25d40524696d0a486f8969e
2017-08-29 13:18:48 +00:00
Clayton Coleman d6c8c768c4 Make generic metadata conform to documented name column convention
Kubernetes-commit: e5857b1ec02514f06b82bf5833fcb87645732883
2017-08-29 13:18:48 +00:00
Clayton Coleman e027d67a5f Verify TableConversion behavior in resttest
Kubernetes-commit: 0b0235b48497c07cc6c8286167978b599d69b690
2017-08-29 13:18:48 +00:00
Dan Mace b824ea82d1 Clarify finalizer function
Kubernetes-commit: c845c444d52b81689e4555aec0e8175f687b6a44
2017-08-29 13:18:47 +00:00
Dan Mace 38a9bfc72a Enable finalizers independent of GC enablement
Decouple finalizer processing from garbage collection configuration.
Finalizers should be effective even when garbage collection is disabled
for a given store.

Fixes https://github.com/kubernetes/kubernetes/issues/50528.

Kubernetes-commit: ed5b5bb94e7c75f22a7fc302e47dade6c0d1662d
2017-08-29 13:18:47 +00:00
Simo Sorce 91f15f8472 Add an OrDie version for AddPostStartHook
Simplifies usage and consolidate the error message so it is always
the same everywhere.

Signed-off-by: Simo Sorce <simo@redhat.com>

Kubernetes-commit: 15c54ffa7750c3037f464933c2b678a9a94cea82
2017-08-29 13:18:47 +00:00
Cao Shufeng d7bd79fee1 [advanced audit api] fuzz Event with random value
This is an error import by me:
https://github.com/kubernetes/kubernetes/pull/49115

We need to fuzz other parts of Event with random value, otherwise
this round trip test will not make too much sense.
@sttts @ericchiang

Kubernetes-commit: f2ec610455f3756afebfcbd99c108abc86a5015d
2017-08-29 13:17:13 +00:00
gmarek 0a67bd6be4 Make metav1.(Micro)?Time functions take pointers
Kubernetes-commit: 0504cfbc2556155c31e5db43673d6b903c64dfa2
2017-08-29 13:16:16 +00:00
Monis Khan 504f70acec Add enj as reviewer to OWNERS
Adding myself as a reviewer for the following areas:

- API
- auth
- registry
- storage (etcd)

Signed-off-by: Monis Khan <mkhan@redhat.com>

Kubernetes-commit: dd06794bc20ef1e0889af576c7a4f7a2f607e49d
2017-08-29 13:16:16 +00:00
Cao Shufeng 81eb3429e7 remove useless argument "name"
Kubernetes-commit: 2e97611bc62b88c48777d6209a0ed28d17d0e52d
2017-08-29 13:16:16 +00:00
duan-yue e89debc597 fix typo
Kubernetes-commit: 2ad04cb46dfa84fbd3b169f555ee0ed71b277428
2017-08-29 13:16:15 +00:00
guangxuli 768926168b fix incorrect logic
Kubernetes-commit: d4b41afe59736e63c0f5388256324c2583d7a659
2017-08-29 13:16:14 +00:00
Jacob Simpson 68a92a4526 Add metric for remaining life of authenticating certificates
When incoming requests to the API server are authenticated by a
certificate, the expiration of the certificate can affect the validity
of the authentication. With auto rotation of certificates, which is
starting with kubelet certificates, the goal is to use shorter lifetimes
and let the kubelet renew the certificate as desired. Monitoring
certificates which are approaching expiration and not renewing would be
an early warning sign that nodes are about to stop participating in the
cluster.

Kubernetes-commit: 49a19c6011e05363a8baf8e99c917d11a9496568
2017-08-29 13:16:14 +00:00
Dr. Stefan Schimanski 24a3b34c79 audit: disable new v1beta1 types until incompatible changes are done
Kubernetes-commit: 1dc251a1604b1576258f123ac8dd8390bba2e4a9
2017-08-29 13:16:13 +00:00
Cao Shufeng 24b54db39e run hack/update-all.sh
Kubernetes-commit: 0410221c3fec1a54cde05104b92e44e13cddc77a
2017-08-29 13:16:13 +00:00
Cao Shufeng 3468d049a7 upgrade advanced audit to v1beta1
Kubernetes-commit: f4e8b8f1464e588306d5c1c4ffdc1a6cb1e9313b
2017-08-29 13:16:13 +00:00
Dr. Stefan Schimanski 1e4465a8e7 apiserver: simplify deepcopy calls
Kubernetes-commit: b2442224e79f480409806c2ccfa24a9acb708162
2017-08-29 13:16:13 +00:00
Mik Vyatskov 04aa1e08ec Implement batching audit webhook graceful shutdown
Kubernetes-commit: 7798d32fc787d79da617914259d9285e558054f7
2017-08-29 13:16:12 +00:00
Nikhita Raghunath 9edc635fcc FeatureGate: update comments
Kubernetes-commit: fea5a8bc8a7ef2f956d2b11cb54248ec9545ef15
2017-08-29 13:16:12 +00:00
Dr. Stefan Schimanski 86ef841256 apiservers: add synchronous shutdown mechanism on SIGTERM+INT
Kubernetes-commit: 11b25366bc7bfe2ad273c8bf9c332fd9d233bffc
2017-08-29 13:16:11 +00:00
m1093782566 7313c11a9e add validation for fed-apiserver
Kubernetes-commit: f2ea31fd925f764f8c684710d9cd345663e88d17
2017-08-29 13:16:11 +00:00
Dr. Stefan Schimanski 2384086d1e apimachinery: remove misleading NewDefaultRESTMapper
Kubernetes-commit: 87c9f89cb15b2a64271dbdd292e2ce4abe7ab84a
2017-08-29 13:16:11 +00:00
Dr. Stefan Schimanski 2c8f1ce1d5 apimachinery: remove pre-apigroups import prefix logic
Kubernetes-commit: 8728576236698083f619c4fab06943b174f3fc61
2017-08-29 13:16:10 +00:00
Jordan Liggitt be8f046a0c Add union token authenticator
Kubernetes-commit: 4fd8196cf56aa7884f5a385017b2be651a259e59
2017-08-29 13:15:24 +00:00
Jordan Liggitt 80d2e2dae5 Add token cache component
Kubernetes-commit: 1670ba58d5425caecbde8871b07521e9e5888f78
2017-08-29 13:15:24 +00:00
Jordan Liggitt dcfd8acc4d Add token group adder component
Kubernetes-commit: 15d8509a711efa062a1357cf1cfb398ec6e91023
2017-08-29 13:15:24 +00:00
Jeff Grafton 6c539a43c6 Use buildozer to delete licenses() rules except under third_party/
Kubernetes-commit: a7f49c906df816123e7d4ccbd4cebab411519465
2017-08-29 13:15:24 +00:00
Jeff Grafton 6caa2933ae Use buildozer to remove deprecated automanaged tags
Kubernetes-commit: 33276f06be5e872bf53ca62a095fcf0a6b6c11a8
2017-08-29 13:15:24 +00:00
Jeff Grafton f8c99c82f6 Autogenerate BUILD files
Kubernetes-commit: cf55f9ed45e6df2431d47cfc5b9c9b30758527f1
2017-08-29 13:15:23 +00:00
m1093782566 31be6bf988 validate kube-apiserver options
Kubernetes-commit: de406f83cfafc4033a935821a05cd8d8e5f50099
2017-08-29 13:15:23 +00:00
m1093782566 5cfd8381c1 add some checks for fedration-apiserver options
Kubernetes-commit: 172ab88ce848d2c2e6c344535d3011d4ac558a37
2017-08-29 13:15:23 +00:00
Devan Goodwin f2bea1dce9 Fix unused Secret export logic.
The strategy used for the secret store defined custom export logic, and
had accompanying unit tests. However the secret storage did not actually
wire this up by setting an ExportStrategy and thus the code was never
used in the real world.

This change fixes the missing assignment and adds testing at a higher
level to ensure any uses of the generic registry.Store that we expect to
have an ExportStrategy do, and no others.

Several other strategies in the RBAC package also appeared to have
unwired Export logic, however their implementations were all empty
leading me to believe that these are not considered exportable. The
empty methods have now been removed.

Kubernetes-commit: 855a1c17131f92fca6de33279a02eca3893ca374
2017-08-29 13:15:22 +00:00
Shiyang Wang 0fb974784d Add unittests for GenerateLink
Kubernetes-commit: a835d5bdd2747f3e799ab470bd2e2f14ee0fb52a
2017-08-29 13:15:22 +00:00
Cao Shufeng 4ace90bfb4 Return Audit-Id http header for trouble shooting
Kubernetes-commit: 4a1e7ddaa6e0d2e92ce27d9846cfc8407e1fcb60
2017-08-29 13:14:38 +00:00
Shiyang Wang 33ec851d32 Fix NotFound errors do not line up with API endpoint's group version
Kubernetes-commit: 2eda19da7be9b8e0fad294bf902684f23a795dd2
2017-08-29 13:14:38 +00:00
Jordan Liggitt f5f8465637 Fix includeObject parameter parsing
Kubernetes-commit: a7a551148071bb4d87f73c7b6c0f4bd7cc829b22
2017-08-29 13:14:38 +00:00
Chao Xu aea323d020 Let controllers ignore initialization timeout error when creating a pod.
Kubernetes-commit: 97e07e5b52d310ac24d1d46572a4435e694a48f8
2017-08-29 13:14:37 +00:00
Clayton Coleman 0d288373d0 SuggestClientDelay is not about retrying, clarify message and header
SuggestClientDelay is returning whether the server has requested that
the client delay their next action. It is *not* about whether the client
should retry the action. Webhook was using it incorrectly, and the
method is now up to date.

Kubernetes-commit: 04846cc25b862c1eabff03ea0b11cbf2f7fae8e2
2017-08-29 13:14:37 +00:00
Clayton Coleman c685a3bb9c generated: bazel
Kubernetes-commit: 1ebbce2f6cad617a53225478efd4ffde30741475
2017-08-29 13:14:37 +00:00
Clayton Coleman 8ba1feb05c Timeout filter returns 504 and an inconsistent error body
Our rules are that code of the error must match code of the response. We
were also not setting the correct reason. This updates the timeout
filter to be consistent with other clients, without changing the error
code (504 is correct). The new message properly indicates the request
may still be running, which the old message did not do.

Kubernetes-commit: 74f6669b4983a9295dc0549ad15e44d70a18cc8f
2017-08-29 13:14:36 +00:00
Clayton Coleman 19ee3e9e2f Report non-resource URLs in max-in-flight correctly
This potentially has high cardinality, however we can rate limit based
on queries to these endpoints as well.

Kubernetes-commit: 022a5463dcf20126b02e9d9f797ea1e589de1dd1
2017-08-29 13:14:36 +00:00
Clayton Coleman 139dfbd0e1 Update generic errors with the new http package codes
All of these errors are now part of the standard HTTP method. Formalize
those into our error types and remove duplication and unclear
separation.

Kubernetes-commit: d3be1ac92eb644e284915a55fe67942c33f88d4c
2017-08-29 13:14:36 +00:00
deads2k d1afbac635 create default storage selection functions
Kubernetes-commit: 0258d044d3b46f5d2e6bf30658afd4f29e48a1ca
2017-08-29 13:13:51 +00:00
Jeff Grafton 44942b068a Run hack/update-bazel.sh to generate BUILD files
Kubernetes-commit: 3579017b865ddbc5449d6bba87346f086e4b93ff
2017-08-29 13:13:51 +00:00
huangjiuyuan c229fe60e4 fix typo in staging/src/k8s.io/apiserver/pkg/server/config.go
Kubernetes-commit: 1382d2f6e8baa2342e2b117b527d4b74d3b539ee
2017-08-29 13:13:50 +00:00
Dr. Stefan Schimanski 4f763bd819 Add missing ugorji codecs for auth/v1, settings/v1alphav1 and storage/v1
Kubernetes-commit: 51df7cf59de2a7fbaad61e4a1a13598668028de5
2017-08-29 13:13:07 +00:00
deads2k 0ee5e1006e remove dead log handler and increase verbosity
Kubernetes-commit: 9e263af7dacafe590cc585f0c37123310a2a9a4f
2017-08-29 13:13:06 +00:00
deads2k f3aa141adb make admission tolerate object without objectmeta for errors
Kubernetes-commit: 62272a221c5c77cbc2c3e7d0dd56f0064ac2d00c
2017-08-29 13:13:06 +00:00
bjhaid 7dfcb9c56f This adds an etcd health check endpoint to kube-apiserver
addressing https://github.com/kubernetes/kubernetes/issues/48215.

Kubernetes-commit: 47d748c5dc989ea46142569bf42636c622fe128a
2017-08-29 13:13:05 +00:00
deads2k be2b87fdb8 cleanup dead installer code
Kubernetes-commit: c2874941620c264813b6bfa42913f95fd0cc2317
2017-08-29 13:13:05 +00:00
supereagle 2faadf8c85 update generated deepcopy code
Kubernetes-commit: a1c880ece3574a2c7170e0d040489d56dd912e08
2017-08-29 13:13:04 +00:00
mbohlool f26c819f3d Update Bazel
Kubernetes-commit: 1806609596aa05f3ee2d941fd26978451b946383
2017-08-29 13:13:04 +00:00
mbohlool e671fe20d7 Update main repo references to new kube-openapi repo
Kubernetes-commit: 400b77b48f972b1e10854980586559d5852088c7
2017-08-29 13:13:04 +00:00
mbohlool 72a8a7817c Revert "Separate Build and Serving parts of OpenAPI spec handler"
This reverts commit 0a886ffaf8b9de97ef8134a4182b719ba2c6f22f.

Kubernetes-commit: 56fd5853b347e985b4fd02e251ee8da4ae6e35a2
2017-08-29 13:13:04 +00:00
mbohlool 2de4d08b67 Revert "Aggregate OpenAPI specs"
This reverts commit 1a1d9a0394cbdb1d1e2412ae8f0157799eb5329c.

Kubernetes-commit: 88868402b863b1f59a339d3a218bf62c264721ee
2017-08-29 13:13:04 +00:00
Jordan Liggitt d986f949fd Correctly handle empty watch event cache
Kubernetes-commit: 0df769f54061aaa1796e2ef496265b3711e6826a
2017-08-29 13:13:03 +00:00