Commit Graph

361 Commits

Author SHA1 Message Date
mbohlool f03a4943d7 Aggregate OpenAPI specs
Kubernetes-commit: 1a1d9a0394cbdb1d1e2412ae8f0157799eb5329c
2017-06-13 20:47:31 +00:00
mbohlool f10f5391f1 Separate Build and Serving parts of OpenAPI spec handler
Kubernetes-commit: 0a886ffaf8b9de97ef8134a4182b719ba2c6f22f
2017-06-13 20:47:31 +00:00
mbohlool bfb371141a Remove unused servePath from GetOperationIDAndTags and GetDefinitionName
Kubernetes-commit: ef8ee84cd07dedf0a441d455f54b55a6468b4b3d
2017-06-13 20:47:31 +00:00
David Ashpole 5b1bafe4d2 update prometheus dependency for staging
Kubernetes-commit: 56f53b92074b5da5de8e2307d791c466ec59bf58
2017-06-13 20:47:31 +00:00
Clayton Coleman 90d1b25a67 Add an e2e test for server side get
Print a better error from the response. Performs validation to ensure it
does not regress in alpha state.

Kubernetes-commit: ce972ca47591cc24a3a24362478dc61ec8e91278
2017-06-13 20:47:31 +00:00
Cao Shufeng 42b5738617 fix invalid status code for hijacker
When using hijacker to take over the connection, the http status code
should be 101 not 200.

PS:
Use "kubectl exec" as an example to review this change.

Kubernetes-commit: 541935b13f87e55199840a73cd3f158e7f0d7b63
2017-06-13 20:47:31 +00:00
Dr. Stefan Schimanski e10c78ea7c apiserver: return BadRequest 400 for invalid query params
Kubernetes-commit: 4846c0d16700bb7cb3c3e02fa3919f2de36d4685
2017-06-13 20:47:31 +00:00
Clayton Coleman 5fa08b8c5e Allow initialization of resources
Add support for creating resources that are not immediately visible to
naive clients, but must first be initialized by one or more privileged
cluster agents. These controllers can mark the object as initialized,
allowing others to see them.

Permission to override initialization defaults or modify an initializing
object is limited per resource to a virtual subresource "RESOURCE/initialize"
via RBAC.

Initialization is currently alpha.

Kubernetes-commit: 331eea67d8000e5c4b37e2234a90903c15881c2f
2017-06-13 20:47:30 +00:00
Cao Shufeng 89caee803d update copyed doc for advanced audit
doc for WithAudit is copyed from WithLegacyAudit, it's out of date.
This change update doc for these two functions.

Kubernetes-commit: 82390af25083031e244107527fe5d9491ade937b
2017-06-13 20:47:30 +00:00
Saksham Sharma 0b1c13686c Add configuration options for encryption providers
Add location transformer, config for transformers

Location transformer helps choose the most specific transformer for
read/write operations depending on the path of resource being accessed.

Configuration allows use of --experimental-encryption-provider-config
to set up encryption providers. Only AEAD is supported at the moment.

Add new files to BUILD, AEAD => k8s-aes-gcm

Use group resources to select encryption provider

Update tests for configuration parsing

Remove location transformer

Allow specifying providers per resource group in configuration

Add IdentityTransformer configuration option

Fix minor issues with initial AEAD implementation

Unified parsing of all configurations

Parse configuration using a union struct

Run configuration parsing in APIserver, refactor parsing

More gdoc, fix minor bugs

Add test coverage for combined transformers

Use table driven tests for encryptionconfig

Kubernetes-commit: 9760d00d08ef0619e30a7b1b90fd290cab960069
2017-06-13 20:47:30 +00:00
Tim St. Clair 91a3addb8d Instrument advanced auditing
Kubernetes-commit: b77c8198f002f9a9c7bdca11d28cac1710bbb185
2017-06-13 20:47:30 +00:00
Chao Xu 3f8656c5e3 generated defaults files
generated bazel

Kubernetes-commit: 902c501595dfd044b3e7062e1518f7f3025751a5
2017-06-13 20:47:30 +00:00
Jordan Liggitt efae6ed84b Pre-generate SNI test certs
Kubernetes-commit: 6554dfc4456869e299b8f6a8f686e8c3cee073d9
2017-06-13 20:47:30 +00:00
Dr. Stefan Schimanski d6f1990c7c apiserver: avoid resolving 'localhost'
The golang stdlib resolve localhost first via the external DNS server,
not via /etc/hosts. If your DNS resolve localhost.<search-domain>, the
API server won't start.

Kubernetes-commit: 63cd572c74a40933d8e6928e084601810b724a81
2017-06-13 20:47:30 +00:00
Cao Shufeng df4801fa4e empty audit policy file is legal configuration
Empty audit policy file or policy file contains only comments means
using default audit level for all requests.

