Compare commits

...

52 Commits

Author SHA1 Message Date
Kubernetes Publisher
23781f4d66 Fix Godeps.json to point to kubernetes-1.10.0 tags 2018-03-27 02:48:35 +00:00
Kubernetes Publisher
2fce0bafad Merge pull request #59495 from ericchiang/client-auth-exec
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>.

 client-go: add an exec-based client auth provider

Updates https://github.com/kubernetes/features/issues/541
Implements https://github.com/kubernetes/community/pull/1503
Closes https://github.com/kubernetes/kubernetes/issues/57164

```release-note
client-go: alpha support for exec-based credential providers
```

/sig auth
/kind feature

Kubernetes-commit: cb9d6b51556a1677f262e35e4aded0051c424818
2018-03-02 19:02:35 +00:00
Kubernetes Publisher
5d7eb0287c sync: update godeps 2018-03-01 01:24:53 +00:00
Kubernetes Publisher
123c6c6318 Merge remote-tracking branch 'origin/master' into release-1.10
Kubernetes-commit: 4b339de4dcf5d7afd2435093c3b6a8a3437d5f74
2018-02-28 21:24:35 +00:00
Kubernetes Publisher
d6de2be5f2 Merge pull request #60291 from hzxuzhonghu/cloud-cm-use-healthz
Automatic merge from submit-queue (batch tested with PRs 60376, 55584, 60358, 54631, 60291). 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>.

cloud-controller-manager get /healthz to wait for apiserver to be healthy

**What this PR does / why we need it**:

currently cloud-controller-manager use `restclient.ServerAPIVersions()` to wait for apiserver to be healthy.
Remove ServerAPIVersions and make use of /healthz as all other components do.

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

**Special notes for your reviewer**:

**Release note**:

```release-note
NONE
```

Kubernetes-commit: b8c5bcf48a8852ba7f859a06ce35eac3d8fffafa
2018-02-28 21:24:19 +00:00
Kubernetes Publisher
0caa5e78a2 Merge remote-tracking branch 'origin/master' into release-1.10
Kubernetes-commit: 6ee902eee1aa2022d41afd82c510b0d5e7de2d77
2018-02-28 05:25:34 +00:00
Kubernetes Publisher
f29a60b40a Merge pull request #60446 from cblecker/no-dep-reviewer
Automatic merge from submit-queue (batch tested with PRs 59365, 60446, 60448, 55019, 60431). 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>.

Remove dep-reviewers

**What this PR does / why we need it**:
The dep-reviewers group seems to get assigned PRs early the the review process. However, most code changes should be reviewed in the importing part of the code base first, and then assigned to an approver after.

By removing the reviewers group, the approvers plugin will still suggest assigning to an approver, but won't assign for review when the PR is initially opened.

**Release note**:

```release-note
NONE
```

Kubernetes-commit: 724a2f968c6981efc9f5a85e4ad60f56e1c0902f
2018-02-28 05:25:17 +00:00
Kubernetes Publisher
b16d5cf21d Merge pull request #59674 from jennybuckley/codegen
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>.

code-gen: output golint compliant 'Generated by' comment

New PR instead of reopening #58115 because /reopen did not work.
This won't be ready to merge until the upstream https://github.com/kubernetes/gengo/pull/94 merges. Once that merges, the second commit will be changed to godep-save.sh and update-staging-godeps.sh, and the last commit will be changed to update-all.sh

The failing test is due to the upstream changes not being merged yet

```devel-release-note
Go code generated by the code generators will now have a comment which allows them to be easily identified by golint
```

Fixes #56489

Kubernetes-commit: 1eb1c00c44f8f597b9b23a05cd0a8da205c87f8a
2018-02-28 05:25:17 +00:00
Kubernetes Publisher
ce807c7acd Merge pull request #59725 from wgliang/master.vet
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>.

fix some syntax related errors

**What this PR does / why we need it**:
fix some syntax related errors

**Special notes for your reviewer**:
None

```release-note
NONE
```

Kubernetes-commit: effa021db773fb95c9e8fbe5646d01784bb2f7f6
2018-02-28 05:25:16 +00:00
Kubernetes Publisher
a359b79224 Merge pull request #59293 from roycaihw/openapi_endpoint
Automatic merge from submit-queue (batch tested with PRs 60011, 59256, 59293, 60328, 60367). 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>.

Serve OpenAPI spec with single /openapi/v2 endpoint

**What this PR does / why we need it**:
We are deprecating format-separated endpoints (`/swagger.json`, `/swagger-2.0.0.json`, `/swagger-2.0.0.pb-v1`, `/swagger-2.0.0.pb-v1.gz`) for OpenAPI spec, and switching to a single `/openapi/v2` endpoint in Kubernetes 1.10. The design doc and deprecation process are tracked at: https://docs.google.com/document/d/19lEqE9lc4yHJ3WJAJxS_G7TcORIJXGHyq3wpwcH28nU

Requested format is specified by setting HTTP headers

header | possible values
-- | --
Accept | `application/json`, `application/com.github.proto-openapi.spec.v2@v1.0+protobuf`
Accept-Encoding | `gzip`

This PR changes dynamic_client (and kubectl as a result) to use the new endpoint. The old endpoints will remain in 1.10 and 1.11, and get removed in 1.12.

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

**Special notes for your reviewer**:

**Release note**:

```release-note
action required: Deprecate format-separated endpoints for OpenAPI spec. Please use single `/openapi/v2` endpoint instead.
```

/sig api-machinery

Kubernetes-commit: d6153194d929ad6c036d5bbbf67a6f892e75feb5
2018-02-28 05:25:16 +00:00
Kubernetes Publisher
06ac755d8d Merge pull request #59958 from ixdy/bzl-boilerplate
Automatic merge from submit-queue (batch tested with PRs 50724, 59025, 59710, 59404, 59958). 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>.

Require boilerplate on Bazel Skylark source files

**What this PR does / why we need it**: `.bzl` files are also source code, so they should probably have the boilerplate text too.

**Release note**:

```release-note
NONE
```

Kubernetes-commit: 5e10b13f7e745f767a1e2f4b261d84a67e318048
2018-02-28 05:24:59 +00:00
Kubernetes Publisher
ab10f7aa22 Merge remote-tracking branch 'origin/master' into release-1.10. Deleting CHANGELOG-1.9.md
Kubernetes-commit: b6e2633cd09cc4c622d1644c191c7d6672fd35e7
2018-02-27 01:26:21 +00:00
Kubernetes Publisher
78a1c5c6e7 Merge pull request #59159 from roycaihw/dfifo
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>.

Add comments about potential race in delta fifo

**What this PR does / why we need it**:

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

**Special notes for your reviewer**:

**Release note**:

```release-note
NONE
```

/sig api-machinery

Kubernetes-commit: 0394ffba6de860ece173a9a485d3518d3a8d37f2
2018-02-27 01:26:03 +00:00
jennybuckley
a3e9cfc0b8 Run hack/update-all.sh
Kubernetes-commit: c8dacd8e631f59ef158c79156d77a99fd2a632cc
2018-02-26 17:16:14 -08:00
Christoph Blecker
77e73af6e6 Remove dep-reviewers
Kubernetes-commit: b97b9530f08d40a4346ea328d8a1047822fb92b7
2018-02-26 11:11:15 -08:00
Kubernetes Publisher
1bc18ec750 Merge remote-tracking branch 'origin/master' into release-1.10
Kubernetes-commit: 8d6416d0e6674f36d90274c98dda83ed7ae873de
2018-02-24 15:22:52 -05:00
Kubernetes Publisher
87e5a5fc06 Merge pull request #59966 from liggitt/self-signed-ca
Automatic merge from submit-queue (batch tested with PRs 59463, 59719, 60181, 58283, 59966). 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>.

Split self-signed cert and CA

The key usage limitation of TLS Server Auth makes the cert invalid as a CA.

This switches to generate a single-use CA, uses it to sign the serving cert, then appends the CA to the cert bytes.

* allows a client to continue to reference the cert file as a trust bundle, which now contains a valid CA cert
* continues to keep the generated certificate valid only for serving purposes

Fixes https://github.com/kubernetes/client-go/issues/311

```release-note
NONE
```

Kubernetes-commit: 5d144152e4d07f3752c05ec24e31d840adcd90a2
2018-02-27 01:26:03 +00:00
Kubernetes Publisher
c6810f466e Merge pull request #55168 from nikhita/customresources-subresources
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>.

apiextensions: add subresources for custom resources

Fixes #38113
Fixes #58778

**Related**:
- Proposal: https://github.com/kubernetes/community/pull/913
- For custom resources to work with `kubectl scale`: https://github.com/kubernetes/kubernetes/pull/58283

**Add types**:

- Add `CustomResourceSubResources` type to CRD.
    - Fix proto generation for `CustomResourceSubResourceStatus`: https://github.com/kubernetes/kubernetes/pull/55970.
- Add feature gate for `CustomResourceSubResources`.
    - Update CRD strategy: if feature gate is disabled, this feature is dropped (i.e. set to `nil`).
- Add validation for `CustomResourceSubResources`:
    - `SpecReplicasPath` should not be empty and should be a valid json path under `.spec`. If there is no value under the given path in the CustomResource, the `/scale` subresource will return an error on GET.
    - `StatusReplicasPath` should not be empty and should be a valid json path under `.status`. If there is no value under the given path in the CustomResource, the status replica value in the /scale subresource will default to 0.
    - If present, `LabelSelectorPath` should be a valid json path. If there is no value under `LabelSelectorPath` in the CustomResource, the status label selector value in the `/scale` subresource will default to the empty string.
    - `ScaleGroupVersion` should be `autoscaling/v1`.
    - If `CustomResourceSubResources` is enabled, only `properties` is allowed under the root schema for CRD validation.

**Add status and scale subresources**:

- Use helper functions from `apimachinery/pkg/apis/meta/v1/unstructured/helpers.go`.
    - Improve error handling: https://github.com/kubernetes/kubernetes/pull/56563, https://github.com/kubernetes/kubernetes/pull/58215.
- Introduce Registry interface for storage.
- Update storage:
    - Introduce `CustomResourceStorage` which acts as storage for the custom resource and its status and scale subresources. Note: storage for status and scale is only enabled when the feature gate is enabled _and_ the respective fields are enabled in the CRD.
    - Introduce `StatusREST` and its `New()`, `Get()` and `Update()` methods.
    - Introduce `ScaleREST` and its `New()`, `Get()` and `Update()` methods.
        - Get and Update use the json paths from the CRD and use it to return an `autoscaling/v1.Scale` object.
- Update strategy:
    - In `PrepareForCreate`,
         - Clear `.status`.
         - Set `.metadata.generation` = 1
    - In `PrepareForUpdate`,
         - Do not update `.status`.
             - If both the old and new objects have `.status` and it is changed, set it back to its old value.
             - If the old object has a `.status` but the new object doesn't, set it to the old value.
             - If old object did not have a `.status` but the new object does, delete it.
         - Increment generation if spec changes i.e. in the following cases:
             - If both the old and new objects had `.spec` and it changed.
             - If the old object did not have `.spec` but the new object does.
             - If the old object had a `.spec` but the new object doesn't.
     - In `Validate` and `ValidateUpdate`,
        - ensure that values at `specReplicasPath` and `statusReplicasPath` are >=0 and < maxInt32.
        - make sure there are no errors in getting the value at all the paths.
    - Introduce `statusStrategy` with its methods.
        - In `PrepareForUpdate`:
            - Do not update `.spec`.
                - If both the old and new objects have `.spec` and it is changed, set it back to its old value.
                - If the old object has a `.spec` but the new object doesn't, set it to the old value.
                - If old object did not have a `.spec` but the new object does, delete it.
             - Do not update `.metadata`.
        - In `ValidateStatusUpdate`:
            - For CRD validation, validate only under `.status`.
            - Validate value at `statusReplicasPath` as above. If `labelSelectorPath` is a path under `.status`, then validate it as well.
