Commit Graph

116 Commits

Author SHA1 Message Date
Kubernetes Publisher
4066b6ae6b Merge pull request #65609 from CaoShuFeng/sample-controller
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 sample-controller README

The guide in doc causes an error
```
$ go run *.go -kubeconfig=$HOME/.kube/config
go run: cannot run *_test.go files (controller_test.go)
```

**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
```

Kubernetes-commit: cf14f027c59f50c897ae5b6bb5a1f69581d1549b
2018-06-29 18:45:09 +00:00
Kubernetes Publisher
f3ebd4443a Merge pull request #64246 from wojtek-t/lease_object_type
Automatic merge from submit-queue (batch tested with PRs 64246, 65489, 65443). 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>.

Create "Lease" API in the new "coordination.k8s.io" api group

Part of "Efficient Node heartbeats" KEP:
https://github.com/kubernetes/community/blob/master/keps/0009-node-heartbeat.md

Part of: https://github.com/kubernetes/kubernetes/issues/14733

```release-note
NONE
```

Kubernetes-commit: 6d3bba7391fd24024b53c1ea67f7aad299cb46a8
2018-06-27 19:14:19 +00:00
Kubernetes Publisher
9aa972043f Merge pull request #64122 from ixdy/update-rules_go-and-gazelle
Automatic merge from submit-queue (batch tested with PRs 64122, 64936, 65288, 65383). 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 rules_go 0.12.1 and gazelle 0.12.0 and perform related cleanups

**What this PR does / why we need it**: my initial intent was to simply update to rules_go 0.12.1 and gazelle 0.12.0.

A few internal changes / deprecations meant that I finally needed to clean up some technical debt. This also fixes #64122.
I've attempted to keep the steps as separate commits to make it easier to review:

1. Disable gazelle proto rule generation; legacy proto rules are deprecated, and we don't (currently) build protos at build time anyway, instead generating them with `hack/update-generated-protobuf.sh` and then checking them in. We can revisit this in the future if we'd like.
2. Remove the legacy `go_default_library_protos` filegroups using [buildozer](https://github.com/bazelbuild/buildtools/tree/master/buildozer). We don't use these, anyway.
3. Update the rules_go bazel workspace dependency to 0.12.1.
4. Vendor gazelle 0.12.0 and update BUILD files with `hack/update-bazel.sh`. This causes a lot of diffs, because `select()`s are no longer used in `srcs` attributes, external tests are folded into non-external tests, and vendored targets get an `importmap` attribute.
5. Set `gazelle:prefix` on `staging/src/BUILD` to make gazelle treat these correctly(ish). This allows us to remove the sed rewrite hack in `hack/update-bazel.sh`.
6. Explicitly set `# gazelle:importmap_prefix k8s.io/kubernetes/vendor` on `vendor/`, so that all vendored dependencies get the right importmap. gazelle 0.12.0 uses the bazel workspace name + `vendor/` as a prefix, which doesn't work with native go. Newer gazelle will use the go prefix (https://github.com/bazelbuild/bazel-gazelle/pull/207), but it's not released yet. Setting this correctly now also fixes later `BUILD` churn.
7. Re-run `hack/update-bazel.sh`. This causes a bunch of diffs, since anything under `staging/src` now uses the `staging/src/` path instead of `vendor/`. (Both would work for bazel, but gazelle uses the former, since `vendor/` uses symlinks.) Also `importmap`s under `vendor/` are fixed.
8. Reformat a few files (using [buildifier](https://github.com/bazelbuild/buildtools/tree/master/buildifier)) to make later diffs easier to read.
9. Rework the `go_genrule` rules to use the new `go_genrule` from https://github.com/kubernetes/repo-infra/pull/72, which is more bazely, since it uses the rules_go `go_path` rule instead of lots of shell.
10. Remove the deprecated `go_prefix` rule from the root BUILD.bazel file.
11. Set `# gazelle:importmap_prefix k8s.io/kubernetes/vendor` on `staging/src` as well, which ensures that these repos are treated as vendored dependencies. (It's basically the bazel-y way of doing the `vendor/k8s.io` symlinks.)
12. Run `hack/update-bazel.sh` one last time to fix all of the `importmap`s under `staging/src`.

Note re: point 6 above - we're pretty much ignoring the `vendor/k8s.io` symlinks entirely now under bazel. Using the `gazelle:prefix` directive ensures these get mapped into the right go importpath, and the `go_path` rule installs these correctly now too.

**Special notes for your reviewer**: this should not be submitted before https://github.com/kubernetes/repo-infra/pull/72, obviously.

**Release note**:

```release-note
NONE
```

/assign @BenTheElder @fejta @thockin
cc @cblecker @jayconrod

Kubernetes-commit: 1ad1c8c7f80d99b9625924b2102a04a555162bfb
2018-06-24 20:27:30 +00:00
Kubernetes Publisher
91ef013bbe Merge pull request #65050 from sttts/sttts-deepcopy-update
Automatic merge from submit-queue (batch tested with PRs 64895, 64938, 63700, 65050, 64957). 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>.

Bump gengo to include uniform pointer deepcopy

This bumps k8s.io/gengo with uniform pointer support in deepcopy-gen.

Fixes https://github.com/kubernetes/code-generator/issues/45.

Kubernetes-commit: d1f5cb2348dfaeabe26ff5539b05568ab6f8a830
2018-06-21 16:35:17 +00:00
Kubernetes Publisher
b31118a167 Merge pull request #65256 from liggitt/crd-schema-openapi
Automatic merge from submit-queue (batch tested with PRs 65256, 64236, 64919, 64879, 57932). 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 CRD OpenAPI schema

fixes #65243
depends on https://github.com/kubernetes/kube-openapi/pull/84

without this PR, kubectl complains about creating this CRD with a validation schema (which worked in 1.10):
```yaml
apiVersion: apiextensions.k8s.io/v1beta1
kind: CustomResourceDefinition
metadata:
  name: resources.mygroup.example.com
spec:
  group: mygroup.example.com
  version: v1alpha1
  scope: Namespaced
  names:
    plural: resources
    singular: resource
    kind: Kind
    listKind: KindList
  validation:
    openAPIV3Schema:
      properties:
        spec:
          type: array
          items:
            type: number
```

> error: error validating "/Users/jliggitt/projects/snippets/crd/crd.yaml": error validating data: [ValidationError(CustomResourceDefinition.spec.validation.openAPIV3Schema.properties.spec.items): unknown field "type" in io.k8s.apiextensions-apiserver.pkg.apis.apiextensions.v1beta1.JSONSchemaPropsOrArray, ValidationError(CustomResourceDefinition.spec.validation.openAPIV3Schema.properties.spec.items): missing required field "Schema" in io.k8s.apiextensions-apiserver.pkg.apis.apiextensions.v1beta1.JSONSchemaPropsOrArray, ValidationError(CustomResourceDefinition.spec.validation.openAPIV3Schema.properties.spec.items): missing required field "JSONSchemas" in io.k8s.apiextensions-apiserver.pkg.apis.apiextensions.v1beta1.JSONSchemaPropsOrArray]; if you choose to ignore these errors, turn validation off with --validate=false

that is because the types used to serialize JSONSchema require custom marshaling/unmarshaling, and the OpenAPI generator was not informed of that, so it produced this:
```json
{
    "io.k8s.apiextensions-apiserver.pkg.apis.apiextensions.v1beta1.JSONSchemaPropsOrArray": {
    "description": "JSONSchemaPropsOrArray represents a value that can either be a JSONSchemaProps or an array of JSONSchemaProps. Mainly here for serialization purposes.",
    "required": [
     "Schema",
     "JSONSchemas"
    ],
    "properties": {
     "JSONSchemas": {
      "type": "array",
      "items": {
       "$ref": "#/definitions/io.k8s.apiextensions-apiserver.pkg.apis.apiextensions.v1beta1.JSONSchemaProps"
      }
     },
     "Schema": {
      "$ref": "#/definitions/io.k8s.apiextensions-apiserver.pkg.apis.apiextensions.v1beta1.JSONSchemaProps"
     }
    }
   }
}
```

OpenAPI isn't able to represent oneOf/anyOf types correctly currently. Until it can, we definitely shouldn't publish a schema containing required fields which aren't even part of the JSON serialization. This PR implements custom openapi type functions, which omit the properties/required/schema attributes for four specific JSONSchema types. This allows kubectl to continue creating these objects without complaining.

/sig api-machinery
/assign @sttts

```release-note
fixed incorrect OpenAPI schema for CustomResourceDefinition objects
```

Kubernetes-commit: ed6c8b7326bd1a1b845719f4bfb302073a18f03f
2018-06-21 04:31:22 +00:00
Jordan Liggitt
10e3df8091 bump(k8s.io/kube-openapi): 91cfa479c814065e420cee7ed227db0f63a5854e
Kubernetes-commit: 102bc901202a0533c7bded8ad55841677ff92835
2018-06-19 23:23:00 -04:00
Kubernetes Publisher
c4b5a29669 Merge pull request #65034 from caesarxuchao/json-case-sensitive
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>.

Make kubernetes json serializer case sensitive

This PR imported the latest jsoniterator library so that case sensitivity during unmarhsaling is optional. The PR also set Kubernetes json serializer to be case sensitive.

Kubernetes json serializer had been case sensitive for 1.1-1.7 as we were using ugorji. This PR restores the behavior.

Fix #64612.

```release-notes
Kubernetes json deserializer is now case-sensitive as it was before 1.8.
If your config files contains fields with wrong case, the config files will be now invalid.
```

Kubernetes-commit: a2de1398f829ef38d645579160bdd6bfec8384d3
2018-06-15 00:25:19 +00:00
Chao Xu
daad0a487e vendor the latest json-iterator
Kubernetes-commit: dd69be30a5f296102be6b9706e6ad0c5db8e2c0f
2018-06-10 16:48:43 -07:00
Kubernetes Publisher
5132471a28 Merge pull request #64719 from davidz627/feature/CSIv0.3
Automatic merge from submit-queue (batch tested with PRs 64276, 64094, 64719, 64766, 64750). 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>.

Upgrade container-storage-interface/spec dependency to v0.3.0

Also updated golang/protobuf to v1.1.0 to satisfy hard requirement of new CSI Spec version

/sig storage
/kind enhancement
/assign @saad-ali

```release-note
Updated Container Storage Interface specification version to v0.3.0
```

Kubernetes-commit: d12d8bd64bd25ce3a6bbda0dd43533cde359290b
2018-06-05 23:39:06 +00:00
Kubernetes Publisher
a6ce711412 Merge pull request #64482 from ericchiang/exec-plugin-beta
Automatic merge from submit-queue (batch tested with PRs 63453, 64592, 64482, 64618, 64661). 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: promote exec plugin support to beta

/sig auth
/kind feature

Adds a "v1beta1" API group for client authentication. Because of a lack of usage with the input parameters, these have been dropped for the beta. Would like to re-introduce them as users feel they require them.

updates https://github.com/kubernetes/kubernetes/issues/61796

```release-note
client-go: credential exec plugins have been promoted to beta
```

Kubernetes-commit: 819d51567f82c27ba3b7cde5b4cb3bb59c0550b6
2018-06-05 03:47:52 +00:00
David Zhu
d43e7e9dd4 staging godep update
Kubernetes-commit: cc3fb7e86112d9f436f2dce3a04fc729a2e13d15
2018-06-04 15:49:56 -07:00
Kubernetes Publisher
0484b08e54 Merge pull request #64596 from apelisse/openapi-some-cleanup
Automatic merge from submit-queue (batch tested with PRs 64613, 64596, 64573, 64154, 64639). 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>.

Openapi some cleanup

Clean-up some OpenAPI code, mostly test related (there are two implementations of "Fake").
This is going for master, but I'll probably also cherry-pick/create a similar PR for feature-serverside-apply branch since we'll need that to move some code around.

**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
```

Kubernetes-commit: c3bb41ad4b147f6159dd7542ffd2772d7042e2d8
2018-06-02 15:41:56 +00:00
Kubernetes Publisher
2757a69a43 Merge pull request #64262 from jessfraz/SECURITY_CONTACTS
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 PST to main SECURITY_CONTACTS as formality

Add the Product Security Team as the security contacts for the main
repository and they can use the OWNERS files in each subsystem/dir to find
the correct owners.

cc @liggitt @cjcullen @tallclair @philips

```release-note
NONE
```

closes #64265

Signed-off-by: Jess Frazelle <acidburn@microsoft.com>

Kubernetes-commit: 5da925ad4fd070e687dc5255c177d5e7d542edd7
2018-06-01 23:37:04 +00:00
Kubernetes Publisher
4444bdf630 Merge pull request #61803 from awly/client-auth-exec-tls
Automatic merge from submit-queue (batch tested with PRs 61803, 64305, 64170, 64361, 64339). 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 TLS support to exec authenticator plugin

**What this PR does / why we need it**:
https://github.com/kubernetes/community/blob/master/contributors/design-proposals/auth/kubectl-exec-plugins.md#tls-client-certificate-support

Allows exec plugin to return raw TLS key/cert data. This data populates
transport.Config.TLS field.
This requires a change to AuthProvider interface to expose TLS configs,
not only RoundTripper.

**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 #61421

**Special notes for your reviewer**:

**Release note**:

```release-note
Exec authenticator plugin supports TLS client certificates.
```

Kubernetes-commit: f701b7529937493a64f2f2553aa9a5cd7020d9b7
2018-06-01 20:00:38 +00:00
Kubernetes Publisher
7b21116d89 Merge pull request #63893 from jennybuckley/expose-openapi-to-registry3
Automatic merge from submit-queue (batch tested with PRs 64175, 63893). 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>.

Expose openapi schema to handlers

**What this PR does / why we need it**:
Build an openapi spec for each api resource handler. This spec will be able to be consumed by server-side apply and server-side openapi validation.
The reason for putting it into master is so we can work on implementing server side validation against the openapi spec as well as server side apply, and it will make merging the server side apply feature branch a smaller, less risky PR

/sig api-machinery
/kind feature
cc @liggitt @lavalamp @seans3 @mbohlool @apelisse

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

Kubernetes-commit: 28f171bd66937dec8b24a05c4b7a1414432f9fe8
2018-06-01 19:59:47 +00:00
Eric Chiang
c57d0debdb generated:
./hack/update-bazel.sh
	./hack/update-codegen.sh
	./hack/update-staging-godeps.sh

Kubernetes-commit: 206982723909944a2e68c3ffa9382f6b332e767a
2018-05-31 14:30:33 -07:00
Antoine Pelisse
e29c6fd1cc Replace openapi Fake with kube-openapi version
There are two version of this fake class, let's just use that one
version.

Kubernetes-commit: 000510d9b73d5be870ebc763ea3606997107172c
2018-05-31 14:00:34 -07:00
Andrew Lytvynov
7fc8b05313 Add TLS support to exec authenticator plugin
https://github.com/kubernetes/community/blob/master/contributors/design-proposals/auth/kubectl-exec-plugins.md#tls-client-certificate-support

Allows exec plugin to return raw TLS key/cert data. This data populates
transport.Config.TLS fields.
transport.Config.TLS propagates custom credentials using
tls.Config.GetClientCertificate callback.
On key/cert rotation, all connections using old credentials are
closed

Kubernetes-commit: cd89f9473faa60c15b8e9d223e5c4f9dab53627a
2018-05-30 14:03:32 -07:00
jennybuckley
820d8299b7 Run hack/update-all.sh
Kubernetes-commit: 349fbdfe9fbcad91fcecbfe4e71fa91d235dad6d
2018-05-24 09:55:33 -07:00
wojtekt
c26316611e Autogenerated stuff
Kubernetes-commit: 0950084137a5abf5cd731bbda46ccb441499801d
2018-05-24 13:02:08 +02:00
Kubernetes Publisher
9946af3e30 Merge pull request #53944 from gregory-m/sample-controller-tests
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>.

Sample controller tests

**What this PR does / why we need it**:
This PR adds unit tests to sample-controller.

**Special notes for your reviewer**:
This is currently based on the munnerz:sample-controller branch. Please don't merged it until #52753 is merged.

Kubernetes-commit: dc20badcd49e5fd2ab41d4320c9c70a50d30343c
2018-05-23 03:28:43 +00:00
Kubernetes Publisher
d934464330 Merge pull request #63800 from wojtek-t/fix_fake_listers
Automatic merge from submit-queue (batch tested with PRs 63658, 63509, 63800, 63586, 63840). 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 List in fake clients to propagate ListMeta

Kubernetes-commit: 765c49db41dbe067cfca5d83cf438fb02b3468b8
2018-05-16 03:31:17 +00:00
Kubernetes Publisher
914478ebaa Merge pull request #63550 from juanvallejo/jvallejo/move-cached-discovery
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>.

move cached_discovery to client-go/discovery

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

Moves the cmd/util CachedDiscoveryClient to client-go

cc @soltysh @deads2k

Kubernetes-commit: f2ea83bef88f9d2783abe0c00de563db13ec04f4
2018-05-15 19:43:35 +00:00
Kubernetes Publisher
4584dc3378 Merge pull request #63100 from ravisantoshgudimetla/priority-beta-api
Automatic merge from submit-queue (batch tested with PRs 55511, 63372, 63400, 63100, 63769). 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>.

Create pkg/scheduling/apis/v1beta1 and move priorityClass to beta

**What this PR does / why we need it**:
This is for creating pkg/apis/scheduling/v1beta1 so that priorityClasses could be moved to beta.

**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**:
/cc @bsalamat @aveshagarwal

**Release note**:

```release-note
The `PriorityClass` API is promoted to `scheduling.k8s.io/v1beta1`
```

Kubernetes-commit: a1b54f3c99f2ae4d7d10c269939e5c0bb6d03e6f
2018-05-14 23:35:45 +00:00
Kubernetes Publisher
9ec2064685 Merge pull request #62563 from devdattakulkarni/client-go-details
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>.

Updated README to include client-go<->controller diagram

The sample-controller makes extensive use of various mechanisms
available in client-go. For writing custom controllers/operators
it will be helpful if there is precise description of how the
client-go library works and how/where it interfaces with
custom controller code.

Recently we published a blog post with these details here:

https://medium.com/@cloudark/kubernetes-custom-controllers-b6c7d0668fdf

This patch includes the diagram from the post, as was recommended
by @sttts on https://github.com/kubernetes/sample-controller/issues/13

**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

```

Kubernetes-commit: 773def0194ecc1cd845ea9a01da761d5a0390e6e
2018-05-14 15:40:11 +00:00
Kubernetes Publisher
8a66ce0ffe Merge pull request #63565 from roycaihw/bump-kube-openapi-dep
Automatic merge from submit-queue (batch tested with PRs 59034, 63565, 63533). 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>.

Bump kube-openapi dependency

picks: https://github.com/kubernetes/kube-openapi/pull/67
ref: https://github.com/kubernetes/kubernetes/issues/63494

**Release note**:

```release-note
NONE
```

Kubernetes-commit: 3663dc757e05fb79f23a14ad4f2ba832d6e5962c
2018-05-09 19:23:52 +00:00
ravisantoshgudimetla
8ce9c3c30f Generated
Kubernetes-commit: f20bd00ab279ad4ac6e887007c5dad6bbc4b3bb9
2018-05-09 11:17:18 -04:00
Haowei Cai
cf8de9b2c1 generated
Kubernetes-commit: 18fd392c1358fccdac0905e29ae957b2ddcd213a
2018-05-08 17:27:17 -07:00
juanvallejo
f47f55a195 move cached_discovery to client-go/discovery
Kubernetes-commit: 405935574307d460124f30df06860dc670aa634c
2018-05-08 13:50:36 -04:00
Kubernetes Publisher
3c94deb4df Merge pull request #63346 from roycaihw/bump-kube-openapi
Automatic merge from submit-queue (batch tested with PRs 61455, 63346, 63130, 63404). 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>.

Bump kube-openapi dependency

**What this PR does / why we need it**:
Pick up https://github.com/kubernetes/kube-openapi/pull/64

**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 #63218

**Special notes for your reviewer**:

**Release note**:

```release-note
NONE
```

/sig api-machinery
/cc @mbohlool @liggitt

Kubernetes-commit: 89e6895e1c550658b7c145436868b70fb3cabbcd
2018-05-04 03:21:13 +00:00
Kubernetes Publisher
69245a1d17 Merge pull request #62657 from matthyx/master
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 all script shebangs to use /usr/bin/env interpreter instead of /bin/interpreter

This is required to support systems where bash doesn't reside in /bin (such as NixOS, or the *BSD family) and allow users to specify a different interpreter version through $PATH manipulation.
https://www.cyberciti.biz/tips/finding-bash-perl-python-portably-using-env.html
```release-note
Use /usr/bin/env in all script shebangs to increase portability.
```

Kubernetes-commit: b5f61ac129019d314e473584c1491b7ca62144c7
2018-05-03 07:19:12 +00:00
Haowei Cai
3ac9ebf2a7 Bump kube-openapi dependency
Kubernetes-commit: 212814a0c6625d9359afbdbfa50f8e187e59fc0e
2018-05-01 17:33:27 -07:00
Kubernetes Publisher
c0feae0701 Merge pull request #63059 from ceshihao/upgrade_json_package_fix_base64_newline
Automatic merge from submit-queue (batch tested with PRs 59965, 59115, 63076, 63059). 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>.

Upgrade dep json-iterator/go to fix base64 decode bug

**What this PR does / why we need it**:
upgrade dep `json-iterator/go` to fix base64 decode bug #62742

**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 #62742

**Special notes for your reviewer**:
Just upgrade `json-iterator/go` to latest which includes base64 decode fix https://github.com/json-iterator/go/pull/266
No other code changes

**Release note**:

```release-note
None
```

Kubernetes-commit: 3dbcd1ddcee786f443f89a82514bbd9c6ad06c99
2018-04-26 07:24:17 +00:00
ceshihao
7f244c0dc3 runhack/update-staging-godeps.sh
Kubernetes-commit: 3fde7d6844c540439d30eb356ef0a12af23bd50f
2018-04-25 16:11:21 +00:00
Kubernetes Publisher
9b81532a60 Merge pull request #62412 from bhcleek/go1.10
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>.

generated code should pass go vet for go1.10

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

Update code generator and the code it generates to pass `go vet`.

go1.10 runs `go vet` whenever `go test` is run. Because of this, generated code for CRDs needs to pass `go vet`.

**Release note**:

```release-note
Code generated for CRDs now passes `go vet`.
```

Kubernetes-commit: 5dde701b876d1d0915314c3ed146e986c4327f7e
2018-04-20 15:20:04 +00:00
Kubernetes Publisher
119594ddec sync: update godeps 2018-04-17 15:26:37 +00:00
Kubernetes Publisher
32ad1389a8 Merge pull request #62505 from mtaufen/show-deprecated-help
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>.

Show help for deprecated Kubelet flags

We recently deprecated a bunch of Kubelet flags, which caused them to disappear from `--help` output. This PR unhides these flags, so that the deprecation notice is clearly visible in `--help`.

Fixes: #62009

```release-note
NONE
```

/cc @eparis

Kubernetes-commit: ee4d90aaa61150139cdcd67a73e22da8cb226dc6
2018-04-14 23:21:57 +00:00
Michael Taufen
6a2262b4e8 update godeps to use latest pflag
Kubernetes-commit: b02f116172faf26f57be1fa113d3a9da1af6f196
2018-04-12 17:12:43 -07:00
Kubernetes Publisher
8d405dd3e1 Merge pull request #62273 from atlassian/dont-log-when-error-returned
Automatic merge from submit-queue (batch tested with PRs 62273, 62461). 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>.

Don't log when error returned

**What this PR does / why we need it**:
Both logging and returning an error is an antipattern. If the caller wants it logged they will log it. And in this case it will be logged twice which is very confusing for debugging.

**Release note**:
```release-note
NONE
```
/kind cleanup
/sig api-machinery

Kubernetes-commit: 0b5fa0b94a2e147ddae2278623c89648c211d229
2018-04-12 15:18:59 +00:00
Kubernetes Publisher
c0c1344b1f Merge pull request #61400 from natronq/master
Automatic merge from submit-queue (batch tested with PRs 61400, 61048). 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: allow specifying custom resync periods for certain informer types

**What this PR does / why we need it**:
This PR extends the informer code-generator to allow the consumer to specify a custom resync period for certain informer types and uses the default resync period if none is defined.

**Special notes for your reviewer**:
Example:
```go
cs := clientset.NewForConfigOrDie(config)
resyncConfig := externalversions.ResyncConfiguration{
  &samplev1alpha1.Sample{}: 30 * time.Second,
}
informer := externalversions.NewSharedInformerFactory(cs, 2*time.Minute, externalversions.WithCustomResyncConfig(resyncConfig))
```
**Release note**:

```release-note
NONE
```

Kubernetes-commit: 7daaa826d291c1501a52177c3e14b00c503c8527
2018-04-06 23:53:23 +00:00
Kubernetes Publisher
e933a6fa9c Merge pull request #60021 from nikhita/sample-controller-subresources
Automatic merge from submit-queue (batch tested with PRs 60102, 59970, 60021, 62011, 62080). 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>.

sample-controller: add status subresource support

Builds on top of https://github.com/kubernetes/kubernetes/pull/55168.

**DO NOT MERGE** until https://github.com/kubernetes/kubernetes/pull/55168 is merged. Adding a hold.
/hold

Update: It is now merged! 🎉

This PR:

- Adds an example to show how to use the `/status` subresource with custom resources.
- Generates `UpdateStatus` for the `Foo` resource.
- Updates the comment in the controller to mention that `UpdateStatus` can now be used. Note: this is not enabled by default because subresources require the feature gate to be enabled and are not on by default.
- Updates the README to add feature gate information and examples for `CustomResourceSubresources`.
- Updates the README to remove feature gate information for CRD validation since the current example uses `apps/v1` deployments (and thus requires v1.9 anyway).

**Release note**:

```release-note
NONE
```

/assign sttts munnerz

Kubernetes-commit: 7bde13f191f0791a87fe5e2575feb3d4849de536
2018-04-06 12:05:08 +00:00
Kubernetes Publisher
aadb6d02da Merge pull request #62037 from cblecker/godep-bump
Automatic merge from submit-queue (batch tested with PRs 61959, 62037). 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>.

Bump godep version to v80

**What this PR does / why we need it**:
Update the minimum godep, to v80 (supposed to be the final version).

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

Kubernetes-commit: 22440e15764e2d821166eff5b965786fa928357e
2018-04-06 12:04:50 +00:00
Kubernetes Publisher
96b07c14ac Merge pull request #61800 from rithujohn191/remove-gopass
Automatic merge from submit-queue (batch tested with PRs 61818, 61800). 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>.

Replace gopass.GetPasswdMasked() by terminal.ReadPassword()

**What this PR does / why we need it**:
Replace `gopass.GetPasswdMasked()` used for reading passwords from the terminal with [`terminal.ReadPassword()`](https://godoc.org/golang.org/x/crypto/ssh/terminal#ReadPassword). This removes the `gopass` import.

**Special notes for your reviewer**:
Ran the following commands to update `godep` files:
```
./hack/godep-restore.sh -v
./hack/godep-save.sh
./hack/update-staging-godeps.sh
./hack/update-bazel.sh
```

/sig auth
/kind enhancement
/assign @ericchiang

```release-note
NONE
```

Kubernetes-commit: a5133305a9f347c79c20c5785d41cc9400be895e
2018-04-06 12:04:33 +00:00
Christoph Blecker
02b86407e5 Update godep in vendor
Kubernetes-commit: 0828b1999663573b17ded671b7eb89e14faeb4a8
2018-04-02 12:57:41 -07:00
rithu john
ee0bf66a6b *: godep generated code
Kubernetes-commit: 742bb5ea39ed786e565f48d6a2077c848f046783
2018-03-29 17:23:35 -07:00
Kubernetes Publisher
e4d1759a29 Merge pull request #60373 from sttts/sttts-1.10-cfssl
Automatic merge from submit-queue (batch tested with PRs 60373, 61098, 61352, 61359, 61362). 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>.

Bump cfssl to be compatible with Go 1.10

Kubernetes-commit: ef3539e69e4c897f48ecd6b2dd73417ce0416b08
2018-03-22 07:31:04 +00:00
Kubernetes Publisher
637ec76c82 Merge pull request #59172 from fisherxu/removeyear
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>.

Remove YEAR field of all generated files and fix kubernetes boilerplate checker

**What this PR does / why we need it**:
Remove YEAR field of all generated files and fix kubernetes boilerplate checker
xref: [remove YEAR fileds in gengo #91](https://github.com/kubernetes/gengo/pull/91)

**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 [#gengo/issues/24](https://github.com/kubernetes/gengo/issues/24)

**Special notes for your reviewer**:
/cc @thockin @lavalamp @sttts

**Release note**:

```release-note
NONE
```

Kubernetes-commit: e40ffd71972b820aeed283946e880aa2479f8524
2018-03-21 23:28:20 +00:00
Kubernetes Publisher
6ec5f89077 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-01 10:05:18 +00:00
Kubernetes Publisher
000e0e7d07 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 06:05:23 +00:00
Kubernetes Publisher
69c3c8b234 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-27 13:59:28 +00:00