Kubernetes-commit: b6b2a30e830cc362c41ec1014ed9f3ef3535f93b
2017-06-13 20:47:30 +00:00
Dr. Stefan Schimanski c0e7280688 Update bazel
Kubernetes-commit: c7d9a396fdf9ef63272896200ab90afa0581c8f3
2017-06-13 20:47:30 +00:00
Dr. Stefan Schimanski a3e36a6bf1 aggregation: add ExternalName service support
Kubernetes-commit: 8b409e8f777a305454616554c40c905acad596ac
2017-06-13 20:47:30 +00:00
Dr. Stefan Schimanski 6b536dfda4 aggregation: handle ClusterIPNone correctly
Kubernetes-commit: b1f708758c70dfbb3dde4dec7d2f423b7303e661
2017-06-13 20:47:30 +00:00
Dr. Stefan Schimanski 449313536f aggregation: unify mode implementations
Kubernetes-commit: d56759452cccd34c33d987d001092128d0b0f2ff
2017-06-13 20:47:30 +00:00
Dr. Stefan Schimanski 0b2bbf270c aggregation: restore cluster-ip routing tests
Kubernetes-commit: 35335c09e17c3479ff660f93aaaeed041837b247
2017-06-13 20:47:30 +00:00
Eric Chiang be1a712a68 apiserver: add a webhook implementation of the audit backend
Kubernetes-commit: a88e0187f9f6083ed68d18e939a776c44c728e4b
2017-06-13 20:47:30 +00:00
mbohlool 749c4d2fef Make OpenAPI GVK and Action extensions all lower-case
Kubernetes-commit: a3cbfde4b18fdbddf9c94be80acd4f0468a492b7
2017-06-13 20:47:29 +00:00
Wojciech Tyczynski d84eb10096 Optimize selector for single-matching items
Kubernetes-commit: f93a270edcefc3780247ae89eea02cd13b81237b
2017-06-13 20:47:29 +00:00
Clayton Coleman afe291fde8 Refactor printers to support rendering as a Table
Return tables from the server.

Kubernetes-commit: 7ce63eb608cdf95df429d6138ccf8dbf8b47a740
2017-06-13 20:47:29 +00:00
Clayton Coleman e1228ec319 Expose a default Table and partial output via Accept headers
All generic registries expose metadata output, and refactor endpoints to
allow negotiation to handle those responses. Add support for
PartialObjectMetadata being returned for objects as well.

