Commit Graph

352 Commits (fd1771e7ae9f6cf118d173f00c215ba570626c3e)

Author SHA1 Message Date
k8s-merge-robot 0ef4c6407b Merge pull request #24902 from cjcullen/webhookAuthn
Automatic merge from submit-queue

Webhook Token Authenticator

Add a webhook token authenticator plugin to allow a remote service to make authentication decisions.
2016-05-11 22:08:58 -07:00
k8s-merge-robot 7e7465e2d4 Merge pull request #25423 from caesarxuchao/dynamic-listoptions
Automatic merge from submit-queue

Let the dynamic client take runtime.Object instead of v1.ListOptions

so that I can pass whatever version of ListOptions to the List/Watch/DeleteCollection methods.

cc @krousey
2016-05-11 10:59:21 -07:00
derekwaynecarr fc3e71894d Improve quota integration test to not use events, reduce number of pods provisioned 2016-05-10 19:50:36 -04:00
Chao Xu c7d111280f let dynamic client take runtime.Object instead of v1.ListOptions 2016-05-10 16:05:31 -07:00
CJ Cullen eb3b0e78b4 Add a webhook token authenticator plugin. 2016-05-10 14:54:35 -07:00
derekwaynecarr e842f12c8c Quota integration test needs to stop controllers 2016-05-10 12:31:35 -04: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 d4b1b6776a Merge pull request #24557 from swagiaal/attacher-interface
Automatic merge from submit-queue

 Abstract node side functionality of attachable plugins

- Create PhysicalAttacher interface to abstract MountDevice and
  WaitForAttach.
- Create PhysicalDetacher interface to abstract WaitForDetach and
  UnmountDevice.
- Expand unit tests to check that Attach, Detach, WaitForAttach,
  WaitForDetach, MountDevice, and UnmountDevice get call where
  appropriet.

Physical{Attacher,Detacher} are working titles suggestions welcome. Some other thoughts:
- NodeSideAttacher or NodeAttacher.
- AttachWatcher
- Call this Attacher and call the Current Attacher CloudAttacher.
- DeviceMounter (although there are way too many things called Mounter right now :/)

This is to address: https://github.com/kubernetes/kubernetes/pull/21709#issuecomment-192035382

@saad-ali
2016-05-08 14:04:44 -07:00
k8s-merge-robot f40fe7173b Merge pull request #24304 from cjcullen/cacheauth
Automatic merge from submit-queue

Support persisting config from kubecfg AuthProvider plugins

Plumbs through an interface to the plugin that can persist a `map[string]string` config for just that plugin. Also adds `config` to the AuthProvider serialization type, and `Login()` to the AuthProvider plugin interface.
Modified the gcp AuthProvider to cache short-term access tokens in the kubecfg file.

Builds on #23066 
@bobbyrullo @deads2k @jlowdermilk @erictune
2016-05-08 13:27:57 -07:00
k8s-merge-robot 8a04506546 Merge pull request #23009 from uluyol/c-pause
Automatic merge from submit-queue

Reimplement 'pause' in C - smaller footprint all around

Statically links against musl. Size of amd64 binary is 3560 bytes.

I couldn't test the arm binary since I have no hardware to test it on, though I assume we want it to work on a raspberry pi.

This PR also adds the gcc5/musl cross compiling image used to build the binaries.

@thockin
2016-05-08 09:29:32 -07:00
CJ Cullen 13a7d92d0f Add a ConfigPersister for AuthProvider plugins in kubectl/clients. 2016-05-07 18:15:18 -07:00
Kevin 82ba4f077e implement inter pod topological affinity and anti-affinity 2016-05-06 06:46:23 +00: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
Muhammed Uluyol f3690e2d5e
build/pause: write in C
Builds statically against glibc. References to the old pause
image have been updated.
2016-05-04 21:45:52 -04:00
Sami Wagiaalla 71e7dba845 Abstract node side functionality of attachable plugins
- Expand Attacher/Detacher interfaces to break up work more
  explicitly.
- Add arguments to all functions to avoid having implementers store
  the data needed for operations.
- Expand unit tests to check that Attach, Detach, WaitForAttach,
  WaitForDetach, MountDevice, and UnmountDevice get call where
  appropriet.
2016-05-04 10:18:39 -04:00
k8s-merge-robot 926ee5b90f Merge pull request #24641 from caesarxuchao/pods-test
Automatic merge from submit-queue

move pods.go to pods_test.go

fix #24635
2016-05-02 13:16:20 -07:00
Clayton Coleman fdb110c859
Fix the rest of the code 2016-04-29 17:12:10 -04:00
k8s-merge-robot 11298d02e0 Merge pull request #24455 from hongchaodeng/fl
Automatic merge from submit-queue

Provide flags to use etcd3 backed storage

ref: #24405

What's in this PR?
- Add a new flag "storage-backend" to choose "etcd2" or "etcd3". By default (i.e. empty), it's "etcd2".
- Take out etcd config code into a standalone package and let it create etcd2 or etcd3 storage backend given user input.
2016-04-29 08:49:04 -07:00
Chao Xu 6ceebe72b9 move pods.go to pods_test.go 2016-04-28 15:39:28 -07:00
k8s-merge-robot d0b887e4e0 Merge pull request #24595 from zhouhaibing089/httpserverclose
Automatic merge from submit-queue

