Commit Graph

71 Commits (cc8afb25fcfbb2a12ef43300db89d724b284e3e3)

Author SHA1 Message Date
jennybuckley 2fdc7e1f35 add test to verify fix 2019-03-08 22:35:33 -08:00
Antoine Pelisse eb904d8fa8 Add "fieldManager" to flag to PATCH/CREATE/UPDATE
And add a corresponding flag in kubectl (for apply), even though the
value is defaulted in kubectl with "kubectl".

The flag is required for Apply patch-type, and optional for other PATCH,
CREATE and UPDATE (in which case we fallback on the user-agent).
2019-03-08 16:03:03 -08:00
Tim Allclair 820a1dc96b Add node.k8s.io/v1beta1 API 2019-03-07 11:57:12 -08:00
Xing Yang bb45b8ee34 Make CSINodeInfo and CSIDriver Core APIs
This PR is the first step to transition CSINodeInfo and CSIDriver
CRD's to in-tree APIs. It adds them to the existing API group
“storage.k8s.io” as core storage APIs.
2019-03-02 12:31:05 -08:00
Kubernetes Prow Robot 1b8c8f1daf
Merge pull request #73831 from jennybuckley/apply-create-service
Honor forceAllowCreate in service registry
2019-02-14 13:59:44 -08:00
Kubernetes Prow Robot d8f0146138
Merge pull request #72214 from caesarxuchao/move-discovery
Move cached discovery clients to their own packages
2019-02-13 23:07:00 -08:00
Chao Xu 5e6fc5dce8 Limit the number of operations in a single json patch to be 10,000 2019-02-13 10:53:32 -08:00
Kubernetes Prow Robot 29403174fb
Merge pull request #73805 from caesarxuchao/resource-size-limit
Adding a limit on the size of request body the apiserver will decode for write operations
2019-02-12 15:10:57 -08:00
Chao Xu 1f2e2e61cf generated 2019-02-12 15:04:57 -08:00
Chao Xu 3f21ca029a changing imports 2019-02-12 10:06:04 -08:00
Kevin Wiesmüller 9082cac482 strip selected fields from managedFields
refactor fieldstrip and update tests

add checks and remove empty fields

shorten test and check for nil manager

fix gofmt

panic on nil manager
2019-02-11 23:10:57 +01:00
Jennifer Buckley 1a5e48e29d Honor forceAllowCreate in service registry 2019-02-11 11:05:30 -08:00
Chao Xu e90409d735 add integration test 2019-02-08 16:15:43 -08:00
Antoine Pelisse b55417f429 Plugin FieldManager in CRD handler, change to API 2019-02-04 13:51:49 -08:00
Antoine Pelisse 0e1d50e70f API Machinery, Kubectl and tests 2019-02-04 13:51:48 -08:00
Jordan Liggitt b64075dbd0 explicitly enable apps/v1beta1, apps/v1beta2, extensions/v1beta1 for print,etcd,storage tests 2019-01-24 21:43:15 -05:00
Jordan Liggitt 4fc63fd014 use apps/v1 APIs in integration tests 2019-01-24 21:34:12 -05:00
Jordan Liggitt dc1fa870bf Remove alpha InitializerConfiguration types, Initializers admission plugin 2019-01-23 11:37:39 -05:00
Jordan Liggitt 0ff455e340 generated files 2018-12-19 11:19:12 -05:00
Weibin Lin 842bd1e1ec update deployment, daemonset, replicaset, statefulset to apps/v1 2018-12-19 10:46:45 -05:00
Jordan Liggitt 4dca07ef7e Fixup incorrect use of DefaultFeatureGate.Set in tests 2018-11-21 11:51:33 -05:00
Davanum Srinivas 954996e231
Move from glog to klog
- Move from the old github.com/golang/glog to k8s.io/klog
- klog as explicit InitFlags() so we add them as necessary
- we update the other repositories that we vendor that made a similar
change from glog to klog
  * github.com/kubernetes/repo-infra
  * k8s.io/gengo/
  * k8s.io/kube-openapi/
  * github.com/google/cadvisor
