Commit Graph

71 Commits (e7a13ac2adcfeb6352f895f1e673dddaa3fa496d)

Author SHA1 Message Date
Eric Chiang ef40aa9572 pkg/master: enable certificates API and add rbac authorizer 2016-05-25 14:24:47 -07:00
Jordan Liggitt 29252acd1a Change rest storage Update interface to retrieve updated object
Add OldObject to admission attributes

Update resthandler Patch/Update admission plumbing
2016-05-23 21:09:26 -04:00
CJ Cullen d03dbbcc14 Add LRU Expire cache to webhook authorizer. 2016-05-21 14:50:50 -07:00
Clayton Coleman 633683c08d
kube-apiserver options should be decoupled from impls
A few months ago we refactored options to keep it independent of the
implementations, so that it could be used in CLI tools to validate
config or to generate config, without pulling in the full dependency
tree of the master.  This change restores that by separating
server_run_options.go back to its own package.

Also, options structs should never contain non-serializable types, which
storagebackend.Config was doing with runtime.Codec. Split the codec out.

Fix a typo on the name of the etcd2.go storage backend.

Finally, move DefaultStorageMediaType to server_run_options.
2016-05-18 10:39:21 -04:00
nikhiljindal 5dffe4a969 Moving federation apiserver to use genericapiserver.ServerRunOptions 2016-05-11 23:42:55 -07:00
nikhiljindal 2ffa3b4586 Moving StorageFactory building logic to genericapiserver 2016-05-10 00:57:11 -07:00
k8s-merge-robot f9b8fd0c96 Merge pull request #25011 from zhouhaibing089/addclose
Automatic merge from submit-queue

followup to add http server close method

Fixes #25009, a follow up of https://github.com/kubernetes/kubernetes/pull/24595.
2016-05-09 22:32:02 -07:00
k8s-merge-robot 1a1229e206 Merge pull request #24795 from deads2k/use-all-attributes
Automatic merge from submit-queue

enable resource name and service account cases for impersonation

Adds the resource name check since that attribute was added for authorization.  Also adds a check against a separate resource for service accounts.  Allowing impersonation of service accounts to use a different resource check places control of impersonation with the same users to have the power to get the SA tokens directly.

@kubernetes/kube-iam 
@sgallagher FYI
2016-05-09 04:58:19 -07:00
k8s-merge-robot ab36e0e35e Merge pull request #24710 from smarterclayton/store_proto_in_etcd
Automatic merge from submit-queue

Allow etcd to store protobuf objects

Split storage serialization from client negotiation, and allow API server to take flag controlling serialization.

TODO:

* [x] API server still doesn't start - range allocation object doesn't seem to round trip correctly to etcd
* [ ] Verify that third party resources are ignoring protobuf (add a test)
* [ ] Add integration tests that verify storage is correctly protobuf
* [ ] Add a global default for which storage format to prefer?
2016-05-05 19:00:20 -07:00
Seth Jennings 62d6fea561 fix log message for self-signed cert generation 2016-05-05 16:56:47 -05:00
Clayton Coleman e0ebcf4216
Split the storage and negotiation parts of Codecs
The codec factory should support two distinct interfaces - negotiating
for a serializer with a client, vs reading or writing data to a storage
form (etcd, disk, etc). Make the EncodeForVersion and DecodeToVersion
methods only take Encoder and Decoder, and slight refactoring elsewhere.

In the storage factory, use a content type to control what serializer to
pick, and use the universal deserializer. This ensures that storage can
read JSON (which might be from older objects) while only writing
protobuf. Add exceptions for those resources that may not be able to
write to protobuf (specifically third party resources, but potentially
others in the future).
2016-05-05 12:08:23 -04:00
Clayton Coleman 7e1089bb75
Storage, not Storgage 2016-05-05 12:08:22 -04:00
zhouhaibing089 5923fd352e followup to add http server close method 2016-05-05 12:04:41 +08:00
nikhiljindal 16c0e0a21c Deleting duplicate code from federated-apiserver 2016-05-03 14:04:09 -07:00
Hongchao Deng c0071a1595 add flags to enable etcd3 2016-04-28 09:48:16 +08:00
jianhuiz fdfe42ea44 move install of version handler to genericapiserver 2016-04-27 10:21:08 -07:00
Timothy St. Clair 24b4286960 In preparation for new storage backends renaming generic registry store 2016-04-26 08:32:13 -05:00
deads2k 622932422d enable resource name and service account cases for impersonation 2016-04-26 09:31:43 -04:00
k8s-merge-robot b04f6ffc48 Merge pull request #24646 from nikhiljindal/removeMasterDep
Automatic merge from submit-queue

Move SSHTunneler to genericapiserver and remove federated-apiserver's dependency on pkg/master

cc @jianhuiz
2016-04-25 19:50:37 -07:00
nikhiljindal f9f1e21e08 Moving master.SSHTunneler to genericapiserver 2016-04-22 11:47:05 -07:00
Clayton Coleman 3111985564 Handle streaming serializers more consistently
Add tests to watch behavior in both protocols (http and websocket)
against all 3 media types. Adopt the
`application/vnd.kubernetes.protobuf;stream=watch` media type for the
content that comes back from a watch call so that it can be
distinguished from a Status result.
2016-04-22 11:07:24 -04:00
deads2k 6670b73b18 make storage enablement, serialization, and location orthogonal 2016-04-21 08:18:55 -04:00
nikhiljindal 50a9aceabb Moving more logic to genericapiserver 2016-04-19 00:03:28 -07:00
k8s-merge-robot 62fd60565a Merge pull request #24048 from liggitt/apiserver-defaults
Automatic merge from submit-queue

Use correct defaults when binding apiserver flags