Uncomment the code that caused by #19254

Fix https://github.com/kubernetes/kubernetes/issues/24546.

@lavalamp
2016-04-28 01:41:16 -07:00
Hongchao Deng c0071a1595 add flags to enable etcd3 2016-04-28 09:48:16 +08:00
k8s-merge-robot af71fa72e7 Merge pull request #23574 from deads2k/add-extra
Automatic merge from submit-queue

add user.Info.GetExtra

I found myself wanting this field (or something like it), when trying to plumb the information about which scopes a particular token has.

Only the token authenticators have that information and I don't want tokens to leak past the authenticator.  I thought about extending the `authenticator.Token` interface to include scopes (`[]string`), but that felt a little specific for what I wanted to do.  I came up with this as an alternative.

It allows the token authenticator to fill in the information and authorizers already get handed the `user.Info`.  It means that implementors can choose to tie the layers together if they wish, using whatever data they think is best.  

@kubernetes/kube-iam
2016-04-26 21:14:53 -07:00
deads2k e8ce9852e1 deflake quota master init order 2016-04-26 16:37:56 -04:00
deads2k b4ebfd47c5 add user.Info.GetExtra 2016-04-26 15:08:34 -04:00
deads2k 622932422d enable resource name and service account cases for impersonation 2016-04-26 09:31:43 -04:00
zhouhaibing089 bf1a3f99c0 Uncomment the code that cause by #19254 2016-04-25 23:21:31 +08:00
deads2k d3c6363093 use single writer to improve quota performance 2016-04-25 10:42:26 -04: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
deads2k 3be4b690ea create a negotiating serializer that wraps a single serializer 2016-04-21 07:51:59 -04:00
Prashanth Balasubramanian 0ac10c6cc2 PetSet type, apps apigroup 2016-04-20 18:49:31 -07:00
deads2k f0c33d65b6 start sharing the pod cache and list/watch 2016-04-18 08:51:55 -04: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
Daniel Smith 4c539bf082 Merge pull request #23490 from wojtek-t/remove_set_from_storage_interface
Remove Set() from storage.Interface.
2016-04-13 14:22:05 -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
Saad Ali 48fa998f58 Merge pull request #23717 from mml/until
Comment out racey part of the multi-scheduler test.
2016-04-05 11:34:32 -07:00
Wojciech Tyczynski 53f433f019 Remove Set() from storage.Interface. 2016-04-04 17:54:18 +02: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
Matt Liggett 6ace15eb73 Comment out racey part of the multi-scheduler test.
Should fix #22848.
2016-03-31 16:56:10 -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
Chao Xu 31b425b3a1 add delete precondition 2016-03-25 11:21:39 -07:00
Hongchao Deng 29b46a2395 integration/framework: remove unused NewEtcdStorage()
In integration/, framework.NewEtcdStorage() isn't used by any function.
2016-03-23 16:34:28 -07:00
Tim St. Clair 246b389275 Move test-only volume files to test-only volume package 2016-02-29 14:44:28 -08:00
Kris e664ef922f Move restclient to its own package 2016-02-29 12:05:13 -08:00
Eric Tune 875755f992 Added Selector Generation to Job.
Added selector generation to Job's
strategy.Validate, right before validation.
Can't do in defaulting since UID is not known.

Added a validation to Job to ensure that the generated
labels and selector are correct when generation was requested.
This happens right after generation, but validation is in a better
place to return an error.

Adds "manualSelector" field to batch/v1 Job to control selector generation.
Adds same field to extensions/__internal.  Conversion between those two
is automatic.

Adds "autoSelector" field to extensions/v1beta1 Job.  Used for storing batch/v1 Jobs
    - Default for v1 is to do generation.
    - Default for v1beta1 is to not do it.
    - In both cases, unset == false == do the default thing.

Release notes:
Added batch/v1 group, which contains just Job, and which is the next
version of extensions/v1beta1 Job.

The changes from the previous version are:
- Users no longer need to ensure labels on their pod template are unique to the enclosing
  job (but may add labels as needed for categorization).
- In v1beta1, job.spec.selector was defaulted from pod labels, with the user responsible for uniqueness.
  In v1, a unique label is generated and added to the pod template, and used as the selector (other
  labels added by user stay on pod template, but need not be used by selector).
- a new field called "manualSelector" field exists to control whether the new behavior is used,
  versus a more error-prone but more flexible "manual" (not generated) seletor.  Most users
  will not need to use this field and should leave it unset.

Users who are creating extensions.Job go objects and then posting them using the go client
will see a change in the default behavior.  They need to either stop providing a selector (relying on
selector generation) or else specify "spec.manualSelector" until they are ready to do the former.
2016-02-25 09:28:07 -08:00
mqliang e44e71ca87 make cache size configurable 2016-02-24 22:37:02 +08:00
k8s-merge-robot aee2eb3977 Merge pull request #21434 from erictune/job-ga
Auto commit by PR queue bot
2016-02-22 00:12:54 -08:00
Eric Tune bab89e95ce Fix jobs integration test. 2016-02-19 15:56:40 -08:00