- Entirely remove all references to glog
- Fix some tests by explicit InitFlags in their init() methods

Change-Id: I92db545ff36fcec83afe98f550c9e630098b3135
2018-11-10 07:50:31 -05:00
Patrick Barker b8e1250487 adds dynamic audit api generated 2018-10-16 13:07:27 +00:00
Patrick Barker 381d0a5d14 adds dynamic audit api 2018-10-16 06:46:34 -06:00
Lucas Käldström 7e10810ed0
Move CloudControllerManagerConfiguration from pkg/apis/componentconfig to cmd/cloud-controller-manager/app/apis/config 2018-09-05 14:02:25 +03:00
Maciej Szulik 5b55e1f8ed
Create cli-runtime staging repository 2018-08-21 17:08:30 +02:00
Antoine Pelisse 03b1e14101 dry-run: Create new options for Update/Create and pass it along 2018-07-12 07:18:37 -07:00
Jeff Grafton 23ceebac22 Run hack/update-bazel.sh 2018-06-22 16:22:57 -07:00
Kubernetes Submit Queue d373eaa4f3
Merge pull request #63724 from ravisantoshgudimetla/priority-e2e-beta
Automatic merge from submit-queue. If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

Modify e2e tests to use priorityClass beta client version & switch priorityClass to beta

**What this PR does / why we need it**:
/cc @bsalamat @aveshagarwal @liggitt 

**Which issue(s) this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close the issue(s) when PR gets merged)*:
Part of #57471

**Special notes for your reviewer**:
Once #57963 merges, this could go in.

**Release note**:

```release-note
Modify e2e tests to use priorityClass beta version & switch priorityClass feature to beta
```
2018-06-04 23:07:34 -07:00
Kubernetes Submit Queue 98bab89fab
Merge pull request #63927 from deads2k/cli-60-factory-prune
Automatic merge from submit-queue (batch tested with PRs 63871, 63927, 63966, 63957, 63844). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

 start splitting polymorphic functions out of the factory

the polymorphic behavior in `kubectl` has been gathered in the factory, but with the new kubeconfigflags and interfaces, it can actually be re-written as a set of helper calls.

These functions are special.  They are indications of areas of flexibility that we eventually need to build generically.  In addition, unit tests make heavy use of injection. For these reasons we aren't inlining them.  Instead we'll extra to a polymorphic package and have them as assignable functions for mocking.

Individual commands should support injection for cleaner mocking and we'll be able to use the package to hunt internal dependencies.

@kubernetes/sig-cli-maintainers 
@soltysh @juanvallejo 

```release-note
NONE
```
2018-05-17 13:40:19 -07:00
Kubernetes Submit Queue b3837d004a
Merge pull request #63469 from wojtek-t/allow_list_and_watch_secrets
Automatic merge from submit-queue. If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

Allow for listing & watching individual secrets from nodes

This PR:
- propagates value of `metadata.name` field from fieldSelector to `name` field in RequestInfo (for list and watch requests)
- authorizes list/watch for requests for single secrets/configmaps coming from nodes

As an example:
```
/api/v1/secrets/namespaces/ns?fieldSelector=metadata.name=foo =>
  requestInfo.Name = "foo",
  requestInfo.Verb = "list"
/api/v1/secrets/namespaces/ns?fieldSelector=metadata.name=foo&watch=true =>
  requestInfo.Name = "foo",
  requestInfo.Verb = "list"
```

```release-note
list/watch API requests with a fieldSelector that specifies `metadata.name` can now be authorized as requests for an individual named resource
```
2018-05-17 07:09:43 -07:00
David Eads 0db40da909 update factory interface to overlap with lower RESTClientGetter 2018-05-17 08:27:53 -04:00
juanvallejo 876629f690 move ConfigFlags to pkg/kubectl/genericclioptions 2018-05-16 11:31:48 -04:00
juanvallejo 57f308ae60 restore old cached client behavior 2018-05-15 10:37:53 -04:00
juanvallejo 4059355743 move cached_discovery to client-go/discovery 2018-05-15 10:20:56 -04:00
wojtekt f344c5c062 Requires single name for list and watch 2018-05-15 14:19:21 +02:00
ravisantoshgudimetla 441b6d4465 Build files generated 2018-05-14 18:15:34 -04:00
ravisantoshgudimetla f3441a5c20 Update e2e to use priorityClass beta 2018-05-14 18:13:41 -04:00
Kubernetes Submit Queue b2fe2a0a6d
Merge pull request #59847 from mtaufen/dkcfg-explicit-keys
Automatic merge from submit-queue (batch tested with PRs 63624, 59847). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