defaults should be set in the struct-creating function, then the current struct field value used as the default when binding the flag
2016-04-17 20:59:38 -07:00
k8s-merge-robot a275a045d1 Merge pull request #23914 from sky-uk/make-etcd-cache-size-configurable
Automatic merge from submit-queue

Make etcd cache size configurable

Instead of the prior 50K limit, allow users to specify a more sensible size for their cluster.

I'm not sure what a sensible default is here. I'm still experimenting on my own clusters. 50 gives me a 270MB max footprint. 50K caused my apiserver to run out of memory as it exceeded >2GB. I believe that number is far too large for most people's use cases.

There are some other fundamental issues that I'm not addressing here:
- Old etcd items are cached and potentially never removed (it stores using modifiedIndex, and doesn't remove the old object when it gets updated)
- Cache isn't LRU, so there's no guarantee the cache remains hot. This makes its performance difficult to predict. More of an issue with a smaller cache size.
- 1.2 etcd entries seem to have a larger memory footprint (I never had an issue in 1.1, even though this cache existed there). I suspect that's due to image lists on the node status.

This is provided as a fix for #23323
2016-04-17 00:06:31 -07:00
deads2k ac4c545b91 add act-as powers 2016-04-14 12:49:10 -04:00
Jordan Liggitt 6c1bcfa28d Use correct defaults when binding apiserver flags 2016-04-14 10:12:51 -04:00
k8s-merge-robot 429228d403 Merge pull request #23953 from nikhiljindal/u8sServer
Automatic merge from submit-queue

moving genericapiserver command line flags to genericapiserver

cc @kubernetes/sig-api-machinery
2016-04-13 23:15:24 -07:00
nikhiljindal 8d7a8c6ae6 moving genericapiserver command line flags to genericapiserver 2016-04-13 13:28:18 -07:00
James Ravn 5bb0595260 Make deserialization cache size configurable
Instead of the default 50K entries, allow users to specify more sensible
sizes for their cluster.
2016-04-12 13:42:27 +01:00
Clayton Coleman 3474911736 Implement a streaming serializer for watch
Changeover watch to use streaming serialization. Properly version the
watch objects. Implement simple framing for JSON and Protobuf (but not
YAML).
2016-04-11 11:22:05 -04:00
k8s-merge-robot 3197f31cc6 Merge pull request #23554 from nikhiljindal/swaggerInRun
Automatic merge from submit-queue

genericapiserver: Moving InstallSwaggerAPI to Run

Ref https://github.com/kubernetes/kubernetes/pull/21190#discussion_r57494673

Moving InstallSwaggerAPI() from InstallAPIGroups() to Run(). This allows the use of InstallAPIGroups() multiple times or using InstallAPIGroup() directly.

cc @jianhuiz @kubernetes/sig-api-machinery
2016-04-02 08:19:25 -07:00
nikhiljindal eeeaa6867a Moving InstallSwaggerAPI to Run 2016-03-28 23:04:14 -07:00
deads2k e8fb35d4d8 refactor resource overrides as positive logic interface 2016-03-28 09:24:49 -04:00
goltermann 32d569d6c7 Fixing all the "composite literal uses unkeyed fields" Vet errors. 2016-03-25 15:25:09 -07:00
k8s-merge-robot 903972e628 Merge pull request #20313 from AdoHe/apiserver_tls_overwrite
Auto commit by PR queue bot
2016-03-25 00:02:24 -07:00
AdoHe 2302c6604f fix apiserver tls overwrite bug 2016-03-24 12:33:37 -04:00
nikhiljindal 1cccfc7074 Disabling swagger ui by default. Adding a flag to enable it 2016-03-23 13:19:22 -07:00
Harry Zhang a4d04095d0 Refactor crlf & crypto 2016-03-21 20:20:05 +08:00
AdoHe 28e1d1af65 reduce component status probe timeout to 20s for quickly timeout 2016-03-14 22:18:55 -04:00
Brian Grant 532ba5a3c6 Merge pull request #21535 from AdoHe/restore_secure_etcd
restore ability to run against secured etcd
2016-03-11 12:14:06 -08:00
AdoHe 7228b9b987 restore ability to run against secured etcd 2016-03-11 11:21:16 -05:00
k8s-merge-robot d81d823ca5 Merge pull request #22393 from eparis/blunderbuss
Auto commit by PR queue bot
2016-03-02 18:51:56 -08:00
Eric Paris 5e5a823294 Move blunderbuss assignees into tree 2016-03-02 20:46:32 -05:00
Madhusudan.C.S 8b7e56d242 Allow cross-group subresource registrations in the APIInstaller.
This allows subresources which belong to different API groups than
their parents to be registered in the APIInstaller and REST handlers
installed for them. The specific changes that makes this possible
are:

1. Allow subresource overrides to be specified while registering an
   API group.
2. Use those overrides in the APIInstaller while validating the
   resource/subresource group version to allow subresources which
   belong to a different group to be registered if they have an
   override specified.
3. Use the RESTMapper supplied in the override to map the REST paths
   to the correct subresource storage object, i.e. correct group
   version kinds.
2016-03-02 10:57:30 -08:00
deads2k 357aebc89c update long running to handle recommend watch mechanism 2016-02-24 10:20:25 -05:00
nikhiljindal 20ce4aed0e Adding hostname to groups discovery information 2016-02-18 11:58:11 -08:00
k8s-merge-robot 17325ef6ef Merge pull request #20501 from piosz/hpa-ga
Auto commit by PR queue bot
2016-02-18 06:52:39 -08:00
Daniel Smith 74400c33ae changes for cross-group moves 2016-02-15 21:39:00 +01:00
Rudi Chiarito b46321c19f Fix Sprintf formatting in log message 2016-02-15 15:30:49 -05:00