- Plug into the custom resource handler:
    - Store all three storage - customResource, status and scale in `crdInfo`.
    - Use the storage as per the subresource in the request.
    - Use the validator as per the subresource (for status, only use the schema for `status`, if present).
    - Serve the endpoint as per the subresource - see `serveResource`, `serveStatus` and `serveScale`.
- Update discovery by adding the `/status` and `/scale` resources, if enabled.

**Add tests**:

- Add unit tests in `etcd_test.go`.
- Add integration tests.
    - In `subresources_test.go`, use the [polymporphic scale client](https://github.com/kubernetes/kubernetes/tree/master/staging/src/k8s.io/client-go/scale) to get and update `Scale`.
    -  Add a test to check everything works fine with yaml in `yaml_test.go`.

**Release note**:

```release-note
`/status` and `/scale` subresources are added for custom resources.
```

Kubernetes-commit: 6e856480c05424b5cd2cfcbec692a801b856ccb2
2018-02-27 01:26:02 +00:00
hzxuzhonghu
d8f55ede17 run update bazel
Kubernetes-commit: 8908c5d0a0538b473cbf1cd546967411da74ab75
2018-02-23 17:28:49 +08:00
hzxuzhonghu
d1f2f22256 remove unused rest/versions.go
Kubernetes-commit: 817176572dd86bc8d2c7f8741cd76ca32d685e86
2018-02-26 15:58:36 +08:00
Kubernetes Publisher
ef0fd623c9 Merge remote-tracking branch 'origin/master' into release-1.10
Kubernetes-commit: d2ac3fd7ebd2bd4b505e5cab7f2d04f047d90ba8
2018-02-22 14:58:50 -05:00
Kubernetes Publisher
00b7839442 Merge pull request #60055 from mattkelly/fix-configmaplock-typos
Automatic merge from submit-queue (batch tested with PRs 60158, 60156, 58111, 57583, 60055). 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>.

Fix typos in configmaplock

**What this PR does / why we need it**:
Fixes some typos in `configmaplock.go`. Seems to be a combination of copy/paste errors from `endpointslock.go` and find/replace gone wrong.

**Release note**:
```release-note
NONE
```

Kubernetes-commit: 6be660a81eaa98ccae39ca4c968ea616b2adbecd
2018-02-27 01:26:01 +00:00
Kubernetes Publisher
f29d72208b Merge pull request #58111 from mikedanese/id-registry
Automatic merge from submit-queue (batch tested with PRs 60158, 60156, 58111, 57583, 60055). 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>.

add support for /token subresource in serviceaccount registry

I'm planning on implementing the registry bits (this) in one PR and followup with an authenticator that supports new id tokens.

https://github.com/kubernetes/kubernetes/issues/58790

@kubernetes/sig-auth-pr-reviews

```release-note
NONE
```

Kubernetes-commit: 8b94ae8ca8d06bfc3c9b2f73daaca69840f86d2f
2018-02-27 01:26:00 +00:00
Kubernetes Publisher
52a78f7b0f Merge pull request #59316 from smarterclayton/terminate_early
Automatic merge from submit-queue (batch tested with PRs 58716, 59977, 59316, 59884, 60117). 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>.

Cap how long the kubelet waits when it has no client cert

If we go a certain amount of time without being able to create a client
cert and we have no current client cert from the store, exit. This
prevents a corrupted local copy of the cert from leaving the Kubelet in a
zombie state forever. Exiting allows a config loop outside the Kubelet
to clean up the file or the bootstrap client cert to get another client
cert.

Five minutes is a totally arbitary timeout, judged to give enough time for really slow static pods to boot.

@mikedanese

```release-note
Set an upper bound (5 minutes) on how long the Kubelet will wait before exiting when the client cert from disk is missing or invalid. This prevents the Kubelet from waiting forever without attempting to bootstrap a new client credentials.
```

Kubernetes-commit: 2bbaf430d8a22287ae6a85c6c0b5736a80269e81
2018-02-27 01:26:00 +00:00
Kubernetes Publisher
5d7928c541 Merge pull request #58544 from ericchiang/oidc-v2
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>.

oidc authentication: switch to v2 of coreos/go-oidc

Switch to v2 of [coreos/go-oidc](https://github.com/coreos/go-oidc), which uses square/go-jose to verify tokens and supports more signing algorithms.

Most of this PR removes dependencies used by the older version of github.com/coreos/go-oidc, and updates vendor files.

This PR has been tested against tokens issued by Okta, Google, and CoreOS's dex.

Closes https://github.com/kubernetes/kubernetes/issues/57806

```release-note
kube-apiserver: the OpenID Connect authenticator can now verify ID Tokens signed with JOSE algorithms other than RS256 through the --oidc-signing-algs flag.
kube-apiserver: the OpenID Connect authenticator no longer accepts tokens from the Google v3 token APIs, users must switch to the "https://www.googleapis.com/oauth2/v4/token" endpoint.
```

cc @rithujohn191 @liggitt
cc @kubernetes/sig-auth-pr-reviews

Kubernetes-commit: cdbc4fbe20c94694bc25910d54a7de52a98b6650
2018-02-27 01:25:59 +00:00
Kubernetes Publisher
25505bfbc7 Merge pull request #54933 from php-coder/psp_introduce_new_api_group
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>.

Introduce PodSecurityPolicy in the policy/v1beta1 API group

Types/constants are completely the same as in `extensions/v1beta1` except that they are located outside of the `extensions` API group.

**What this PR does / why we need it**:
This is the first step for migrating PSP-related stuff away of `extensions` group. See #43214 for more information.

Also it related to https://github.com/kubernetes/features/issues/5

**Example**:
```console
$ cat restricted2.yaml
apiVersion: policy/v1beta1
kind: PodSecurityPolicy
metadata:
  name: restricted2
...
$ kubectl create -f restricted.yaml
podsecuritypolicy "restricted2" created
$ kubectl get psp restricted2 -o yaml
apiVersion: extensions/v1beta1
kind: PodSecurityPolicy
...
```

**Release note**:
```release-note
The `PodSecurityPolicy` API has been moved to the `policy/v1beta1` API group. The `PodSecurityPolicy` API in the `extensions/v1beta1` API group is deprecated and will be removed in a future release.
```

Kubernetes-commit: f8298702ffe644a4f021e23a616ad6a8790a5537
2018-02-27 01:25:38 +00:00
Kubernetes Publisher
f8c68b19c4 Merge pull request #59821 from dims/update-latest-gophercloud-1.10
Automatic merge from submit-queue (batch tested with PRs 59634, 59821, 57850, 59916, 60032). 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>.

Update to latest gophercloud/gophercloud for 1.10

**What this PR does / why we need it**:

Looks like we end up with just the following change:
https://github.com/gophercloud/gophercloud/pull/730
(Prevent Recursive BuildRequestBody)

The full set of changes between the old and new SHA are here:
8e59687aa4...6da026c32e

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

**Special notes for your reviewer**:

**Release note**:

```release-note
NONE
```

Kubernetes-commit: 77254255223774543cdf9941cd7c32f99da11261
2018-02-27 01:25:38 +00:00
Kubernetes Publisher
c4b9f086d0 Merge pull request #59587 from cblecker/cblecker-vendor
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>.

Add cblecker to vendor OWNERS

**What this PR does / why we need it**:
Adds myself to vendor OWNERS. I can help approve dep bumps of existing deps, and refer to Tim and new deps for license review.

**Release note**:
```release-note
NONE
```

/assign thockin

Kubernetes-commit: 852e7f7bfa43d1427706c59453e39f2de12a4f32
2018-02-27 01:25:21 +00:00
Kubernetes Publisher
89fa90e86a Merge pull request #59842 from ixdy/update-rules_go-02-2018
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>.

 Update bazelbuild/rules_go, kubernetes/repo-infra, and gazelle dependencies

**What this PR does / why we need it**: updates our bazelbuild/rules_go dependency in order to bump everything to go1.9.4. I'm separating this effort into two separate PRs, since updating rules_go requires a large cleanup, removing an attribute from most build rules.

**Release note**:

```release-note
NONE
```

Kubernetes-commit: 96ec3187180b9c1d722756b3ea0984ebe65424dc
2018-02-27 01:25:20 +00:00
Kubernetes Publisher
da7a6fee9d Merge pull request #59353 from juanvallejo/jvallejo/update-name-printer-output
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>.

update name printer output to kind.group/name

**Release note**:
```release-note
NONE
```

Followup to https://github.com/kubernetes/kubernetes/pull/59227

Updates output via `-o name` to be pipeable.

cc @deads2k

Kubernetes-commit: bb500a73b618b40e8e5ef0955861183ebd325259
2018-02-27 01:25:19 +00:00
Kubernetes Publisher
0ff29eaf80 Merge pull request #56717 from roycaihw/dynamic_subresource
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>.

Dynamic client supports subresources

**What this PR does / why we need it**:
Allows `resource.name` to be a subresource which contains `"/"` in db2977fb11/staging/src/k8s.io/client-go/dynamic/client.go (L143)

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

**Special notes for your reviewer**:
The change is backward compatible.

**Release note**:

```release-note
NONE
```

/sig api-machinery

Kubernetes-commit: f33e0b33f49676bb0be6a410ab98eecd3602bd0a
2018-02-27 01:25:19 +00:00
Haowei Cai
7e3e837ff5 Discovery client and aggregator downloader use /openapi/v2 endpoint
Kubernetes-commit: 17917940b5dfc516834980f0493cc241bcac4ab2
2018-02-20 09:22:40 -08:00
Haowei Cai
ad9b46a1e9 Bump kube-openapi to add new openapi endpoint
Kubernetes-commit: 8b38e080c4ddd3e1416a5fc4d45a3e4d2dbe1033
2018-02-20 09:21:41 -08:00
Matt Kelly
f9840ecc2e Fix typos in configmaplock
Kubernetes-commit: b2342ae9d942af2f6bf572aeb71cce6acaac218b
2018-02-19 14:40:11 -05:00
Jeff Grafton
abbedebe40 Autogenerated: hack/update-bazel.sh
Kubernetes-commit: ef56a8d6bb3800ab7803713eafc4191e8202ad6e
2018-02-16 13:43:01 -08:00
Slava Semushin
7c9b0dc097 Update generated files.
Kubernetes-commit: 29514f28834c3e462432afe293bd19bab8746783
2018-02-16 17:23:26 +01:00
Kubernetes Publisher
50a0fcce59 Merge pull request #59825 from dcbw/remove-deltafifo-compressor
Automatic merge from submit-queue (batch tested with PRs 59832, 59825). 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>.

Remove unused DeltaFIFO compressor argument to NewDeltaFIFO

Nobody uses it; the one or two older users from 1.4/1.5 timeframe
were removed for 1.6.  It's also poorly understood and the sole
example is in the testcases, and it's pretty incomplete.

If anyone really wants compression, they can revert this PR.

Earlier pull was https://github.com/kubernetes/kubernetes/pull/43475 which was blocked on some downstream users, which have now removed their usage of the compressor.

@ncdc @deads2k

```release-note
NONE
```

Kubernetes-commit: 5f7b530d87a426348ac7c8fa27f8079fd9445d70
2018-02-16 13:21:03 +00:00
Jordan Liggitt
16d72c3ed9 Split self-signed cert and CA
Kubernetes-commit: 3d3cde45b73ec31c81fadbfd494387d141858a40
2018-02-15 23:30:17 -05:00
Jeff Grafton
6e2b4fff22 Require boilerplate on Bazel Skylark source files
Kubernetes-commit: 72a59f5826b8decf4395cd0b79896b4785a7bee8
2018-02-15 18:02:24 -08:00
Christoph Blecker
afa6acd011 Re-add OWNERS files to Godeps/vendor dirs
Kubernetes-commit: 6fb2304f2a6da44e42985ed662d5f7f56215eec6
2018-02-15 13:31:02 -08:00
Davanum Srinivas
cfa927c19f Update to latest gophercloud/gophercloud
Looks like we end up with the following changes:
1a43566306cb8cebad8cae85c67b15b3c254f316 - Prevent Recursive BuildRequestBody
debc1adf8e41fb5c5b7e2021a1be0b4d0c78318a - Networking v2: Create Floating IP with Subnet
1db95d798aa72ec12a6e60e40749cea56073d2fb - Compute v2: Add unit tests for Ephemeral field
0b8b348f5ad19aa4513ad9f8ad24f766a6623ad9 - compute: flavors: add Ephemeral attribute
8a6dfa8264e8b64523272c7a205e5f08bb6c118f - Compute v2: Flavor Access Remove (#688)
35ab3f13f69349f99ba8b9c9c36a7031ae2963dd - Flavor Extra Spec Update
800a4c0d57fbe8403b0bb6f13a8340c8fc990ad5 - Flavor Extra Spec Delete
be3fd7845c1928cbc5bbe289f2e39f5dec2e7278 - Flavor Extra Specs Create
c2cafb46bb409768f420742757949fd05fb1d704 - Flavor Extra Specs: List / Get (#686)
7b1b87753c31d4900587840774a019bbfa770698 - Compute v2: Flavor Access Add (#687)
1a43566306cb8cebad8cae85c67b15b3c254f316 - Prevent Recursive BuildRequestBody
debc1adf8e41fb5c5b7e2021a1be0b4d0c78318a - Networking v2: Create Floating IP with Subnet

The full set of changes between the old and new SHA are here:
8e59687aa4...6da026c32e

Kubernetes-commit: 375360312aa70595c3174f81f3320eb511aaf8f1
2018-02-13 13:29:15 -05:00
Wang Guoliang
e5261fe39c fix some syntax related errors
Kubernetes-commit: d065157dd74fa02eec87f5849528b079a3736c3d
2018-02-11 19:50:49 +08:00
Haowei Cai
5c4221286f Dynamic client support subresource create/get/update/patch verbs
Kubernetes-commit: e10cdb3b0f42bafcdf1d1a95e6fb14cbfe2b4ab7
2018-02-07 16:04:02 -08:00
Eric Chiang
d22e08fbc4 generated
Kubernetes-commit: 01801ae13a86c10cd343c329f5224ab47272f826
2018-02-07 15:48:46 -08:00
Eric Chiang
a3bffe5d33 client-go: add an exec-based client auth provider
Kubernetes-commit: 6463e9efd9ba552e60d2555a3e6526ef90196473
2018-02-07 15:43:12 -08:00
Mike Danese
5f742c0476 add support for /token subresource in serviceaccount registry
Kubernetes-commit: 8ad1c6655bde4ca8d61c3574980cffce5ee937a5
2018-02-05 20:53:25 -08:00
juanvallejo
05d8c8911c update -o name format to kind.group/name
Kubernetes-commit: 765f9ec68b0d0759e64d474f9dfb3bf22c24cadf
2018-02-05 11:21:00 -05:00
Clayton Coleman
f48569b364 When using the bootstrap cert, update the store
Otherwise, the certificate store will return nil the first time a store
cert is accessed. When background rotation is being used, prevents the
client from being nil.

Kubernetes-commit: b81f4745546340f08abd3f877c585aac9581d0f0
2018-02-04 01:24:56 -05:00
Haowei Cai
ed49bb3574 Add comments about potential race in delta fifo.
Kubernetes-commit: 8b03e77aec6fe9496edf51ba11d580c460e8fb5e
2018-01-31 15:22:09 -08:00
Eric Chiang
dea0758d47 bump(github.com/coreos/go-oidc): 065b426bd41667456c1a924468f507673629c46b
Kubernetes-commit: 379af0405c318de9a009e339ee03a1d8ab0cde2f
2018-01-19 11:18:27 -08:00
Eric Chiang
1a16aa9e1a oidc authentication: generate testdata and delete old test packages
Kubernetes-commit: 2d8cb9c4ad9a792ccfe5066f55e725ca50c77330
2018-01-19 11:15:38 -08:00
Nikhita Raghunath
5ab5f98777 add subresources for custom resources
Kubernetes-commit: 6fbe8157e39f6bd7ad885a8a6f8614e2fe45dc5e
2017-11-06 18:19:15 +05:30
1365 changed files with 3689 additions and 277328 deletions

216
Godeps/Godeps.json generated
View File

@@ -30,38 +30,6 @@
"ImportPath": "github.com/Azure/go-autorest/autorest/date",
"Rev": "d4e6b95c12a08b4de2d48b45d5b4d594e5d32fab"
},
{
"ImportPath": "github.com/coreos/go-oidc/http",
"Rev": "a4973d9a4225417aecf5d450a9522f00c1f7130f"
},
{
"ImportPath": "github.com/coreos/go-oidc/jose",
"Rev": "a4973d9a4225417aecf5d450a9522f00c1f7130f"
},
{
"ImportPath": "github.com/coreos/go-oidc/key",
"Rev": "a4973d9a4225417aecf5d450a9522f00c1f7130f"
},
{
"ImportPath": "github.com/coreos/go-oidc/oauth2",
"Rev": "a4973d9a4225417aecf5d450a9522f00c1f7130f"
},
{
"ImportPath": "github.com/coreos/go-oidc/oidc",
"Rev": "a4973d9a4225417aecf5d450a9522f00c1f7130f"
},
{
"ImportPath": "github.com/coreos/pkg/health",
"Rev": "fa29b1d70f0beaddd4c7021607cc3c3be8ce94b8"
},
{
"ImportPath": "github.com/coreos/pkg/httputil",
"Rev": "fa29b1d70f0beaddd4c7021607cc3c3be8ce94b8"
},
{
"ImportPath": "github.com/coreos/pkg/timeutil",
"Rev": "fa29b1d70f0beaddd4c7021607cc3c3be8ce94b8"
},
{
"ImportPath": "github.com/davecgh/go-spew/spew",
"Rev": "782f4967f2dc4564575ca782fe2d04090b5faca8"
@@ -136,31 +104,31 @@
},
{
"ImportPath": "github.com/gophercloud/gophercloud",
"Rev": "8e59687aa4b27ab22a0bf3295f1e165ff7bd5f97"
"Rev": "6da026c32e2d622cc242d32984259c77237aefe1"
},
{
"ImportPath": "github.com/gophercloud/gophercloud/openstack",
"Rev": "8e59687aa4b27ab22a0bf3295f1e165ff7bd5f97"
"Rev": "6da026c32e2d622cc242d32984259c77237aefe1"
},
{
"ImportPath": "github.com/gophercloud/gophercloud/openstack/identity/v2/tenants",
"Rev": "8e59687aa4b27ab22a0bf3295f1e165ff7bd5f97"
"Rev": "6da026c32e2d622cc242d32984259c77237aefe1"
},
{
"ImportPath": "github.com/gophercloud/gophercloud/openstack/identity/v2/tokens",
"Rev": "8e59687aa4b27ab22a0bf3295f1e165ff7bd5f97"
"Rev": "6da026c32e2d622cc242d32984259c77237aefe1"
},
{
"ImportPath": "github.com/gophercloud/gophercloud/openstack/identity/v3/tokens",
"Rev": "8e59687aa4b27ab22a0bf3295f1e165ff7bd5f97"
"Rev": "6da026c32e2d622cc242d32984259c77237aefe1"
},
{
"ImportPath": "github.com/gophercloud/gophercloud/openstack/utils",
"Rev": "8e59687aa4b27ab22a0bf3295f1e165ff7bd5f97"
"Rev": "6da026c32e2d622cc242d32984259c77237aefe1"
},
{
"ImportPath": "github.com/gophercloud/gophercloud/pagination",
"Rev": "8e59687aa4b27ab22a0bf3295f1e165ff7bd5f97"
"Rev": "6da026c32e2d622cc242d32984259c77237aefe1"
},
{
"ImportPath": "github.com/hashicorp/golang-lru",
@@ -178,10 +146,6 @@
"ImportPath": "github.com/imdario/mergo",
"Rev": "6633656539c1639d9d78127b7d47c622b5d7b6dc"
},
{
"ImportPath": "github.com/jonboulle/clockwork",
"Rev": "72f9bd7c4e0c2a40055ab3d0f09654f730cce982"
},
{
"ImportPath": "github.com/json-iterator/go",
"Rev": "13f86432b882000a51c6e610c620974462691a97"
@@ -284,335 +248,335 @@
},
{
"ImportPath": "k8s.io/api/admissionregistration/v1alpha1",
"Rev": "0d0b2f481328d8bae556061a08a02175054059f4"
"Rev": "73d903622b7391f3312dcbac6483fed484e185f8"
},
{
"ImportPath": "k8s.io/api/admissionregistration/v1beta1",
"Rev": "0d0b2f481328d8bae556061a08a02175054059f4"
"Rev": "73d903622b7391f3312dcbac6483fed484e185f8"
},
{
"ImportPath": "k8s.io/api/apps/v1",
"Rev": "0d0b2f481328d8bae556061a08a02175054059f4"
"Rev": "73d903622b7391f3312dcbac6483fed484e185f8"
},
{
"ImportPath": "k8s.io/api/apps/v1beta1",
"Rev": "0d0b2f481328d8bae556061a08a02175054059f4"
"Rev": "73d903622b7391f3312dcbac6483fed484e185f8"
},
{
"ImportPath": "k8s.io/api/apps/v1beta2",
"Rev": "0d0b2f481328d8bae556061a08a02175054059f4"
"Rev": "73d903622b7391f3312dcbac6483fed484e185f8"
},
{
"ImportPath": "k8s.io/api/authentication/v1",
"Rev": "0d0b2f481328d8bae556061a08a02175054059f4"
"Rev": "73d903622b7391f3312dcbac6483fed484e185f8"
},
{
"ImportPath": "k8s.io/api/authentication/v1beta1",
"Rev": "0d0b2f481328d8bae556061a08a02175054059f4"
"Rev": "73d903622b7391f3312dcbac6483fed484e185f8"
},
{
"ImportPath": "k8s.io/api/authorization/v1",
"Rev": "0d0b2f481328d8bae556061a08a02175054059f4"
"Rev": "73d903622b7391f3312dcbac6483fed484e185f8"
},
{
"ImportPath": "k8s.io/api/authorization/v1beta1",
"Rev": "0d0b2f481328d8bae556061a08a02175054059f4"
"Rev": "73d903622b7391f3312dcbac6483fed484e185f8"
},
{
"ImportPath": "k8s.io/api/autoscaling/v1",
"Rev": "0d0b2f481328d8bae556061a08a02175054059f4"
"Rev": "73d903622b7391f3312dcbac6483fed484e185f8"
},
{
"ImportPath": "k8s.io/api/autoscaling/v2beta1",
"Rev": "0d0b2f481328d8bae556061a08a02175054059f4"
"Rev": "73d903622b7391f3312dcbac6483fed484e185f8"
},
{
"ImportPath": "k8s.io/api/batch/v1",
"Rev": "0d0b2f481328d8bae556061a08a02175054059f4"
"Rev": "73d903622b7391f3312dcbac6483fed484e185f8"
},
{
"ImportPath": "k8s.io/api/batch/v1beta1",
"Rev": "0d0b2f481328d8bae556061a08a02175054059f4"
"Rev": "73d903622b7391f3312dcbac6483fed484e185f8"
},
{
"ImportPath": "k8s.io/api/batch/v2alpha1",
"Rev": "0d0b2f481328d8bae556061a08a02175054059f4"
"Rev": "73d903622b7391f3312dcbac6483fed484e185f8"
},
{
"ImportPath": "k8s.io/api/certificates/v1beta1",
"Rev": "0d0b2f481328d8bae556061a08a02175054059f4"
"Rev": "73d903622b7391f3312dcbac6483fed484e185f8"
},
{
"ImportPath": "k8s.io/api/core/v1",
"Rev": "0d0b2f481328d8bae556061a08a02175054059f4"
"Rev": "73d903622b7391f3312dcbac6483fed484e185f8"
},
{
"ImportPath": "k8s.io/api/events/v1beta1",
"Rev": "0d0b2f481328d8bae556061a08a02175054059f4"
"Rev": "73d903622b7391f3312dcbac6483fed484e185f8"
},
{
"ImportPath": "k8s.io/api/extensions/v1beta1",
"Rev": "0d0b2f481328d8bae556061a08a02175054059f4"
"Rev": "73d903622b7391f3312dcbac6483fed484e185f8"
},
{
"ImportPath": "k8s.io/api/imagepolicy/v1alpha1",
"Rev": "0d0b2f481328d8bae556061a08a02175054059f4"
"Rev": "73d903622b7391f3312dcbac6483fed484e185f8"
},
{
"ImportPath": "k8s.io/api/networking/v1",
"Rev": "0d0b2f481328d8bae556061a08a02175054059f4"
"Rev": "73d903622b7391f3312dcbac6483fed484e185f8"
},
{
"ImportPath": "k8s.io/api/policy/v1beta1",
"Rev": "0d0b2f481328d8bae556061a08a02175054059f4"
"Rev": "73d903622b7391f3312dcbac6483fed484e185f8"
},
{
"ImportPath": "k8s.io/api/rbac/v1",
"Rev": "0d0b2f481328d8bae556061a08a02175054059f4"
"Rev": "73d903622b7391f3312dcbac6483fed484e185f8"
},
{
"ImportPath": "k8s.io/api/rbac/v1alpha1",
"Rev": "0d0b2f481328d8bae556061a08a02175054059f4"
"Rev": "73d903622b7391f3312dcbac6483fed484e185f8"
},
{
"ImportPath": "k8s.io/api/rbac/v1beta1",
"Rev": "0d0b2f481328d8bae556061a08a02175054059f4"
"Rev": "73d903622b7391f3312dcbac6483fed484e185f8"
},
{
"ImportPath": "k8s.io/api/scheduling/v1alpha1",
"Rev": "0d0b2f481328d8bae556061a08a02175054059f4"
"Rev": "73d903622b7391f3312dcbac6483fed484e185f8"
},
{
"ImportPath": "k8s.io/api/settings/v1alpha1",
"Rev": "0d0b2f481328d8bae556061a08a02175054059f4"
"Rev": "73d903622b7391f3312dcbac6483fed484e185f8"
},
{
"ImportPath": "k8s.io/api/storage/v1",
"Rev": "0d0b2f481328d8bae556061a08a02175054059f4"
"Rev": "73d903622b7391f3312dcbac6483fed484e185f8"
},
{
"ImportPath": "k8s.io/api/storage/v1alpha1",
"Rev": "0d0b2f481328d8bae556061a08a02175054059f4"
"Rev": "73d903622b7391f3312dcbac6483fed484e185f8"
},
{
"ImportPath": "k8s.io/api/storage/v1beta1",
"Rev": "0d0b2f481328d8bae556061a08a02175054059f4"
"Rev": "73d903622b7391f3312dcbac6483fed484e185f8"
},
{
"ImportPath": "k8s.io/apimachinery/pkg/api/equality",
"Rev": "da3b134bab57ebf23dedfec7e0004614dd4b5a24"
"Rev": "302974c03f7e50f16561ba237db776ab93594ef6"
},
{
"ImportPath": "k8s.io/apimachinery/pkg/api/errors",
"Rev": "da3b134bab57ebf23dedfec7e0004614dd4b5a24"
"Rev": "302974c03f7e50f16561ba237db776ab93594ef6"
},
{
"ImportPath": "k8s.io/apimachinery/pkg/api/meta",
"Rev": "da3b134bab57ebf23dedfec7e0004614dd4b5a24"
"Rev": "302974c03f7e50f16561ba237db776ab93594ef6"
},
{
"ImportPath": "k8s.io/apimachinery/pkg/api/resource",
"Rev": "da3b134bab57ebf23dedfec7e0004614dd4b5a24"
"Rev": "302974c03f7e50f16561ba237db776ab93594ef6"
},
{
"ImportPath": "k8s.io/apimachinery/pkg/api/testing",
"Rev": "da3b134bab57ebf23dedfec7e0004614dd4b5a24"
"Rev": "302974c03f7e50f16561ba237db776ab93594ef6"
},
{
"ImportPath": "k8s.io/apimachinery/pkg/api/testing/fuzzer",
"Rev": "da3b134bab57ebf23dedfec7e0004614dd4b5a24"
"Rev": "302974c03f7e50f16561ba237db776ab93594ef6"
},
{
"ImportPath": "k8s.io/apimachinery/pkg/api/testing/roundtrip",
"Rev": "da3b134bab57ebf23dedfec7e0004614dd4b5a24"
"Rev": "302974c03f7e50f16561ba237db776ab93594ef6"
},
{
"ImportPath": "k8s.io/apimachinery/pkg/apimachinery",
"Rev": "da3b134bab57ebf23dedfec7e0004614dd4b5a24"
"Rev": "302974c03f7e50f16561ba237db776ab93594ef6"
},
{
"ImportPath": "k8s.io/apimachinery/pkg/apimachinery/announced",
"Rev": "da3b134bab57ebf23dedfec7e0004614dd4b5a24"
"Rev": "302974c03f7e50f16561ba237db776ab93594ef6"
},
{
"ImportPath": "k8s.io/apimachinery/pkg/apimachinery/registered",
"Rev": "da3b134bab57ebf23dedfec7e0004614dd4b5a24"
"Rev": "302974c03f7e50f16561ba237db776ab93594ef6"
},
{
"ImportPath": "k8s.io/apimachinery/pkg/apis/meta/fuzzer",
"Rev": "da3b134bab57ebf23dedfec7e0004614dd4b5a24"
"Rev": "302974c03f7e50f16561ba237db776ab93594ef6"
},
{
"ImportPath": "k8s.io/apimachinery/pkg/apis/meta/internalversion",
"Rev": "da3b134bab57ebf23dedfec7e0004614dd4b5a24"
"Rev": "302974c03f7e50f16561ba237db776ab93594ef6"
},
{
"ImportPath": "k8s.io/apimachinery/pkg/apis/meta/v1",
"Rev": "da3b134bab57ebf23dedfec7e0004614dd4b5a24"
"Rev": "302974c03f7e50f16561ba237db776ab93594ef6"
},
{
"ImportPath": "k8s.io/apimachinery/pkg/apis/meta/v1/unstructured",
"Rev": "da3b134bab57ebf23dedfec7e0004614dd4b5a24"
"Rev": "302974c03f7e50f16561ba237db776ab93594ef6"
},
{
"ImportPath": "k8s.io/apimachinery/pkg/apis/meta/v1beta1",
"Rev": "da3b134bab57ebf23dedfec7e0004614dd4b5a24"
"Rev": "302974c03f7e50f16561ba237db776ab93594ef6"
},
{
"ImportPath": "k8s.io/apimachinery/pkg/conversion",
"Rev": "da3b134bab57ebf23dedfec7e0004614dd4b5a24"
"Rev": "302974c03f7e50f16561ba237db776ab93594ef6"
},
{
"ImportPath": "k8s.io/apimachinery/pkg/conversion/queryparams",
"Rev": "da3b134bab57ebf23dedfec7e0004614dd4b5a24"
"Rev": "302974c03f7e50f16561ba237db776ab93594ef6"
},
{
"ImportPath": "k8s.io/apimachinery/pkg/fields",
"Rev": "da3b134bab57ebf23dedfec7e0004614dd4b5a24"
"Rev": "302974c03f7e50f16561ba237db776ab93594ef6"
},
{
"ImportPath": "k8s.io/apimachinery/pkg/labels",
"Rev": "da3b134bab57ebf23dedfec7e0004614dd4b5a24"
"Rev": "302974c03f7e50f16561ba237db776ab93594ef6"
},
{
"ImportPath": "k8s.io/apimachinery/pkg/runtime",
"Rev": "da3b134bab57ebf23dedfec7e0004614dd4b5a24"
"Rev": "302974c03f7e50f16561ba237db776ab93594ef6"
},
{
"ImportPath": "k8s.io/apimachinery/pkg/runtime/schema",
"Rev": "da3b134bab57ebf23dedfec7e0004614dd4b5a24"
"Rev": "302974c03f7e50f16561ba237db776ab93594ef6"
},
{
"ImportPath": "k8s.io/apimachinery/pkg/runtime/serializer",
"Rev": "da3b134bab57ebf23dedfec7e0004614dd4b5a24"
"Rev": "302974c03f7e50f16561ba237db776ab93594ef6"
},
{
"ImportPath": "k8s.io/apimachinery/pkg/runtime/serializer/json",
"Rev": "da3b134bab57ebf23dedfec7e0004614dd4b5a24"
"Rev": "302974c03f7e50f16561ba237db776ab93594ef6"
},
{
"ImportPath": "k8s.io/apimachinery/pkg/runtime/serializer/protobuf",
"Rev": "da3b134bab57ebf23dedfec7e0004614dd4b5a24"
"Rev": "302974c03f7e50f16561ba237db776ab93594ef6"
},
{
"ImportPath": "k8s.io/apimachinery/pkg/runtime/serializer/recognizer",
"Rev": "da3b134bab57ebf23dedfec7e0004614dd4b5a24"
"Rev": "302974c03f7e50f16561ba237db776ab93594ef6"
},
{
"ImportPath": "k8s.io/apimachinery/pkg/runtime/serializer/streaming",
"Rev": "da3b134bab57ebf23dedfec7e0004614dd4b5a24"
"Rev": "302974c03f7e50f16561ba237db776ab93594ef6"
},
{
"ImportPath": "k8s.io/apimachinery/pkg/runtime/serializer/versioning",
"Rev": "da3b134bab57ebf23dedfec7e0004614dd4b5a24"
"Rev": "302974c03f7e50f16561ba237db776ab93594ef6"
},
{
"ImportPath": "k8s.io/apimachinery/pkg/selection",
"Rev": "da3b134bab57ebf23dedfec7e0004614dd4b5a24"
"Rev": "302974c03f7e50f16561ba237db776ab93594ef6"
},
{
"ImportPath": "k8s.io/apimachinery/pkg/types",
"Rev": "da3b134bab57ebf23dedfec7e0004614dd4b5a24"
"Rev": "302974c03f7e50f16561ba237db776ab93594ef6"
},
{
"ImportPath": "k8s.io/apimachinery/pkg/util/cache",
"Rev": "da3b134bab57ebf23dedfec7e0004614dd4b5a24"
"Rev": "302974c03f7e50f16561ba237db776ab93594ef6"
},
{
"ImportPath": "k8s.io/apimachinery/pkg/util/clock",
"Rev": "da3b134bab57ebf23dedfec7e0004614dd4b5a24"
"Rev": "302974c03f7e50f16561ba237db776ab93594ef6"
},
{
"ImportPath": "k8s.io/apimachinery/pkg/util/diff",
"Rev": "da3b134bab57ebf23dedfec7e0004614dd4b5a24"
"Rev": "302974c03f7e50f16561ba237db776ab93594ef6"
},
{
"ImportPath": "k8s.io/apimachinery/pkg/util/errors",
"Rev": "da3b134bab57ebf23dedfec7e0004614dd4b5a24"
"Rev": "302974c03f7e50f16561ba237db776ab93594ef6"
},
{
"ImportPath": "k8s.io/apimachinery/pkg/util/framer",
"Rev": "da3b134bab57ebf23dedfec7e0004614dd4b5a24"
"Rev": "302974c03f7e50f16561ba237db776ab93594ef6"
},
{
"ImportPath": "k8s.io/apimachinery/pkg/util/httpstream",
"Rev": "da3b134bab57ebf23dedfec7e0004614dd4b5a24"
"Rev": "302974c03f7e50f16561ba237db776ab93594ef6"
},
{
"ImportPath": "k8s.io/apimachinery/pkg/util/httpstream/spdy",
"Rev": "da3b134bab57ebf23dedfec7e0004614dd4b5a24"
"Rev": "302974c03f7e50f16561ba237db776ab93594ef6"
},
{
"ImportPath": "k8s.io/apimachinery/pkg/util/intstr",
"Rev": "da3b134bab57ebf23dedfec7e0004614dd4b5a24"
"Rev": "302974c03f7e50f16561ba237db776ab93594ef6"
},
{
"ImportPath": "k8s.io/apimachinery/pkg/util/json",
"Rev": "da3b134bab57ebf23dedfec7e0004614dd4b5a24"
"Rev": "302974c03f7e50f16561ba237db776ab93594ef6"
},
{
"ImportPath": "k8s.io/apimachinery/pkg/util/mergepatch",
"Rev": "da3b134bab57ebf23dedfec7e0004614dd4b5a24"
"Rev": "302974c03f7e50f16561ba237db776ab93594ef6"
},
{
"ImportPath": "k8s.io/apimachinery/pkg/util/net",
"Rev": "da3b134bab57ebf23dedfec7e0004614dd4b5a24"
"Rev": "302974c03f7e50f16561ba237db776ab93594ef6"
},
{
"ImportPath": "k8s.io/apimachinery/pkg/util/remotecommand",
"Rev": "da3b134bab57ebf23dedfec7e0004614dd4b5a24"
"Rev": "302974c03f7e50f16561ba237db776ab93594ef6"
},
{
"ImportPath": "k8s.io/apimachinery/pkg/util/runtime",
"Rev": "da3b134bab57ebf23dedfec7e0004614dd4b5a24"
"Rev": "302974c03f7e50f16561ba237db776ab93594ef6"
},
{
"ImportPath": "k8s.io/apimachinery/pkg/util/sets",
"Rev": "da3b134bab57ebf23dedfec7e0004614dd4b5a24"
"Rev": "302974c03f7e50f16561ba237db776ab93594ef6"
},
{
"ImportPath": "k8s.io/apimachinery/pkg/util/strategicpatch",
"Rev": "da3b134bab57ebf23dedfec7e0004614dd4b5a24"
"Rev": "302974c03f7e50f16561ba237db776ab93594ef6"
},
{
"ImportPath": "k8s.io/apimachinery/pkg/util/validation",
"Rev": "da3b134bab57ebf23dedfec7e0004614dd4b5a24"
"Rev": "302974c03f7e50f16561ba237db776ab93594ef6"
},
{
"ImportPath": "k8s.io/apimachinery/pkg/util/validation/field",
"Rev": "da3b134bab57ebf23dedfec7e0004614dd4b5a24"
"Rev": "302974c03f7e50f16561ba237db776ab93594ef6"
},
{
"ImportPath": "k8s.io/apimachinery/pkg/util/wait",
"Rev": "da3b134bab57ebf23dedfec7e0004614dd4b5a24"
"Rev": "302974c03f7e50f16561ba237db776ab93594ef6"
},
{
"ImportPath": "k8s.io/apimachinery/pkg/util/yaml",
"Rev": "da3b134bab57ebf23dedfec7e0004614dd4b5a24"
"Rev": "302974c03f7e50f16561ba237db776ab93594ef6"
},
{
"ImportPath": "k8s.io/apimachinery/pkg/version",
"Rev": "da3b134bab57ebf23dedfec7e0004614dd4b5a24"
"Rev": "302974c03f7e50f16561ba237db776ab93594ef6"
},
{
"ImportPath": "k8s.io/apimachinery/pkg/watch",
"Rev": "da3b134bab57ebf23dedfec7e0004614dd4b5a24"
"Rev": "302974c03f7e50f16561ba237db776ab93594ef6"
},
{
"ImportPath": "k8s.io/apimachinery/third_party/forked/golang/json",
"Rev": "da3b134bab57ebf23dedfec7e0004614dd4b5a24"
"Rev": "302974c03f7e50f16561ba237db776ab93594ef6"
},
{
"ImportPath": "k8s.io/apimachinery/third_party/forked/golang/netutil",
"Rev": "da3b134bab57ebf23dedfec7e0004614dd4b5a24"
"Rev": "302974c03f7e50f16561ba237db776ab93594ef6"
},
{
"ImportPath": "k8s.io/apimachinery/third_party/forked/golang/reflect",
"Rev": "da3b134bab57ebf23dedfec7e0004614dd4b5a24"
"Rev": "302974c03f7e50f16561ba237db776ab93594ef6"
},
{
"ImportPath": "k8s.io/kube-openapi/pkg/util/proto",
"Rev": "a07b7bbb58e7fdc5144f8d7046331d29fc9ad3b3"
"Rev": "50ae88d24ede7b8bad68e23c805b5d3da5c8abaf"
}
]
}

2
Godeps/OWNERS generated Normal file
View File

@@ -0,0 +1,2 @@
approvers:
- dep-approvers

View File

@@ -39,7 +39,6 @@ go_test(
"helper_blackbox_test.go",
"restmapper_test.go",
],
importpath = "k8s.io/client-go/discovery_test",
deps = [
"//vendor/github.com/gogo/protobuf/proto:go_default_library",
"//vendor/github.com/googleapis/gnostic/OpenAPIv2:go_default_library",

View File

@@ -10,7 +10,6 @@ go_test(
name = "go_default_test",
srcs = ["memcache_test.go"],
embed = [":go_default_library"],
importpath = "k8s.io/client-go/discovery/cached",
deps = [
"//vendor/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library",
"//vendor/k8s.io/client-go/discovery/fake:go_default_library",

View File

@@ -36,8 +36,12 @@ import (
restclient "k8s.io/client-go/rest"
)
// defaultRetries is the number of times a resource discovery is repeated if an api group disappears on the fly (e.g. ThirdPartyResources).
const defaultRetries = 2
const (
// defaultRetries is the number of times a resource discovery is repeated if an api group disappears on the fly (e.g. ThirdPartyResources).
defaultRetries = 2
// protobuf mime type
mimePb = "application/com.github.proto-openapi.spec.v2@v1.0+protobuf"
)
// DiscoveryInterface holds the methods that discover server-supported API groups,
// versions and resources.
@@ -329,9 +333,18 @@ func (d *DiscoveryClient) ServerVersion() (*version.Info, error) {
// OpenAPISchema fetches the open api schema using a rest client and parses the proto.
func (d *DiscoveryClient) OpenAPISchema() (*openapi_v2.Document, error) {
data, err := d.restClient.Get().AbsPath("/swagger-2.0.0.pb-v1").Do().Raw()
data, err := d.restClient.Get().AbsPath("/openapi/v2").SetHeader("Accept", mimePb).Do().Raw()
if err != nil {
return nil, err
if errors.IsForbidden(err) || errors.IsNotFound(err) {
// single endpoint not found/registered in old server, try to fetch old endpoint
// TODO(roycaihw): remove this in 1.11
data, err = d.restClient.Get().AbsPath("/swagger-2.0.0.pb-v1").Do().Raw()
if err != nil {
return nil, err
}
} else {
return nil, err
}
}
document := &openapi_v2.Document{}
err = proto.Unmarshal(data, document)

View File

@@ -326,9 +326,14 @@ var returnedOpenAPI = openapi_v2.Document{
},
}
func openapiSchemaFakeServer() (*httptest.Server, error) {
func openapiSchemaDeprecatedFakeServer() (*httptest.Server, error) {
var sErr error
server := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, req *http.Request) {
// old server returns 403 on new endpoint request
if req.URL.Path == "/openapi/v2" {
w.WriteHeader(http.StatusForbidden)
return
}
if req.URL.Path != "/swagger-2.0.0.pb-v1" {
sErr = fmt.Errorf("Unexpected url %v", req.URL)
}
@@ -349,6 +354,33 @@ func openapiSchemaFakeServer() (*httptest.Server, error) {
return server, sErr
}
func openapiSchemaFakeServer() (*httptest.Server, error) {
var sErr error
server := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, req *http.Request) {
if req.URL.Path != "/openapi/v2" {
sErr = fmt.Errorf("Unexpected url %v", req.URL)
}
if req.Method != "GET" {
sErr = fmt.Errorf("Unexpected method %v", req.Method)
}
decipherableFormat := req.Header.Get("Accept")
if decipherableFormat != "application/com.github.proto-openapi.spec.v2@v1.0+protobuf" {
sErr = fmt.Errorf("Unexpected accept mime type %v", decipherableFormat)
}
mime.AddExtensionType(".pb-v1", "application/com.github.googleapis.gnostic.OpenAPIv2@68f4ded+protobuf")
output, err := proto.Marshal(&returnedOpenAPI)
if err != nil {
sErr = err
return
}
w.WriteHeader(http.StatusOK)
w.Write(output)
}))
return server, sErr
}
func TestGetOpenAPISchema(t *testing.T) {
server, err := openapiSchemaFakeServer()
if err != nil {
@@ -366,6 +398,23 @@ func TestGetOpenAPISchema(t *testing.T) {
}
}
func TestGetOpenAPISchemaFallback(t *testing.T) {
server, err := openapiSchemaDeprecatedFakeServer()
if err != nil {
t.Errorf("unexpected error starting fake server: %v", err)
}
defer server.Close()
client := NewDiscoveryClientForConfigOrDie(&restclient.Config{Host: server.URL})
got, err := client.OpenAPISchema()
if err != nil {
t.Fatalf("unexpected error getting openapi: %v", err)
}
if e, a := returnedOpenAPI, *got; !reflect.DeepEqual(e, a) {
t.Errorf("expected %v, got %v", e, a)
}
}
func TestServerPreferredResources(t *testing.T) {
stable := metav1.APIResourceList{
GroupVersion: "v1",

View File

@@ -37,7 +37,6 @@ filegroup(
go_test(
name = "go_default_xtest",
srcs = ["discovery_test.go"],
importpath = "k8s.io/client-go/discovery/fake_test",
deps = [
"//vendor/k8s.io/apimachinery/pkg/version:go_default_library",
"//vendor/k8s.io/client-go/discovery/fake:go_default_library",

View File

@@ -18,6 +18,7 @@ package discovery
import (
"fmt"
"strings"
"sync"
"k8s.io/apimachinery/pkg/api/meta"
@@ -108,6 +109,7 @@ func NewRESTMapper(groupResources []*APIGroupResources, versionInterfaces meta.V
plural := gv.WithResource(resource.Name)
singular := gv.WithResource(resource.SingularName)
versionMapper.AddSpecific(gv.WithKind(resource.Kind), plural, singular, scope)
versionMapper.AddSpecific(gv.WithKind(strings.ToLower(resource.Kind)), plural, singular, scope)
// TODO this is producing unsafe guesses that don't actually work, but it matches previous behavior
versionMapper.Add(gv.WithKind(resource.Kind+"List"), scope)
}

View File

@@ -13,7 +13,6 @@ go_test(
"dynamic_util_test.go",
],
embed = [":go_default_library"],
importpath = "k8s.io/client-go/dynamic",
deps = [
"//vendor/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library",
"//vendor/k8s.io/apimachinery/pkg/apis/meta/v1/unstructured:go_default_library",

View File

@@ -145,6 +145,19 @@ type ResourceClient struct {
parameterCodec runtime.ParameterCodec
}
func (rc *ResourceClient) parseResourceSubresourceName() (string, []string) {
var resourceName string
var subresourceName []string
if strings.Contains(rc.resource.Name, "/") {
resourceName = strings.Split(rc.resource.Name, "/")[0]
subresourceName = strings.Split(rc.resource.Name, "/")[1:]
} else {
resourceName = rc.resource.Name
}
return resourceName, subresourceName
}
// List returns a list of objects for this resource.
func (rc *ResourceClient) List(opts metav1.ListOptions) (runtime.Object, error) {
parameterEncoder := rc.parameterCodec
@@ -166,9 +179,11 @@ func (rc *ResourceClient) Get(name string, opts metav1.GetOptions) (*unstructure
parameterEncoder = defaultParameterEncoder
}
result := new(unstructured.Unstructured)
resourceName, subresourceName := rc.parseResourceSubresourceName()
err := rc.cl.Get().
NamespaceIfScoped(rc.ns, rc.resource.Namespaced).
Resource(rc.resource.Name).
Resource(resourceName).
SubResource(subresourceName...).
VersionedParams(&opts, parameterEncoder).
Name(name).
Do().
@@ -205,11 +220,26 @@ func (rc *ResourceClient) DeleteCollection(deleteOptions *metav1.DeleteOptions,
// Create creates the provided resource.
func (rc *ResourceClient) Create(obj *unstructured.Unstructured) (*unstructured.Unstructured, error) {
result := new(unstructured.Unstructured)
err := rc.cl.Post().
resourceName, subresourceName := rc.parseResourceSubresourceName()
req := rc.cl.Post().
NamespaceIfScoped(rc.ns, rc.resource.Namespaced).
Resource(rc.resource.Name).
Body(obj).
Do().
Resource(resourceName).
Body(obj)
if len(subresourceName) > 0 {
// If the provided resource is a subresource, the POST request should contain
// object name. Examples of subresources that support Create operation:
// core/v1/pods/{name}/binding
// core/v1/pods/{name}/eviction
// extensions/v1beta1/deployments/{name}/rollback
// apps/v1beta1/deployments/{name}/rollback
// NOTE: Currently our system assumes every subresource object has the same
// name as the parent resource object. E.g. a pods/binding object having
// metadada.name "foo" means pod "foo" is being bound. We may need to
// change this if we break the assumption in the future.
req = req.SubResource(subresourceName...).
Name(obj.GetName())
}
err := req.Do().
Into(result)
return result, err
}
@@ -220,9 +250,15 @@ func (rc *ResourceClient) Update(obj *unstructured.Unstructured) (*unstructured.
if len(obj.GetName()) == 0 {
return result, errors.New("object missing name")
}
resourceName, subresourceName := rc.parseResourceSubresourceName()
err := rc.cl.Put().
NamespaceIfScoped(rc.ns, rc.resource.Namespaced).
Resource(rc.resource.Name).
Resource(resourceName).
SubResource(subresourceName...).
// NOTE: Currently our system assumes every subresource object has the same
// name as the parent resource object. E.g. a pods/binding object having
// metadada.name "foo" means pod "foo" is being bound. We may need to
// change this if we break the assumption in the future.
Name(obj.GetName()).
Body(obj).
Do().
@@ -244,11 +280,14 @@ func (rc *ResourceClient) Watch(opts metav1.ListOptions) (watch.Interface, error
Watch()
}
// Patch applies the patch and returns the patched resource.
func (rc *ResourceClient) Patch(name string, pt types.PatchType, data []byte) (*unstructured.Unstructured, error) {
result := new(unstructured.Unstructured)
resourceName, subresourceName := rc.parseResourceSubresourceName()
err := rc.cl.Patch(pt).
NamespaceIfScoped(rc.ns, rc.resource.Namespaced).
Resource(rc.resource.Name).
Resource(resourceName).
SubResource(subresourceName...).
Name(name).
Body(data).
Do().

View File

@@ -150,6 +150,7 @@ func TestList(t *testing.T) {
func TestGet(t *testing.T) {
tcs := []struct {
resource string
namespace string
name string
path string
@@ -157,22 +158,39 @@ func TestGet(t *testing.T) {
want *unstructured.Unstructured
}{
{
name: "normal_get",
path: "/api/gtest/vtest/rtest/normal_get",
resp: getJSON("vTest", "rTest", "normal_get"),
want: getObject("vTest", "rTest", "normal_get"),
resource: "rtest",
name: "normal_get",
path: "/api/gtest/vtest/rtest/normal_get",
resp: getJSON("vTest", "rTest", "normal_get"),
want: getObject("vTest", "rTest", "normal_get"),
},
{
resource: "rtest",
namespace: "nstest",
name: "namespaced_get",
path: "/api/gtest/vtest/namespaces/nstest/rtest/namespaced_get",
resp: getJSON("vTest", "rTest", "namespaced_get"),
want: getObject("vTest", "rTest", "namespaced_get"),
},
{
resource: "rtest/srtest",
name: "normal_subresource_get",
path: "/api/gtest/vtest/rtest/normal_subresource_get/srtest",
resp: getJSON("vTest", "srTest", "normal_subresource_get"),
want: getObject("vTest", "srTest", "normal_subresource_get"),
},
{
resource: "rtest/srtest",
namespace: "nstest",
name: "namespaced_subresource_get",
path: "/api/gtest/vtest/namespaces/nstest/rtest/namespaced_subresource_get/srtest",
resp: getJSON("vTest", "srTest", "namespaced_subresource_get"),
want: getObject("vTest", "srTest", "namespaced_subresource_get"),
},
}
for _, tc := range tcs {
gv := &schema.GroupVersion{Group: "gtest", Version: "vtest"}
resource := &metav1.APIResource{Name: "rtest", Namespaced: len(tc.namespace) != 0}
resource := &metav1.APIResource{Name: tc.resource, Namespaced: len(tc.namespace) != 0}
cl, srv, err := getClientServer(gv, func(w http.ResponseWriter, r *http.Request) {
if r.Method != "GET" {
t.Errorf("Get(%q) got HTTP method %s. wanted GET", tc.name, r.Method)
@@ -303,26 +321,42 @@ func TestDeleteCollection(t *testing.T) {
func TestCreate(t *testing.T) {
tcs := []struct {
resource string
name string
namespace string
obj *unstructured.Unstructured
path string
}{
{
name: "normal_create",
path: "/api/gtest/vtest/rtest",
obj: getObject("vTest", "rTest", "normal_create"),
resource: "rtest",
name: "normal_create",
path: "/api/gtest/vtest/rtest",
obj: getObject("vTest", "rTest", "normal_create"),
},
{
resource: "rtest",
name: "namespaced_create",
namespace: "nstest",
path: "/api/gtest/vtest/namespaces/nstest/rtest",
obj: getObject("vTest", "rTest", "namespaced_create"),
},
{
resource: "rtest/srtest",
name: "normal_subresource_create",
path: "/api/gtest/vtest/rtest/normal_subresource_create/srtest",
obj: getObject("vTest", "srTest", "normal_subresource_create"),
},
{
resource: "rtest/srtest",
name: "namespaced_subresource_create",
namespace: "nstest",
path: "/api/gtest/vtest/namespaces/nstest/rtest/namespaced_subresource_create/srtest",
obj: getObject("vTest", "srTest", "namespaced_subresource_create"),
},
}
for _, tc := range tcs {
gv := &schema.GroupVersion{Group: "gtest", Version: "vtest"}
resource := &metav1.APIResource{Name: "rtest", Namespaced: len(tc.namespace) != 0}
resource := &metav1.APIResource{Name: tc.resource, Namespaced: len(tc.namespace) != 0}
cl, srv, err := getClientServer(gv, func(w http.ResponseWriter, r *http.Request) {
if r.Method != "POST" {
t.Errorf("Create(%q) got HTTP method %s. wanted POST", tc.name, r.Method)
@@ -362,26 +396,42 @@ func TestCreate(t *testing.T) {
func TestUpdate(t *testing.T) {
tcs := []struct {
resource string
name string
namespace string
obj *unstructured.Unstructured
path string
}{
{
name: "normal_update",
path: "/api/gtest/vtest/rtest/normal_update",
obj: getObject("vTest", "rTest", "normal_update"),
resource: "rtest",
name: "normal_update",
path: "/api/gtest/vtest/rtest/normal_update",
obj: getObject("vTest", "rTest", "normal_update"),
},
{
resource: "rtest",
name: "namespaced_update",
namespace: "nstest",
path: "/api/gtest/vtest/namespaces/nstest/rtest/namespaced_update",
obj: getObject("vTest", "rTest", "namespaced_update"),
},
{
resource: "rtest/srtest",
name: "normal_subresource_update",
path: "/api/gtest/vtest/rtest/normal_update/srtest",
obj: getObject("vTest", "srTest", "normal_update"),
},
{
resource: "rtest/srtest",
name: "namespaced_subresource_update",
namespace: "nstest",
path: "/api/gtest/vtest/namespaces/nstest/rtest/namespaced_update/srtest",
obj: getObject("vTest", "srTest", "namespaced_update"),
},
}
for _, tc := range tcs {
gv := &schema.GroupVersion{Group: "gtest", Version: "vtest"}
resource := &metav1.APIResource{Name: "rtest", Namespaced: len(tc.namespace) != 0}
resource := &metav1.APIResource{Name: tc.resource, Namespaced: len(tc.namespace) != 0}
cl, srv, err := getClientServer(gv, func(w http.ResponseWriter, r *http.Request) {
if r.Method != "PUT" {
t.Errorf("Update(%q) got HTTP method %s. wanted PUT", tc.name, r.Method)
@@ -492,6 +542,7 @@ func TestWatch(t *testing.T) {
func TestPatch(t *testing.T) {
tcs := []struct {
resource string
name string
namespace string
patch []byte
@@ -499,22 +550,39 @@ func TestPatch(t *testing.T) {
path string
}{
{
name: "normal_patch",
path: "/api/gtest/vtest/rtest/normal_patch",
patch: getJSON("vTest", "rTest", "normal_patch"),
want: getObject("vTest", "rTest", "normal_patch"),
resource: "rtest",
name: "normal_patch",
path: "/api/gtest/vtest/rtest/normal_patch",
patch: getJSON("vTest", "rTest", "normal_patch"),
want: getObject("vTest", "rTest", "normal_patch"),
},
{
resource: "rtest",
name: "namespaced_patch",
namespace: "nstest",
path: "/api/gtest/vtest/namespaces/nstest/rtest/namespaced_patch",
patch: getJSON("vTest", "rTest", "namespaced_patch"),
want: getObject("vTest", "rTest", "namespaced_patch"),
},
{
resource: "rtest/srtest",
name: "normal_subresource_patch",
path: "/api/gtest/vtest/rtest/normal_subresource_patch/srtest",
patch: getJSON("vTest", "srTest", "normal_subresource_patch"),
want: getObject("vTest", "srTest", "normal_subresource_patch"),
},
{
resource: "rtest/srtest",
name: "namespaced_subresource_patch",
namespace: "nstest",
path: "/api/gtest/vtest/namespaces/nstest/rtest/namespaced_subresource_patch/srtest",
patch: getJSON("vTest", "srTest", "namespaced_subresource_patch"),
want: getObject("vTest", "srTest", "namespaced_subresource_patch"),
},
}
for _, tc := range tcs {
gv := &schema.GroupVersion{Group: "gtest", Version: "vtest"}
resource := &metav1.APIResource{Name: "rtest", Namespaced: len(tc.namespace) != 0}
resource := &metav1.APIResource{Name: tc.resource, Namespaced: len(tc.namespace) != 0}
cl, srv, err := getClientServer(gv, func(w http.ResponseWriter, r *http.Request) {
if r.Method != "PATCH" {
t.Errorf("Patch(%q) got HTTP method %s. wanted PATCH", tc.name, r.Method)

View File

@@ -9,7 +9,6 @@ load(
go_binary(
name = "create-update-delete-deployment",
embed = [":go_default_library"],
importpath = "k8s.io/client-go/examples/create-update-delete-deployment",
)
go_library(

View File

@@ -9,7 +9,6 @@ load(
go_binary(
name = "in-cluster-client-configuration",
embed = [":go_default_library"],
importpath = "k8s.io/client-go/examples/in-cluster-client-configuration",
)
go_library(

View File

@@ -9,7 +9,6 @@ load(
go_binary(
name = "out-of-cluster-client-configuration",
embed = [":go_default_library"],
importpath = "k8s.io/client-go/examples/out-of-cluster-client-configuration",
)
go_library(

View File

@@ -9,7 +9,6 @@ load(
go_binary(
name = "workqueue",
embed = [":go_default_library"],
importpath = "k8s.io/client-go/examples/workqueue",
)
go_library(

View File

@@ -14,7 +14,7 @@ See the License for the specific language governing permissions and
limitations under the License.
*/
// This file was automatically generated by informer-gen
// Code generated by informer-gen. DO NOT EDIT.
package admissionregistration

View File

@@ -14,7 +14,7 @@ See the License for the specific language governing permissions and
limitations under the License.
*/
// This file was automatically generated by informer-gen
// Code generated by informer-gen. DO NOT EDIT.
package v1alpha1

View File

@@ -14,7 +14,7 @@ See the License for the specific language governing permissions and
limitations under the License.
*/
// This file was automatically generated by informer-gen
// Code generated by informer-gen. DO NOT EDIT.
package v1alpha1

View File

@@ -14,7 +14,7 @@ See the License for the specific language governing permissions and
limitations under the License.
*/
// This file was automatically generated by informer-gen
// Code generated by informer-gen. DO NOT EDIT.
package v1beta1

View File

@@ -14,7 +14,7 @@ See the License for the specific language governing permissions and
limitations under the License.
*/
// This file was automatically generated by informer-gen
// Code generated by informer-gen. DO NOT EDIT.
package v1beta1

View File

@@ -14,7 +14,7 @@ See the License for the specific language governing permissions and
limitations under the License.
*/
// This file was automatically generated by informer-gen
// Code generated by informer-gen. DO NOT EDIT.
package v1beta1

View File

@@ -14,7 +14,7 @@ See the License for the specific language governing permissions and
limitations under the License.
*/
// This file was automatically generated by informer-gen
// Code generated by informer-gen. DO NOT EDIT.
package apps

View File

@@ -14,7 +14,7 @@ See the License for the specific language governing permissions and
limitations under the License.
*/
// This file was automatically generated by informer-gen
// Code generated by informer-gen. DO NOT EDIT.
package v1

View File

@@ -14,7 +14,7 @@ See the License for the specific language governing permissions and
limitations under the License.
*/
// This file was automatically generated by informer-gen
// Code generated by informer-gen. DO NOT EDIT.
package v1

View File

@@ -14,7 +14,7 @@ See the License for the specific language governing permissions and
limitations under the License.
*/
// This file was automatically generated by informer-gen
// Code generated by informer-gen. DO NOT EDIT.
package v1

View File

@@ -14,7 +14,7 @@ See the License for the specific language governing permissions and
limitations under the License.
*/
// This file was automatically generated by informer-gen
// Code generated by informer-gen. DO NOT EDIT.
package v1

View File

@@ -14,7 +14,7 @@ See the License for the specific language governing permissions and
limitations under the License.
*/
// This file was automatically generated by informer-gen
// Code generated by informer-gen. DO NOT EDIT.
package v1

View File

@@ -14,7 +14,7 @@ See the License for the specific language governing permissions and
limitations under the License.
*/
// This file was automatically generated by informer-gen
// Code generated by informer-gen. DO NOT EDIT.
package v1

View File

@@ -14,7 +14,7 @@ See the License for the specific language governing permissions and
limitations under the License.
*/
// This file was automatically generated by informer-gen
// Code generated by informer-gen. DO NOT EDIT.
package v1beta1

View File

@@ -14,7 +14,7 @@ See the License for the specific language governing permissions and
limitations under the License.
*/
// This file was automatically generated by informer-gen
// Code generated by informer-gen. DO NOT EDIT.
package v1beta1

View File

@@ -14,7 +14,7 @@ See the License for the specific language governing permissions and
limitations under the License.
*/
// This file was automatically generated by informer-gen
// Code generated by informer-gen. DO NOT EDIT.
package v1beta1

View File

@@ -14,7 +14,7 @@ See the License for the specific language governing permissions and
limitations under the License.
*/
// This file was automatically generated by informer-gen
// Code generated by informer-gen. DO NOT EDIT.
package v1beta1

View File

@@ -14,7 +14,7 @@ See the License for the specific language governing permissions and
limitations under the License.
*/
// This file was automatically generated by informer-gen
// Code generated by informer-gen. DO NOT EDIT.
package v1beta2

View File

@@ -14,7 +14,7 @@ See the License for the specific language governing permissions and
limitations under the License.
*/
// This file was automatically generated by informer-gen
// Code generated by informer-gen. DO NOT EDIT.
package v1beta2

View File

@@ -14,7 +14,7 @@ See the License for the specific language governing permissions and
limitations under the License.
*/
// This file was automatically generated by informer-gen
// Code generated by informer-gen. DO NOT EDIT.
package v1beta2

View File

@@ -14,7 +14,7 @@ See the License for the specific language governing permissions and
limitations under the License.
*/
// This file was automatically generated by informer-gen
// Code generated by informer-gen. DO NOT EDIT.
package v1beta2

View File

@@ -14,7 +14,7 @@ See the License for the specific language governing permissions and
limitations under the License.
*/
// This file was automatically generated by informer-gen
// Code generated by informer-gen. DO NOT EDIT.
package v1beta2

View File

@@ -14,7 +14,7 @@ See the License for the specific language governing permissions and
limitations under the License.
*/
// This file was automatically generated by informer-gen
// Code generated by informer-gen. DO NOT EDIT.
package v1beta2

View File

@@ -14,7 +14,7 @@ See the License for the specific language governing permissions and
limitations under the License.
*/
// This file was automatically generated by informer-gen
// Code generated by informer-gen. DO NOT EDIT.
package autoscaling

View File

@@ -14,7 +14,7 @@ See the License for the specific language governing permissions and
limitations under the License.
*/
// This file was automatically generated by informer-gen
// Code generated by informer-gen. DO NOT EDIT.
package v1

View File

@@ -14,7 +14,7 @@ See the License for the specific language governing permissions and
limitations under the License.
*/
// This file was automatically generated by informer-gen
// Code generated by informer-gen. DO NOT EDIT.
package v1

View File

@@ -14,7 +14,7 @@ See the License for the specific language governing permissions and
limitations under the License.
*/
// This file was automatically generated by informer-gen
// Code generated by informer-gen. DO NOT EDIT.
package v2beta1

View File

@@ -14,7 +14,7 @@ See the License for the specific language governing permissions and
limitations under the License.
*/
// This file was automatically generated by informer-gen
// Code generated by informer-gen. DO NOT EDIT.
package v2beta1

View File

@@ -14,7 +14,7 @@ See the License for the specific language governing permissions and
limitations under the License.
*/
// This file was automatically generated by informer-gen
// Code generated by informer-gen. DO NOT EDIT.
package batch

View File

@@ -14,7 +14,7 @@ See the License for the specific language governing permissions and
limitations under the License.
*/
// This file was automatically generated by informer-gen
// Code generated by informer-gen. DO NOT EDIT.
package v1

View File

@@ -14,7 +14,7 @@ See the License for the specific language governing permissions and
limitations under the License.
*/
// This file was automatically generated by informer-gen
// Code generated by informer-gen. DO NOT EDIT.
package v1

View File

@@ -14,7 +14,7 @@ See the License for the specific language governing permissions and
limitations under the License.
*/
// This file was automatically generated by informer-gen
// Code generated by informer-gen. DO NOT EDIT.
package v1beta1

View File

@@ -14,7 +14,7 @@ See the License for the specific language governing permissions and
limitations under the License.
*/
// This file was automatically generated by informer-gen
// Code generated by informer-gen. DO NOT EDIT.
package v1beta1

View File

@@ -14,7 +14,7 @@ See the License for the specific language governing permissions and
limitations under the License.
*/
// This file was automatically generated by informer-gen
// Code generated by informer-gen. DO NOT EDIT.
package v2alpha1

View File

@@ -14,7 +14,7 @@ See the License for the specific language governing permissions and
limitations under the License.
*/
// This file was automatically generated by informer-gen
// Code generated by informer-gen. DO NOT EDIT.
package v2alpha1

View File

@@ -14,7 +14,7 @@ See the License for the specific language governing permissions and
limitations under the License.
*/
// This file was automatically generated by informer-gen
// Code generated by informer-gen. DO NOT EDIT.
package certificates

View File

@@ -14,7 +14,7 @@ See the License for the specific language governing permissions and
limitations under the License.
*/
// This file was automatically generated by informer-gen
// Code generated by informer-gen. DO NOT EDIT.
package v1beta1

View File

@@ -14,7 +14,7 @@ See the License for the specific language governing permissions and
limitations under the License.
*/
// This file was automatically generated by informer-gen
// Code generated by informer-gen. DO NOT EDIT.
package v1beta1

View File

@@ -14,7 +14,7 @@ See the License for the specific language governing permissions and
limitations under the License.
*/
// This file was automatically generated by informer-gen
// Code generated by informer-gen. DO NOT EDIT.
package core

View File

@@ -14,7 +14,7 @@ See the License for the specific language governing permissions and
limitations under the License.
*/
// This file was automatically generated by informer-gen
// Code generated by informer-gen. DO NOT EDIT.
package v1

View File

@@ -14,7 +14,7 @@ See the License for the specific language governing permissions and
limitations under the License.
*/
// This file was automatically generated by informer-gen
// Code generated by informer-gen. DO NOT EDIT.
package v1

View File

@@ -14,7 +14,7 @@ See the License for the specific language governing permissions and
limitations under the License.
*/
// This file was automatically generated by informer-gen
// Code generated by informer-gen. DO NOT EDIT.
package v1

View File

@@ -14,7 +14,7 @@ See the License for the specific language governing permissions and
limitations under the License.
*/
// This file was automatically generated by informer-gen
// Code generated by informer-gen. DO NOT EDIT.
package v1

View File

@@ -14,7 +14,7 @@ See the License for the specific language governing permissions and
limitations under the License.
*/
// This file was automatically generated by informer-gen
// Code generated by informer-gen. DO NOT EDIT.
package v1

View File

@@ -14,7 +14,7 @@ See the License for the specific language governing permissions and
limitations under the License.
*/
// This file was automatically generated by informer-gen
// Code generated by informer-gen. DO NOT EDIT.
package v1

View File

@@ -14,7 +14,7 @@ See the License for the specific language governing permissions and
limitations under the License.
*/
// This file was automatically generated by informer-gen
// Code generated by informer-gen. DO NOT EDIT.
package v1

View File

@@ -14,7 +14,7 @@ See the License for the specific language governing permissions and
limitations under the License.
*/
// This file was automatically generated by informer-gen
// Code generated by informer-gen. DO NOT EDIT.
package v1

View File

@@ -14,7 +14,7 @@ See the License for the specific language governing permissions and
limitations under the License.
*/
// This file was automatically generated by informer-gen
// Code generated by informer-gen. DO NOT EDIT.
package v1

View File

@@ -14,7 +14,7 @@ See the License for the specific language governing permissions and
limitations under the License.
*/
// This file was automatically generated by informer-gen
// Code generated by informer-gen. DO NOT EDIT.
package v1

View File

@@ -14,7 +14,7 @@ See the License for the specific language governing permissions and
limitations under the License.
*/
// This file was automatically generated by informer-gen
// Code generated by informer-gen. DO NOT EDIT.
package v1

View File

@@ -14,7 +14,7 @@ See the License for the specific language governing permissions and
limitations under the License.
*/
// This file was automatically generated by informer-gen
// Code generated by informer-gen. DO NOT EDIT.
package v1

View File

@@ -14,7 +14,7 @@ See the License for the specific language governing permissions and
limitations under the License.
*/
// This file was automatically generated by informer-gen
// Code generated by informer-gen. DO NOT EDIT.
package v1

View File

@@ -14,7 +14,7 @@ See the License for the specific language governing permissions and
limitations under the License.
*/
// This file was automatically generated by informer-gen
// Code generated by informer-gen. DO NOT EDIT.
package v1

View File

@@ -14,7 +14,7 @@ See the License for the specific language governing permissions and
limitations under the License.
*/
// This file was automatically generated by informer-gen
// Code generated by informer-gen. DO NOT EDIT.
package v1

View File

@@ -14,7 +14,7 @@ See the License for the specific language governing permissions and
limitations under the License.
*/
// This file was automatically generated by informer-gen
// Code generated by informer-gen. DO NOT EDIT.
package v1

View File

@@ -14,7 +14,7 @@ See the License for the specific language governing permissions and
limitations under the License.
*/
// This file was automatically generated by informer-gen
// Code generated by informer-gen. DO NOT EDIT.
package v1

View File

@@ -14,7 +14,7 @@ See the License for the specific language governing permissions and
limitations under the License.
*/
// This file was automatically generated by informer-gen
// Code generated by informer-gen. DO NOT EDIT.
package events

View File

@@ -14,7 +14,7 @@ See the License for the specific language governing permissions and
limitations under the License.
*/
// This file was automatically generated by informer-gen
// Code generated by informer-gen. DO NOT EDIT.
package v1beta1

View File

@@ -14,7 +14,7 @@ See the License for the specific language governing permissions and
limitations under the License.
*/
// This file was automatically generated by informer-gen
// Code generated by informer-gen. DO NOT EDIT.
package v1beta1

View File

@@ -14,7 +14,7 @@ See the License for the specific language governing permissions and
limitations under the License.
*/
// This file was automatically generated by informer-gen
// Code generated by informer-gen. DO NOT EDIT.
package extensions

View File

@@ -14,7 +14,7 @@ See the License for the specific language governing permissions and
limitations under the License.
*/
// This file was automatically generated by informer-gen
// Code generated by informer-gen. DO NOT EDIT.
package v1beta1

View File

@@ -14,7 +14,7 @@ See the License for the specific language governing permissions and
limitations under the License.
*/
// This file was automatically generated by informer-gen
// Code generated by informer-gen. DO NOT EDIT.
package v1beta1

View File

@@ -14,7 +14,7 @@ See the License for the specific language governing permissions and
limitations under the License.
*/
// This file was automatically generated by informer-gen
// Code generated by informer-gen. DO NOT EDIT.
package v1beta1

View File

@@ -14,7 +14,7 @@ See the License for the specific language governing permissions and
limitations under the License.
*/
// This file was automatically generated by informer-gen
// Code generated by informer-gen. DO NOT EDIT.
package v1beta1

View File

@@ -14,7 +14,7 @@ See the License for the specific language governing permissions and
limitations under the License.
*/
// This file was automatically generated by informer-gen
// Code generated by informer-gen. DO NOT EDIT.
package v1beta1

View File

@@ -14,7 +14,7 @@ See the License for the specific language governing permissions and
limitations under the License.
*/
// This file was automatically generated by informer-gen
// Code generated by informer-gen. DO NOT EDIT.
package v1beta1

View File

@@ -14,7 +14,7 @@ See the License for the specific language governing permissions and
limitations under the License.
*/
// This file was automatically generated by informer-gen
// Code generated by informer-gen. DO NOT EDIT.
package informers

View File

@@ -14,7 +14,7 @@ See the License for the specific language governing permissions and
limitations under the License.
*/
// This file was automatically generated by informer-gen
// Code generated by informer-gen. DO NOT EDIT.
package informers
@@ -198,6 +198,8 @@ func (f *sharedInformerFactory) ForResource(resource schema.GroupVersionResource
// Group=policy, Version=v1beta1
case policy_v1beta1.SchemeGroupVersion.WithResource("poddisruptionbudgets"):
return &genericInformer{resource: resource.GroupResource(), informer: f.Policy().V1beta1().PodDisruptionBudgets().Informer()}, nil
case policy_v1beta1.SchemeGroupVersion.WithResource("podsecuritypolicies"):
return &genericInformer{resource: resource.GroupResource(), informer: f.Policy().V1beta1().PodSecurityPolicies().Informer()}, nil
// Group=rbac.authorization.k8s.io, Version=v1
case rbac_v1.SchemeGroupVersion.WithResource("clusterroles"):

View File

@@ -14,7 +14,7 @@ See the License for the specific language governing permissions and
limitations under the License.
*/
// This file was automatically generated by informer-gen
// Code generated by informer-gen. DO NOT EDIT.
package internalinterfaces

View File

@@ -14,7 +14,7 @@ See the License for the specific language governing permissions and
limitations under the License.
*/
// This file was automatically generated by informer-gen
// Code generated by informer-gen. DO NOT EDIT.
package networking

View File

@@ -14,7 +14,7 @@ See the License for the specific language governing permissions and
limitations under the License.
*/
// This file was automatically generated by informer-gen
// Code generated by informer-gen. DO NOT EDIT.
package v1

View File

@@ -14,7 +14,7 @@ See the License for the specific language governing permissions and
limitations under the License.
*/
// This file was automatically generated by informer-gen
// Code generated by informer-gen. DO NOT EDIT.
package v1

View File

@@ -14,7 +14,7 @@ See the License for the specific language governing permissions and
limitations under the License.
*/
// This file was automatically generated by informer-gen
// Code generated by informer-gen. DO NOT EDIT.
package policy

View File

@@ -10,6 +10,7 @@ go_library(
srcs = [
"interface.go",
"poddisruptionbudget.go",
"podsecuritypolicy.go",
],
importpath = "k8s.io/client-go/informers/policy/v1beta1",
deps = [

View File

@@ -14,7 +14,7 @@ See the License for the specific language governing permissions and
limitations under the License.
*/
// This file was automatically generated by informer-gen
// Code generated by informer-gen. DO NOT EDIT.
package v1beta1
@@ -26,6 +26,8 @@ import (
type Interface interface {
// PodDisruptionBudgets returns a PodDisruptionBudgetInformer.
PodDisruptionBudgets() PodDisruptionBudgetInformer
// PodSecurityPolicies returns a PodSecurityPolicyInformer.
PodSecurityPolicies() PodSecurityPolicyInformer
}
type version struct {
@@ -43,3 +45,8 @@ func New(f internalinterfaces.SharedInformerFactory, namespace string, tweakList
func (v *version) PodDisruptionBudgets() PodDisruptionBudgetInformer {
return &podDisruptionBudgetInformer{factory: v.factory, namespace: v.namespace, tweakListOptions: v.tweakListOptions}
}
// PodSecurityPolicies returns a PodSecurityPolicyInformer.
func (v *version) PodSecurityPolicies() PodSecurityPolicyInformer {
return &podSecurityPolicyInformer{factory: v.factory, tweakListOptions: v.tweakListOptions}
}

View File

@@ -14,7 +14,7 @@ See the License for the specific language governing permissions and
limitations under the License.
*/
// This file was automatically generated by informer-gen
// Code generated by informer-gen. DO NOT EDIT.
package v1beta1

View File

@@ -0,0 +1,88 @@
/*
Copyright 2018 The Kubernetes Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
// Code generated by informer-gen. DO NOT EDIT.
package v1beta1
import (
time "time"
policy_v1beta1 "k8s.io/api/policy/v1beta1"
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
runtime "k8s.io/apimachinery/pkg/runtime"
watch "k8s.io/apimachinery/pkg/watch"
internalinterfaces "k8s.io/client-go/informers/internalinterfaces"
kubernetes "k8s.io/client-go/kubernetes"
v1beta1 "k8s.io/client-go/listers/policy/v1beta1"
cache "k8s.io/client-go/tools/cache"
)
// PodSecurityPolicyInformer provides access to a shared informer and lister for
// PodSecurityPolicies.
type PodSecurityPolicyInformer interface {
Informer() cache.SharedIndexInformer
Lister() v1beta1.PodSecurityPolicyLister
}
type podSecurityPolicyInformer struct {
factory internalinterfaces.SharedInformerFactory
tweakListOptions internalinterfaces.TweakListOptionsFunc
}
// NewPodSecurityPolicyInformer constructs a new informer for PodSecurityPolicy type.
// Always prefer using an informer factory to get a shared informer instead of getting an independent
// one. This reduces memory footprint and number of connections to the server.
func NewPodSecurityPolicyInformer(client kubernetes.Interface, resyncPeriod time.Duration, indexers cache.Indexers) cache.SharedIndexInformer {
return NewFilteredPodSecurityPolicyInformer(client, resyncPeriod, indexers, nil)
}
// NewFilteredPodSecurityPolicyInformer constructs a new informer for PodSecurityPolicy type.
// Always prefer using an informer factory to get a shared informer instead of getting an independent
// one. This reduces memory footprint and number of connections to the server.
func NewFilteredPodSecurityPolicyInformer(client kubernetes.Interface, resyncPeriod time.Duration, indexers cache.Indexers, tweakListOptions internalinterfaces.TweakListOptionsFunc) cache.SharedIndexInformer {
return cache.NewSharedIndexInformer(
&cache.ListWatch{
ListFunc: func(options v1.ListOptions) (runtime.Object, error) {
if tweakListOptions != nil {
tweakListOptions(&options)
}
return client.PolicyV1beta1().PodSecurityPolicies().List(options)
},
WatchFunc: func(options v1.ListOptions) (watch.Interface, error) {
if tweakListOptions != nil {
tweakListOptions(&options)
}
return client.PolicyV1beta1().PodSecurityPolicies().Watch(options)
},
},
&policy_v1beta1.PodSecurityPolicy{},
resyncPeriod,
indexers,
)
}
func (f *podSecurityPolicyInformer) defaultInformer(client kubernetes.Interface, resyncPeriod time.Duration) cache.SharedIndexInformer {
return NewFilteredPodSecurityPolicyInformer(client, resyncPeriod, cache.Indexers{cache.NamespaceIndex: cache.MetaNamespaceIndexFunc}, f.tweakListOptions)
}
func (f *podSecurityPolicyInformer) Informer() cache.SharedIndexInformer {
return f.factory.InformerFor(&policy_v1beta1.PodSecurityPolicy{}, f.defaultInformer)
}
func (f *podSecurityPolicyInformer) Lister() v1beta1.PodSecurityPolicyLister {
return v1beta1.NewPodSecurityPolicyLister(f.Informer().GetIndexer())
}

View File

@@ -14,7 +14,7 @@ See the License for the specific language governing permissions and
limitations under the License.
*/
// This file was automatically generated by informer-gen
// Code generated by informer-gen. DO NOT EDIT.
package rbac

View File

@@ -14,7 +14,7 @@ See the License for the specific language governing permissions and
limitations under the License.
*/
// This file was automatically generated by informer-gen
// Code generated by informer-gen. DO NOT EDIT.
package v1

View File

@@ -14,7 +14,7 @@ See the License for the specific language governing permissions and
limitations under the License.
*/
// This file was automatically generated by informer-gen
// Code generated by informer-gen. DO NOT EDIT.
package v1

View File

@@ -14,7 +14,7 @@ See the License for the specific language governing permissions and
limitations under the License.
*/
// This file was automatically generated by informer-gen
// Code generated by informer-gen. DO NOT EDIT.
package v1

View File

@@ -14,7 +14,7 @@ See the License for the specific language governing permissions and
limitations under the License.
*/
// This file was automatically generated by informer-gen
// Code generated by informer-gen. DO NOT EDIT.
package v1

View File

@@ -14,7 +14,7 @@ See the License for the specific language governing permissions and
limitations under the License.
*/
// This file was automatically generated by informer-gen
// Code generated by informer-gen. DO NOT EDIT.
package v1

View File

@@ -14,7 +14,7 @@ See the License for the specific language governing permissions and
limitations under the License.
*/
// This file was automatically generated by informer-gen
// Code generated by informer-gen. DO NOT EDIT.
package v1alpha1

View File

@@ -14,7 +14,7 @@ See the License for the specific language governing permissions and
limitations under the License.
*/
// This file was automatically generated by informer-gen
// Code generated by informer-gen. DO NOT EDIT.
package v1alpha1

Some files were not shown because too many files have changed in this diff Show More