explicit kubelet config key in Node.Spec.ConfigSource.ConfigMap

This makes the Kubelet config key in the ConfigMap an explicit part of
the API, so we can stop using magic key names.
    
As part of this change, we are retiring ConfigMapRef for ConfigMap.


```release-note
You must now specify Node.Spec.ConfigSource.ConfigMap.KubeletConfigKey when using dynamic Kubelet config to tell the Kubelet which key of the ConfigMap identifies its config file.
```
2018-05-09 17:55:13 -07:00
Michael Taufen c41cf55a2c explicit kubelet config key in Node.Spec.ConfigSource.ConfigMap
This makes the Kubelet config key in the ConfigMap an explicit part of
the API, so we can stop using magic key names.

As part of this change, we are retiring ConfigMapRef for ConfigMap.
2018-05-08 15:37:26 -07:00
juanvallejo 3ca222b2d9 wire config flags through factory 2018-05-04 17:02:20 -04:00
David Eads 9a48066749 update restmapping to indicate fully qualified resource 2018-05-01 16:34:49 -04:00
David Eads 1cb797e355 acknowledge that creation of a restmapper can fail and that we cannot have a default 2018-05-01 07:52:51 -04:00
David Eads 5432ef5c45 divide statically known typer from dynamically derive restmapper 2018-04-27 11:15:05 -04:00
Kubernetes Submit Queue 6625d353c7
Merge pull request #63105 from deads2k/api-06-mapper
Automatic merge from submit-queue (batch tested with PRs 62937, 63105, 63031, 63174). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

rest mappings cannot logically be object converters

A `RESTMapping` in the general sense cannot be a `ObjectConverter` since the conversions are compiled, but the RESTMappings are discovered.   This starts isolating the bad assumptions into `kubectl` where they are used and removes the other bad `RESTMapping` use I found in the REST API installer that uses a mapping to determine scopes instead of using the metadata provided during API registration.

intersection of @kubernetes/sig-api-machinery-bugs and @kubernetes/sig-cli-maintainers 
@sttts @pwittrock @soltysh 

```release-note
NONE
```
2018-04-26 16:40:12 -07:00
David Eads 6900f8856f rest mappings cannot logically be object converters 2018-04-26 12:47:25 -04:00
Jordan Liggitt fbd6f38084
collapse patch conflict retry onto GuaranteedUpdate
builds on #62868

1. When the incoming patch specified a resourceVersion that failed as a precondition,
the patch handler would retry uselessly 5 times. This PR collapses onto GuaranteedUpdate,
which immediately stops retrying in that case.

2. When the incoming patch did not specify a resourceVersion, and persisting to etcd
contended with other etcd updates, the retry would try to detect patch conflicts with
deltas from the first 'current object' retrieved from etcd and fail with a conflict error
in that case. Given that the user did not provide any information about the starting version
they expected their patch to apply to, this does not make sense, and results in arbitrary
conflict errors, depending on when the patch was submitted relative to other changes made
to the resource. This PR changes the patch application to be performed on the object retrieved
from etcd identically on every attempt.

fixes #58017
SMP is no longer computed for CRD objects

fixes #42644
No special state is retained on the first attempt, so the patch handler correctly handles
the cached storage optimistically trying with a cached object first
2018-04-25 21:55:13 -04:00
David Eads ee5bc39c4c remove kube-apiserver option that is always force to true 2018-04-02 12:19:34 -04:00
Mengqi Yu ff18af452d fix patch conflict detection in apiserver 2018-03-29 20:05:58 -07:00
Maciej Szulik 1b5f38293f
Add integration test for server side printing 2018-02-28 17:27:48 +01:00