Commit Graph

427 Commits

Author SHA1 Message Date
stuart.warren 95846d87d8 commit staging godeps
Kubernetes-commit: af28a43a65ffb617bc1d59a32c3da51145e8c56d
2017-06-13 20:47:32 +00:00
Scott Weiss 8c02c5efc4 add gzip compression to GET and LIST requests
closes #44164

Kubernetes-commit: fc650a54d02f358c7fc65fa25b8312028bd4e944
2017-06-13 20:47:32 +00:00
Christoph Blecker 4587b5cf81 Update docs/ URLs to point to proper locations
Kubernetes-commit: 1bdc7a29aee051ccef4bb21dcd9d43ee47b2a5d8
2017-06-13 20:47:32 +00:00
Fabiano Franz e06c9d2f84 Add group alias names to discovery in registry
Kubernetes-commit: 058f9b4f32f085075f7c2cc6c2caabc80ef41815
2017-06-13 20:47:31 +00:00
Tim St. Clair fe3c2f4191 Generate protobuf for the audit API
Kubernetes-commit: d7d54357205e62a2912ded53f2b307205bfccf2b
2017-06-13 20:47:31 +00:00
Clayton Coleman fcc6b93d70 Load initializers from dynamic config
Handle failure cases on startup gracefully to avoid causing cascading
errors and poor initialization in other components. Initial errors from
config load cause the initializer to pause and hold requests. Return
typed errors to better communicate failures to clients.

Add code to handle two specific cases - admin wants to bypass
initialization defaulting, and mirror pods (which want to bypass
initialization because the kubelet owns their lifecycle).

Kubernetes-commit: 772ab8e1b4163c17d285a2789321762a8f2dc9f3
2017-06-13 20:47:31 +00:00
Jordan Liggitt 8ab96afbb9 Avoid * in filenames
Kubernetes-commit: b5e5e93201ccbc1b4ed1da0378c1f550508bfc4f
2017-06-13 20:47:31 +00:00
mbohlool 0bd6ffe372 Update Bazel
Kubernetes-commit: c2f2a33dc51e33634317dcc125543d3d05dab500
2017-06-13 20:47:31 +00:00
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
Tim Hockin 7a88cacaa2 Update godeps for juju ratelimit
This picked up an unrelated but missing change.

Kubernetes-commit: 3178433b9fb9a75ffe8b53c4c61fa8b71a409c65
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