Kubernetes-commit: f203e42cb98ed4bac7ad8ebbed717d3bd42f55b6
2017-06-13 20:47:29 +00:00
p0lyn0mial 42d367c84c register all generic admission plugins when AdmissionOptions are created.
lifecycle plugin: make use of the libraries under k8s.io/client-go/pkg/api and k8s.io/client-go/kubernetes
for the client libraries instead of k8s.io/kubernetes/client/*

move registration to AdmissionOptions

Kubernetes-commit: 77eb2f39500f1fcf66899ea557791e7bca851449
2017-06-13 20:47:29 +00:00
Dr. Stefan Schimanski a177d01bf0 audit: uniform 2 or 3 events for short/long running requests
Kubernetes-commit: 548f7be8fa10b6cbedcf179af088536e76a6c0e3
2017-06-13 20:47:29 +00:00
Dr. Stefan Schimanski 636c532e31 audit: fill in stage
Kubernetes-commit: 1e94185f4425551f1c81ba7bbdbae110bc317abd
2017-06-13 20:47:29 +00:00
Dr. Stefan Schimanski 8b776edc46 audit: fill in sub-resource
Kubernetes-commit: 019003b9266872f912b188708583141a34561007
2017-06-13 20:47:29 +00:00
Dr. Stefan Schimanski f695ec4d4b audit-types: add Panic stage
Kubernetes-commit: 3e9c8aaac689d9b0a11849b09aced266b48b3af8
2017-06-13 20:47:29 +00:00
Tim St. Clair a54d901fa7 Fix audit level none
Kubernetes-commit: 93e1e54e290325d82e41d50f64057323879bdef2
2017-06-13 20:47:29 +00:00
Walter Fender 5428bc23d8 Change to aggregator so it calls a user apiservice via its pod IP.
proxy_handler now uses the endpoint router to map the cluster IP to
appropriate endpoint (Pod) IP for the given resource.
Added code to allow aggregator routing to be optional.
Updated bazel build.
Fixes to cover JLiggit comments.
Added util ResourceLocation method based on Listers.
Fixed issues from verification steps.
Updated to add an interface to obfuscate some of the routing logic.
Collapsed cluster IP resolution in to the aggregator routing
implementation.
Added 2 simple unit tests for ResolveEndpoint

Kubernetes-commit: ad8a83a7c1741efb507d924a17eb809748ee2e06
2017-06-13 20:47:29 +00:00
deads2k 10de73bc53 move CRD behind TPR
Kubernetes-commit: 18177e2bdeafbddeb3d66fec0b8cb88794cd69ff
2017-06-13 20:47:29 +00:00
p0lyn0mial d3a026ac63 move namespace lifecycle plugin to apiserver
Kubernetes-commit: 1a5da9afc804eed6630caa1a17540d1a171b211a
2017-06-13 20:47:29 +00:00
Monis Khan 6794013a5b Panic server on watch errors in test environment
This change makes it so that errors during watch decoding panic the
server if it is in a test environment.  This allows us to catch coder
errors related to storing incompatible types at the same location in
etcd.

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

Kubernetes-commit: a13f026fd012859f04467e6007e2cafe4a788927
2017-06-13 20:47:29 +00:00
Tim St. Clair 8ff532a4cb Implement audit policy logic
Kubernetes-commit: a5de309ee261aea15bb1cc12647b32640c2ac196
2017-06-13 20:47:28 +00:00
Cao Shufeng 7618d3f6da Fix doc about Verb for advanced audit feature
Kubernetes-commit: 312d117f51972fdaaf691100452942c61e163224
2017-06-13 20:47:28 +00:00
Monis Khan 844a0a7812 Require DeleteStrategy for all registry.Store
All registry.Store objects already set a non-nil DeleteStrategy.
This change ensures that all future objects do so as well.

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

Kubernetes-commit: 08fcd79e1f4b9d3efe0a20ea4ce4fdf5ffea0531
2017-06-13 20:47:28 +00:00
Clayton Coleman 2f49bbbf91 Subresources are not included in apiserver prometheus metrics
Subresources are very often completely different code paths and errors
generated on those code paths are important to distinguish.

Kubernetes-commit: ad431c454c1306fdcc2134a3626444984d350f46
2017-06-13 20:47:28 +00:00
Tim St. Clair dac438aa53 Update existing code for audit API changes
Kubernetes-commit: 4c54970d31f0e35f21247514fb946081e6ee0be5
2017-06-13 20:47:28 +00:00
p0lyn0mial ecba80695f remove init blocks from all admission plugins
Kubernetes-commit: c5019bf6962475ffff94ef4993bdc651b79f650c
2017-06-13 20:47:28 +00:00
Tim St. Clair 4fa7bd1587 Generated code
Kubernetes-commit: 7bc9b3004956e84dd29ab66a7fb24e9924d960b7
2017-06-13 20:47:28 +00:00
Tim St. Clair 78e974150d Append X-Forwarded-For in proxy handler
Kubernetes-commit: 6875e953782076237a0c20facc05eeb5d49aa161
2017-06-13 20:47:28 +00:00
Tim St. Clair 2c15f760d9 Update audit API with missing pieces
Kubernetes-commit: 4c98cab4dbccdc6ba005c08bf45c48aeb8e142b9
2017-06-13 20:47:28 +00:00
Dr. Stefan Schimanski 94ea219615 Update bazel
Kubernetes-commit: 9fdc36a47ada0bc34ee53b68edd085d368ed9012
2017-06-13 20:47:28 +00:00
Dr. Stefan Schimanski ec8d130fa7 audit: wire through non-nil context everywhere
Kubernetes-commit: ce942d19c378ecd335e7e158e30cdc184f9d6184
2017-06-13 20:47:28 +00:00
Dr. Stefan Schimanski f7d766d92d audit: add audit event to the context and fill in handlers
Kubernetes-commit: 0b5bcb021932355b3ff7c2b45fb579f4adad84bf
2017-06-13 20:47:28 +00:00
Dr. Stefan Schimanski 6bd3c73150 apiserver: move LongRunningRequestCheck type into endpoints/request
Kubernetes-commit: c1bf6e832e2887ef6cd0e7b7fa97a168fdf474e5
2017-06-13 20:47:27 +00:00
Wojciech Tyczynski 1d0b329280 Pass RequestInfo to GenerateLink
Kubernetes-commit: b4018f7da18f1e61e59c5c48cae4178db2714f85
2017-06-13 20:47:27 +00:00
Clayton Coleman 08910cc6fc Cache watch returns incorrect object on DELETED events
The underlying storage has always returned the old object on watch
delete events when filtering. The cache watcher does not, which means a
downsteam caller gets different behavior.

This fixes the cache watcher to be consistent with our long term
behavior for watch. It may result in a behavior change (the filter
becomes more precise) but this was a regression in behavior.

Kubernetes-commit: e9e69356e4907fa4d0f45ea7e7768357ba71aba9
2017-06-13 20:47:27 +00:00
Wojciech Tyczynski d82b8bc329 Pass Context to GenerateLink
Kubernetes-commit: 25f0fe1adb199697565487b9dfacc4ed8ecdccbb
2017-06-13 20:47:27 +00:00
deads2k 283dd09ef7 tighten and simplify owners in some staging repos
Kubernetes-commit: e7871dbab26459163fd916b83563c4815c7ca43c
2017-06-13 20:47:27 +00:00
Jordan Liggitt 781a66f4fb Return MethodNotSupported when accessing unwatcheable resource with ?watch=true
Kubernetes-commit: da8ae29620811f3dc058e0e665d402a208a1fe6c
2017-06-13 20:47:27 +00:00
Morgan Bauer 5f3d0e25c7 documentation for implementors of RESTCreateStrategy
Kubernetes-commit: 1033c976f0bc5a25ae772fa92c724c5b2caea39e
2017-06-13 20:47:27 +00:00
Clayton Coleman ec289c4e0b Refactor move of client-go/util/clock to apimachinery
Kubernetes-commit: 3e095d12b4f152a45b593927804e2e7b8816239a
2017-05-21 17:28:01 +00:00
Clayton Coleman 01a774be49 Move client-go/util/clock to apimachinery/pkg/util/clock
For reuse

Kubernetes-commit: 8013212db54e95050c622675c6706cce5de42b45
2017-05-21 17:28:01 +00:00
Clayton Coleman 3cbbcf996a Move pkg/util/cache to apimachinery
Will be used by client-go as well

Kubernetes-commit: 529e627c8a4338d48cd2bf658303bac6fef6aaaa
2017-05-21 17:28:01 +00:00
mbohlool 032de8d661 Update bazel
Kubernetes-commit: 4d4abf3ba625488bd8a1b577f15b85db3c0fccac
2017-05-21 17:28:01 +00:00
mbohlool e57f74f648 bugfix: form parameters should have type in OpenAPI spec
Kubernetes-commit: 4b0fbfe1ee23e5498ecc4786d3eeec222710473b
2017-05-21 17:28:01 +00:00
mbohlool d5a4874935 Add protobuf binary version of openapi spec
Kubernetes-commit: 161b480107d94fae0373a2d7221413ec7a816229
2017-05-21 17:28:01 +00:00
yupengzte e701e40544 format re
Signed-off-by: yupengzte <yu.peng36@zte.com.cn>

Kubernetes-commit: 9eee70656fc411029c91edafdbfa327eb0736528
2017-05-20 17:28:13 +00:00
Shyam Jeedigunta b10ed3c56c Copy static variable 'verb' before instrumenting APIserver call to prevent overwriting
Kubernetes-commit: 4d457f55f4b190012440c8a454a2aee338a42c4d
2017-05-19 17:28:21 +00:00
Tim St. Clair b2138bb657 Update generated files
Kubernetes-commit: 6565f68cfab218c1c143edc8028f2bc2183b4150
2017-05-19 17:28:21 +00:00
Tim St. Clair d9744c1278 Add internal audit API types
Kubernetes-commit: cdacc1f6dfe85b99a0e8da7b1081eadeee1258ff
2017-05-19 17:28:21 +00:00
Christoph Blecker 64f3b76260 Update generated files
Kubernetes-commit: 4361a9146e34d74fce9c0193b11b920ffbd0eda8
2017-05-18 17:28:00 +00:00
Dr. Stefan Schimanski 2a11524990 apiserver: no Status in body for http 204
Kubernetes-commit: 8902dae1c4e12a0b5933beb965b148b4150c970d
2017-05-17 17:27:53 +00:00
Clayton Coleman 0bd7c5925e generated: bazel
Kubernetes-commit: 7827899b1dd22074eb230e241f63e69499046fb6
2017-05-17 17:27:53 +00:00
Clayton Coleman 4ec184826d Allow config to accept a Transformer
Kubernetes-commit: 4f27d8feea0cbb7634554ef8af1ad6265738a2a1
2017-05-17 17:27:53 +00:00
Clayton Coleman f27996225a Update etcd3 storage to leverage storage/value interfaces
Adds context argument which must be set for AES GCM authenticated data
to be passed.

Kubernetes-commit: a73990a33f95713f026ee7ae9ae6741255aaf8e4
2017-05-17 17:27:53 +00:00
Clayton Coleman 0fb460572a Add an AEAD encrypting transformer for storing secrets encrypted at rest
Tweak the ValueTransformer interface slightly to support additional
context information (to allow authenticated data to be generated by the
store and passed to the transformer). Add a prefix transformer that
looks for known matching prefixes and uses them. Add an AES GCM
transformer that performs AEAD on the values coming in and out of the
store.

Kubernetes-commit: f418468c87d3071c5d9ed14ce850996c77251080
2017-05-17 17:27:53 +00:00
Cao Shufeng 549abf6787 Fix docs for advanced audit
Kubernetes-commit: 22ba5eb0756d4eb936db3d911be7a79fffbb142e
2017-05-17 17:27:53 +00:00
Tim St. Clair ccd060c4df hack/update-bazel.sh
Kubernetes-commit: 951aa18225ed27d3f6b181c9403e4c4755c30ae1
2017-05-16 17:27:51 +00:00
Tim St. Clair 801bfb00d4 Internal audit API
Kubernetes-commit: ce2d57802f984678bc6ea0143c63602e0a4fb54e
2017-05-16 17:27:51 +00:00
p0lyn0mial b10e93e2f5 bazel update
Kubernetes-commit: 7b0950b298c876668d469d4b5b2ad7a4dcd344fc
2017-05-16 17:27:51 +00:00
nikhiljindal 404503d3e6 Updating generic registry to return UID while deleting the object
Kubernetes-commit: 44fc88cecd5ab175fe7907eb7b975f0a00cb2305
2017-05-16 17:27:51 +00:00
p0lyn0mial ceeef3670c This PR implements AdmissionOptions.ApplyTo
ApplyTo adds the admission chain to the server configuration the method lazily initializes a generic plugin
that is appended to the list of pluginInitializers.

apiserver.Config will hold an instance of SharedInformerFactory to ensure we only have once instance.
The field will be initialized in apisever.SecureServingOptions

Kubernetes-commit: 8cea69aa9812d6627ebdfa4f8b9c1d7624a8f3f5
2017-05-16 17:27:50 +00:00
Chao Xu 3ffeae2ff7 hack/update-bazel.sh
Kubernetes-commit: 14045d253d11c801ad94f0928cb9b13a224ee18f
2017-05-13 17:27:43 +00:00
Chao Xu e46eb82a82 remove invocation of k8s.io/client-go/pkg/api/install
change import of client-go/api/helper to kubernetes/api/helper

remove unnecessary use of client-go/api.registry

change use of client-go/pkg/util to kubernetes/pkg/util

remove dependency on client-go/pkg/apis/extensions

remove unnecessary invocation of k8s.io/client-go/extension/intsall

change use of k8s.io/client-go/pkg/apis/authentication to v1

Kubernetes-commit: c354076aa41e3cf417b291d5f0eff2b70395ac30
2017-05-13 17:27:42 +00:00
deads2k 00b83db9b8 plumb stopch to post start hook index since many of them are starting go funcs
Kubernetes-commit: be39283923650ad96539640ca988fbf194db2be4
2017-05-12 17:30:09 +00:00
Nail Islamov f72563011c Remove mentioning insecure server (which is not supported anymore)
Kubernetes-commit: 6c448319ac4b6e05db87b126db136c609eceec55
2017-05-12 17:30:09 +00:00
Ryan Hitchman 4e16eae82b Escape "<>&" in apiserver errors to avoid triggering vulnerability scanners.
Simple XSS scans might fetch /<script>alert('vulnerable')</script>, and
fail when the response body includes the script tag verbatim, despite
the headers directing the browser to interpret the response as text.

This isn't a real vulnerability, but it's easier to fix this here than
it is to fix the scanners.

Kubernetes-commit: dd4bb1213d8447632fa651195980cbfae2546fb3
2017-05-12 17:30:09 +00:00
deads2k 49f3eb05d8 refactor names for the apiserver handling chain
Kubernetes-commit: 4389f715768661731f0aae7438b2cc8414c9746a
2017-05-12 17:30:09 +00:00
Dr. Stefan Schimanski 234a9303e9 apiserver: tri-state watch cache capacity: off, default, value
Kubernetes-commit: b799e62e1aa82a1f1ff87597e762734cd702cdee
2017-05-12 17:30:09 +00:00
mbohlool 1ce699c0dd Add GroupVersionKind and Action extensions to OpenAPI operations
Kubernetes-commit: fca7003dc5bd122e2123ef260e8612663f74a65b
2017-05-12 17:30:09 +00:00
mbohlool a44fceadf3 Update go-restful dependency
Kubernetes-commit: ea042c6ca0fc7eb8017012ca56d6879b8cf10637
2017-05-12 17:30:08 +00:00
Dr. Stefan Schimanski e640e78936 apiserver: fix --tls-sni-cert-key doc string
Kubernetes-commit: 53365880086f0d0d53002de7ce816284da41f4d0
2017-05-12 17:30:08 +00:00
deads2k 4989e215f2 handle registered third parties
Kubernetes-commit: b512073457d02f326ac39d5774582a92c763c47f
2017-05-12 17:30:08 +00:00
Cao Shufeng ec0ac3b1aa update the doc of function NewPathRecorderMux
Kubernetes-commit: 8b54081939c400d904dbf02fe5143c9dc11ad0ac
2017-05-12 17:30:08 +00:00
deads2k 9250b02a30 remove bearer token from headers after we consume it
Kubernetes-commit: 641b83877a5bd01f87f3e4db53917e854b581be7
2017-05-12 17:30:08 +00:00
mbohlool 0a32c6d3e2 Fix yet another bug in OpenAPI extension generation
Kubernetes-commit: bcd0288e607ee1a1eba3d69dbb7d533f7ef2e4ba
2017-05-05 20:36:47 +00:00
deads2k 585812f439 use our own serve mux that directs how we want
Kubernetes-commit: c837c7fb1a227ef8c772ad15b08ff47593379543
2017-05-04 20:36:37 +00:00
Chao Xu e84e32eaa5 remove references to client-go/pkg/api
Kubernetes-commit: d978f22e04519f6eecfde839110c398dc28d4e8e
2017-05-03 20:36:26 +00:00
deads2k 2b31ba8b9c separate discovery from the apiserver
Kubernetes-commit: e099f5eee60ad32661d28a2eda9d615ac25ba9a4
2017-05-02 20:36:05 +00:00
Dr. Stefan Schimanski 21f84e3d21 apiserver: split endpoint tests from client-go
Kubernetes-commit: 67ca42b2d7e9efb5701618fb3d7faa62c53101c5
2017-05-02 20:36:05 +00:00
xiangpengzhao 1512c30ca6 Delete "hard-coded" default value in flags usage.
Kubernetes-commit: 420caf200cdb1ba41d6af43c5695c29de2082851
2017-04-29 20:35:54 +00:00
Mike Danese aab2f083cf replace CloneTLSConfig() with (*tls.Config).Clone()
Kubernetes-commit: 6c6dbec1e2364b994bdae42828e094b9b540f9b3
2017-04-28 20:36:30 +00:00
Chao Xu 4b7a66ff7e make it possible to move SchemeBuilder with zz_generated.deepcopy.go
Kubernetes-commit: d0b94538b9744d0c06df6ddec2604be168568f9d
2017-04-28 20:36:29 +00:00
Cao Shufeng 51bdb8b7fc Fix PathPrefix for subresources
Kubernetes-commit: dde1221839a340f14924b399012e1aa137367092
2017-04-28 20:36:29 +00:00
deads2k 63fa51033e build external watch event so simple encoders can encode
Kubernetes-commit: f53c9a7e59fe71c038cf727ac2072e5eb9efc6b9
2017-04-28 20:36:29 +00:00
Andy Goldstein 478b3779f2 Add redirect support to SpdyRoundTripper
Add support for following redirects to the SpdyRoundTripper. This is
necessary for clients using it directly (e.g. the apiserver talking
directly to the kubelet) because the CRI streaming server issues a
redirect for streaming requests.

Also extract common logic for following redirects.

Kubernetes-commit: 715d5d9c91c669cf33c0bf9a9c9d352c6c4228a6
2017-04-27 20:37:01 +00:00
Lucas Käldström 1b6b98500b Update protobuf
Kubernetes-commit: f32e6d8a892504835454af4e740da5c9dd17c0a1
2017-04-26 20:36:15 +00:00
Jeremy Whitlock 02115850aa apiserver: add pkg/util/webhook tests
This commit adds tests for pkg/util/webhooks.  The purpose of this was
not only for better code coverage but also to alleviate the need for
consumers to write their own tests for core functionality.

Kubernetes-commit: d15dba7e8bff943d91ba6f58fcb0dfefa357a7f1
2017-04-26 20:36:15 +00:00
deads2k a32f3c1391 fix cluster scoped self-link
Kubernetes-commit: 5746d876e3e4ff41696569d3d8e80ef3979d5186
2017-04-25 20:36:18 +00:00
Anthony Yeh 9841cf11a1 PATCH: Fix erroneous meaningful conflict for numeric values.
The wrong json package was used, resulting in patches being unmarshaled
with numbers as float64 rather than int64.
This in turn confused HasConflicts() which expects numeric types to match.

The end result was false positives of meaningful conflicts, such as:

```
there is a meaningful conflict (firstResourceVersion: "8517",
currentResourceVersion: "8519"):
 diff1={"metadata":{"resourceVersion":"8519"},"spec":{"replicas":0},"status":{"conditions":null,"fullyLabeledReplicas":null,"replicas":0}}
, diff2={"spec":{"replicas":0}}
```

Kubernetes-commit: 1ab6a33db486adc060e1b63eecbdc06aabdde1f6
2017-04-24 20:36:05 +00:00
Monis Khan c4cc6eba8b Default ObjectNameFunc for all REST Stores
All Stores in Kubernetes follow the same logic for determining the name
of an object.  This change makes it so that CompleteWithOptions defaults
the ObjectNameFunc if it is not specified.  Thus a user does not need to
remember to use ObjectMeta.Name.  Using the wrong field as the name can
lead to an object which has a name that bypasses normal object name
validation.

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

Kubernetes-commit: ed35deb69d6fe480adc9178c30b4b9c9e03ca1a9
2017-04-24 20:36:05 +00:00
Cao Shufeng 32da3a6527 refactor code from restful namer
Some codes are replaced because they will never run.

Kubernetes-commit: 939b962975aabcb1587f40b0eb05a30d05168cc4
2017-04-24 20:36:05 +00:00
Cao Shufeng ad7e6c7d72 Update basic audit filter's comment message
Kubernetes-commit: 267288249b0dac2e7ae60bd53bef2afe8a574c28
2017-04-24 20:36:05 +00:00
zhouhaibing089 79f762de77 componentstatus: support client cert health check
etcd has support for client-cert-auth, which can be configured via the flag `--ca-file`,
when that is enabled, all the client requests must present with a client certificate,
however, the current component status check uses a single transport for all of the checks,
this is wrong, the checks should be different for each of different component, and make
each of them use different transport(tls configurations).

Kubernetes-commit: b1040171b68217dccb617de85defa4a5063c638b
2017-04-22 20:36:06 +00:00
p0lyn0mial fdb6bac0df bazel update
Kubernetes-commit: 4a3dcff3bfb49317cee8fb209f6b915fc9e82f1a
2017-04-21 20:35:37 +00:00
p0lyn0mial 3422dafac7 Split out AdmissionOptions
In the long term AdmissionOptions will accepts various dependencies
and spit out AdmissionControl

Kubernetes-commit: de9706bc15ffc3a6a4ef30a00d5c7ea9a8881396
2017-04-21 20:35:37 +00:00
Jordan Liggitt 28f3b58b8b Include system:authenticated group when impersonating
Kubernetes-commit: 86623ed2414d98d6ddc7f28028b88d17d8d8f6ec
2017-04-21 20:35:37 +00:00
Maru Newby 6c1b74403d apiserver: Update genericapiserver to panic on listener error
Previously runServer would try to listen again if a listener error
occurred.  This commit changes the response to a panic to allow a
process manager (systemd/kubelet/etc) to react to the failure.

Kubernetes-commit: 30fb3be4d29179cf551e3030ade37d94d9acc8c9
2017-04-20 20:35:32 +00:00
gmarek 94dd05e8db Fix traces for get requests
Kubernetes-commit: 2a49281b55278bb6932e8862304cff0becaaabf3
2017-04-19 20:35:36 +00:00
xilabao fa06d09988 remove useless check in audit.go
Kubernetes-commit: 4b8abd811dbea5b92c807b64b427eab296567b1d
2017-04-18 20:35:41 +00:00
Christoph Blecker 6d6242ff50 Fix gofmt errors
Kubernetes-commit: 6681835b0c00122a408bd4addd47b02840b6208c
2017-04-18 20:35:41 +00:00
Matt Liggett 3b01985067 Use regexp instead of substring to do search and replace.
enisoc pointed out how ToLower can change (lengthen even!) the length of
a string given arbitrary input.

Kubernetes-commit: fe202fcfc47c7e0fa7d75dc933c9988bb5a53e5e
2017-04-17 20:35:48 +00:00
Mike Danese fda6fe0d70 add testdata for tests in //vendor/k8s.io/...
Kubernetes-commit: 981dd8dc6615f397a9b85c5b965998dc8a0b1338
2017-04-15 20:35:23 +00:00
Mike Danese 2aab760a2a autogenerated
Kubernetes-commit: a05c3c0efdc5822049e34b1a5a1ee259c5fb1906
2017-04-15 20:35:23 +00:00
Matt Liggett 6c87ad1f20 Drop leading path of KUBECTL.EXE if it shows up in User-Agent.
Kubernetes-commit: 4cff7c3d30f4f6b4377d52ec29ec4866f1d28bb9
2017-04-14 20:35:35 +00:00
Jordan Liggitt 662942f8b8 Remove vestiges of defaulting from conversion path, switch to top-level default registration only
Kubernetes-commit: ad116026d9fefe70bbc37f30b9d299ca3af6e43c
2017-04-14 20:35:34 +00:00
deads2k 631ed9acef add deregistration for paths
Kubernetes-commit: cd950364e5259659a771caf5b564de7a8319969b
2017-04-13 20:35:21 +00:00
Dr. Stefan Schimanski 320e34b1d9 pkg/admission: make plugin registry non-global
Kubernetes-commit: 63f547e1b15ed94ef91c69a7e294b3506bd8c918
2017-04-12 20:35:22 +00:00
mbohlool f8217a24e4 Bugfix: OpenAPI generator should pass generate type extensions
Kubernetes-commit: ab5bcf6d2da5fc9cd2374e966f87e20a95d59ed6
2017-04-12 20:35:22 +00:00
Sahdev P. Zala c44e920355 Conversion generated code changes for golint fix
The exported or public functions requires a doc comment to pass golint.
This commit has changes of conversion generated code. The actual doc
changes are added into a separate commit for a clean review.

Kubernetes-commit: 08639023d027e0b69e3b3e5535b04148e084b1bd
2017-04-12 20:35:21 +00:00
Timothy St. Clair 3c7e90361c Update generated due to proto-shift
Kubernetes-commit: 818dd4443dc4760c90edd3aa608265d2573c7cc9
2017-04-12 20:35:21 +00:00
deads2k 540c5cf18e remove dependency on gorestful for rest handling
Kubernetes-commit: c5e2f7c229d8194386de97df7ff6c1b0f71be4c7
2017-04-11 20:35:21 +00:00
deads2k 5e858945af remove objectmetafor
Kubernetes-commit: 04460c8750b9a47672aa708251de0e703cfb7266
2017-04-11 20:35:21 +00:00
deads2k d3546820d7 remove go-restful from namer for rest handling
Kubernetes-commit: da27957390b99c3053922e75f220a8b09c20d7f6
2017-04-10 20:35:11 +00:00
deads2k 01f14fece5 only log stacks on server errors
Kubernetes-commit: b73cddb2278d792c7e07d4e69969df32636ecb6d
2017-04-10 20:35:11 +00:00
Abhishek Dasgupta ba77f4a298 Updated key.pm and cert.pm to remove error in setting up localhostCert pool.
Signed-off-by: Abhishek Dasgupta <a10gupta@linux.vnet.ibm.com>

Kubernetes-commit: 0d42da1b9345e2a649f298ac4f77807143e7befa
2017-04-10 20:35:11 +00:00
Cao Shufeng d08e3dad61 Fix empty RBAC Forbidden message
Kubernetes-commit: 30844541d55b302b06bd85f12d8cf0193e7e4240
2017-04-08 20:35:19 +00:00
deads2k e8e8bbf610 remove ListMetaFor
Kubernetes-commit: 7df37c484dac3438530f2b8cb03cf63f85f2fc29
2017-04-08 20:35:19 +00:00
supereagle 02ca4828ef fix some typos in apiserver
Kubernetes-commit: e35b7d10821bc2c7b4b59e1da3808d46356be69d
2017-04-07 20:35:14 +00:00
Jordan Liggitt fa876f6773 Fix original object mutation on patch retry
Kubernetes-commit: c415e4aeabe5e5514dcdbf2c01c533533c25f4c1
2017-04-06 20:35:16 +00:00
Jordan Liggitt 72998a2b11 Allow disabling specific post-start hooks
Kubernetes-commit: 2c89ff59e22e0d9c825203c4cb94613a3b246d64
2017-03-31 20:37:16 +00:00
Jordan Liggitt b137e92ccf Plumb cipher/tls version serving options
Kubernetes-commit: e156aca4f21331465ba9406be362b9f16b8aba9e
2017-03-31 20:37:15 +00:00
Jordan Liggitt 1d9d56a19e Update godoc for discovery registration
Kubernetes-commit: 85b23bb98a2c80fe631e20785e5e7172cb69e518
2017-03-31 20:37:15 +00:00
Cao Shufeng 1e6400df1f delete etcd socket file for unit tests
This change clean up the environment for etcd3 unit test.
Without this change, "make test" will leave some socket files in
workspace. And these socket files make hack/verify-generated-protobuf.sh
fails.

Kubernetes-commit: 4e9dcf3da536a9b956eb092fe9dbc5b2081cfb9d
2017-03-31 20:37:15 +00:00
p0lyn0mial d711b4901e Admission plugin initializer for the generic API server.
This PR implements a standard admission plugin initializer for the generic API server.
The initializer accepts external clientset, external informers and the authorizer.

Kubernetes-commit: 86e06e2401c3f8d5fc5217858612dcf5db39f27d
2017-03-31 20:37:15 +00:00
deads2k 38fb6e78f7 move legacy insecure options out of the main flow
Kubernetes-commit: cd297546807fc08546905a2b96879d13bcf3a30b
2017-03-31 20:37:15 +00:00
deads2k c2afcd59a6 move insecure options to kubeapiserver
Kubernetes-commit: c2f8ef1b1a4e0e60379b7b7447d59a87b0b0ccf9
2017-03-31 20:37:15 +00:00
deads2k b3af46c0dc wire in aggregation
Kubernetes-commit: 8e26fa25da6d3b1deb333fe2484f794795d1c6b9
2017-03-31 20:37:15 +00:00
deads2k 8c644986dc require codecfactory
Kubernetes-commit: 087a03022106c02f82a497f65b945f3cbab3f643
2017-03-31 20:37:15 +00:00
deads2k 6e5dbf8e26 rewire aggregation handling chain to be normal
Kubernetes-commit: b28966b48ae8e3e10427e0347f33a36053884e0a
2017-03-31 20:37:15 +00:00
deads2k 91f0fac434 force callers to specify the cert dns names
Kubernetes-commit: f31eb0a77f0616a5c4c3477b6d87a5a6726845cc
2017-03-31 20:37:15 +00:00
Andy Goldstein ba9d99da29 React to go-systemd changes
Kubernetes-commit: 085db20a02b222e8a909da02fc5025aeee6ebc57
2017-03-31 20:37:15 +00:00
Jordan Liggitt e314f85f65 Preserve API group order in discovery, prefer extensions over apps
Kubernetes-commit: 707f0fb131b5ff89caae7c45a0e4b59991bd7bc2
2017-03-31 20:37:15 +00:00
Dr. Stefan Schimanski 18fcdcc57b k8s.io/apiserver: make maxRetryWhenPatchConflicts public
Kubernetes-commit: be6be1370b5d1c9b6269c24f663426e3bac93c72
2017-03-31 20:37:15 +00:00
deads2k 43ba6dde7a allow combining API servers
Kubernetes-commit: bccef75d7ae43be333e068748bb6f998dafa6d9d
2017-03-31 20:37:15 +00:00
deads2k 4620c09303 allow fallthrough handling from go-restful routes
Kubernetes-commit: 02efeeaf4087533803299356de1673c8400bc351
2017-03-31 20:37:15 +00:00