Commit Graph

1103 Commits

Author SHA1 Message Date
Matt Kelly
ae2f680955 Fix typos in configmaplock
Kubernetes-commit: b2342ae9d942af2f6bf572aeb71cce6acaac218b
2018-02-19 14:40:11 -05:00
Jeff Grafton
fca8bb2928 Autogenerated: hack/update-bazel.sh
Kubernetes-commit: ef56a8d6bb3800ab7803713eafc4191e8202ad6e
2018-02-16 13:43:01 -08:00
Slava Semushin
68725b77a4 Update generated files.
Kubernetes-commit: 29514f28834c3e462432afe293bd19bab8746783
2018-02-16 17:23:26 +01:00
Kubernetes Publisher
e00c8f23c0 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-16 13:05:48 +00:00
Jordan Liggitt
dd61bd2530 Split self-signed cert and CA
Kubernetes-commit: 3d3cde45b73ec31c81fadbfd494387d141858a40
2018-02-15 23:30:17 -05:00
Jeff Grafton
4c4a49fdd0 Require boilerplate on Bazel Skylark source files
Kubernetes-commit: 72a59f5826b8decf4395cd0b79896b4785a7bee8
2018-02-15 18:02:24 -08:00
Christoph Blecker
dcf48dd399 Re-add OWNERS files to Godeps/vendor dirs
Kubernetes-commit: 6fb2304f2a6da44e42985ed662d5f7f56215eec6
2018-02-15 13:31:02 -08:00
Kubernetes Publisher
3bf59c62ad 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-14 21:56:44 +00:00
Kubernetes Publisher
5f85fe426e 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-14 17:55:58 +00:00
Kubernetes Publisher
35d357565b Merge pull request #59716 from feiskyer/vmss-disk
Automatic merge from submit-queue (batch tested with PRs 59489, 59716). 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 AzureDisk support for vmss nodes

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

This PR adds AzureDisk support for vmss nodes. Changes include

- Upgrade vmss API to 2017-12-01
- Upgrade vmss clients with new version API
- Abstract AzureDisk operations for vmss and vmas
- Added AzureDisk support for vmss
- Unit tests and fake clients fix

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

**Special notes for your reviewer**:

~~Depending on #59652 (the first two commits are from #59652).~~

**Release note**:

```release-note
Add AzureDisk support for vmss nodes
```

Kubernetes-commit: d89e64110aa47d557a4b133c40b38de1b41ef7f7
2018-02-14 09:55:42 +00:00
Kubernetes Publisher
a82b3b75b2 Merge pull request #59828 from krousey/shared_informer_race
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 a race condition in SharedInformer

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

This fixes a race condition that can occur in the `sharedIndexInformer`

**Which issue(s) this PR fixes**:
Fixes #59822

**Release note**:

```release-note
Fixed a race condition in k8s.io/client-go/tools/cache.SharedInformer that could violate the sequential delivery guarantee and cause panics on shutdown.
```

Kubernetes-commit: 6590ea6d5d50700d34255b1e037b2702ad26b7fc
2018-02-14 01:55:53 +00:00
Kris
5c864f2fba Add started state to the processor to protect against double starts
This prevents a race condition where the sharedIndexInformer was
causeing the processorListener's run and pop method to be started
twice. That violated the SharedInformer's interface guarantee of
sequential delivery and also caused panics on shutdown.

Kubernetes-commit: 3c36d9e373d8e272ad303f359d040621edeb999e
2018-02-13 11:33:21 -08:00
Kris
3f0de10d86 Add a test case for the race in #59822
Kubernetes-commit: be482ad51c21d493f4b83de9aa06c511a552b5b1
2018-02-13 11:32:36 -08:00
Davanum Srinivas
39577c6be1 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
Pengfei Ni
2e7a6d75a5 Fix godeps for client-go
Kubernetes-commit: 1d3cf76d759c34f6f66116a5ff3f73e02522f9fc
2018-02-12 09:24:31 +08:00
Wang Guoliang
d90294e8f9 should use time.Since instead of time.Now().Sub
Kubernetes-commit: 89669283fe84619f0c15af8495ccb28a752bb1e8
2018-02-11 21:17:00 +08:00
Wang Guoliang
a8dc497f30 fix some syntax related errors
Kubernetes-commit: d065157dd74fa02eec87f5849528b079a3736c3d
2018-02-11 19:50:49 +08:00
Kubernetes Publisher
7cd1d3291b Merge pull request #59464 from dixudx/fix_all_typos
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 all the typos across the project

**What this PR does / why we need it**:
There are lots of typos across the project. We should avoid small PRs on fixing those annoying typos, which is time-consuming and low efficient.

This PR does fix all the typos across the project currently. And with #59463, typos could be avoided when a new PR gets merged.

**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**:
/sig testing
/area test-infra
/sig release
/cc @ixdy
/assign @fejta

**Release note**:

```release-note
None
```

Kubernetes-commit: 317853c90c674920bfbbdac54fe66092ddc9f15f
2018-02-11 09:11:33 +00:00
Di Xu
d39d12f4b0 fix all the typos across the project
Kubernetes-commit: 48388fec7eaad4ac8d84fbe20673ffacf41964a1
2018-02-09 14:53:53 +08:00
Haowei Cai
93a87a9af9 Dynamic client support subresource create/get/update/patch verbs
Kubernetes-commit: e10cdb3b0f42bafcdf1d1a95e6fb14cbfe2b4ab7
2018-02-07 16:04:02 -08:00
Eric Chiang
29c5d6f1b6 generated
Kubernetes-commit: 01801ae13a86c10cd343c329f5224ab47272f826
2018-02-07 15:48:46 -08:00
Eric Chiang
19c591bac2 client-go: add an exec-based client auth provider
Kubernetes-commit: 6463e9efd9ba552e60d2555a3e6526ef90196473
2018-02-07 15:43:12 -08:00
Kubernetes Publisher
33bd23f75b Merge pull request #51042 from soltysh/request_timeout
Automatic merge from submit-queue (batch tested with PRs 59276, 51042, 58973, 59377, 59472). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

Allow passing request-timeout from NewRequest all the way down

**What this PR does / why we need it**:
Currently if you pass `--request-timeout` it's not passed all the way down to the actual request object. There's a separate field on the `Request` object that allows setting that timeout, but it's not taken from that flag.

@smarterclayton @deads2k ptal, this is coming from https://github.com/openshift/origin/pull/13701

Kubernetes-commit: 1f6251444b7dad7f5d924acbfb366541f2a6fb99
2018-02-07 21:11:17 +00:00
Kubernetes Publisher
5e622f37cd Merge pull request #58317 from nikhita/bump-go-yaml
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>.

bump(670d4c): gopkg.in/yaml.v2: fix parsing for non-specific tags

Fixes #56976

Fixes this bug - https://github.com/go-yaml/yaml/issues/75 - in `go-yaml`. The fix for this bug is at 670d4cfef0.

**Release note**:

```release-note
NONE
```

/cc sttts caesarxuchao jennybuckley

Kubernetes-commit: 4e2c3f060a873a0b727dbd3e66047a3b2858db97
2018-02-06 05:11:34 +00:00
Mike Danese
d5f7182e00 add support for /token subresource in serviceaccount registry
Kubernetes-commit: 8ad1c6655bde4ca8d61c3574980cffce5ee937a5
2018-02-05 20:53:25 -08:00
Kubernetes Publisher
4def1285ff Merge pull request #59059 from smarterclayton/move_partial_object
Automatic merge from submit-queue (batch tested with PRs 59158, 38320, 59059, 55516, 59357). 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>.

Promote v1alpha1 meta to v1beta1

No code changes, just renames. We can discuss if there are any field / naming changes here or in a follow-up

Parent #58536
Fixes #53224
Prereq to #55637

@kubernetes/sig-api-machinery-pr-reviews @deads2k

```release-note
The `meta.k8s.io/v1alpha1` objects for retrieving tabular responses from the server (`Table`) or fetching just the `ObjectMeta` for an object (as `PartialObjectMetadata`) are now beta as part of `meta.k8s.io/v1beta1`.  Clients may request alternate representations of normal Kubernetes objects by passing an `Accept` header like `application/json;as=Table;g=meta.k8s.io;v=v1beta1` or `application/json;as=PartialObjectMetadata;g=meta.k8s.io;v1=v1beta1`.  Older servers will ignore this representation or return an error if it is not available.  Clients may request fallback to the normal object by adding a non-qualified mime-type to their `Accept` header like `application/json` - the server will then respond with either the alternate representation if it is supported or the fallback mime-type which is the normal object response.
```

Kubernetes-commit: 9ee71b720ed2300d6298bb936d0a7873b5ecf2ac
2018-02-05 21:12:06 +00:00
Kubernetes Publisher
bd9218ea5f Merge pull request #38320 from liggitt/golang-ratelimit
Automatic merge from submit-queue (batch tested with PRs 59158, 38320, 59059, 55516, 59357). 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>.

Switch from juju/ratelimit to golang.org/x/time/rate

Replaces juju/ratelimit with golang.org/x/time/rate
xref https://github.com/kubernetes/steering/issues/21

Requires removing the Saturation() method on the rate limiter. In the process of attempting to contribute it to the `golang.org/x/time/rate` implementation, it became clear that what it was calculating was not very useful when combined with periodic polling. See discussion in https://go-review.googlesource.com/c/time/+/29958#message-4caffc11669cadd90e2da4c05122cfec50ea6a22

```release-note
NONE
```

Kubernetes-commit: 0656d030a7d131ca8088a9f0ecd12596eb90d2fd
2018-02-05 21:11:49 +00:00
Kubernetes Publisher
847d15469a Merge pull request #59342 from nikhita/discovery-corev1-order
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>.

core/v1 should be first in the discovery order

Currently, `core/v1` is at the end of the discovery order.

See https://github.com/kubernetes/kubernetes/issues/42521#issuecomment-360517775.

**Release note**:

```release-note
NONE
```

/assign sttts liggitt

Kubernetes-commit: d8928efc8a0742d245af357e66ff264ac17327ca
2018-02-05 17:11:36 +00:00
juanvallejo
c4ff8ae9ca update -o name format to kind.group/name
Kubernetes-commit: 765f9ec68b0d0759e64d474f9dfb3bf22c24cadf
2018-02-05 11:21:00 -05:00
Nikhita Raghunath
c4f02185e3 core/v1 should be first in discovery order
Currently, core/v1 is in the end of the discovery order.

Since core/v1 is special, it should be in the beginning.

Kubernetes-commit: 45950fdb750d7ac12cec3b9ef3487baa99a40401
2018-02-05 15:04:29 +05:30
Kubernetes Publisher
e2d750fcad Merge pull request #59195 from pigletfly/fix-typo
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 typos

**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: c6e581ff42bff91337565836834b76a1601be936
2018-02-04 17:11:24 +00:00
Kubernetes Publisher
d8fcdee8ff Merge pull request #59135 from halfcrazy/typo
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>.

doc: fix typo in client-go

**What this PR does / why we need it**:
Fix typo in package client-go.

**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: c047b8dbc1d3ad93ceadb865cd4ecc3a07231a7d
2018-02-04 17:11:07 +00:00
Kubernetes Publisher
63d0eb0002 Merge pull request #59265 from yue9944882/fix-irregular-docs-typo-ish
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(doc): irregular descriptive docs

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

Fixes documentations.

**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: c52192f33bf83638aee5ef055d7efca887af1a5c
2018-02-04 13:11:07 +00:00
Cao Shufeng
a52532be7b fix assert.Equal argument order
Reference:
https://godoc.org/github.com/stretchr/testify/assert#Equal

Kubernetes-commit: f95bc9289d684d311c54ff66adc2dd50a4af8143
2018-02-04 15:14:55 +08:00
Clayton Coleman
b30485cc03 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
Kubernetes Publisher
059133e3e3 Merge pull request #59198 from liubin/fix1
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 typos

Fix typos in source code's comment.

Kubernetes-commit: 11576c3650f64a3d1c4e4c6a2a050f5181690bca
2018-02-02 17:11:06 +00:00
yue9944882
3c4da130df fix irregular descriptive docs
Kubernetes-commit: dc2f6f9325008dbdb32acef5b1ceb80b67df0df6
2018-02-02 21:05:49 +08:00
Kubernetes Publisher
2f62824dde Merge pull request #58462 from NickrenREN/va-to-beta
Automatic merge from submit-queue. If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

Add V1beta1 VolumeAttachment API

**What this PR does / why we need it**:
Add V1beta1 VolumeAttachment API, co-existing with Alpha API object

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

**Special notes for your reviewer**:

**Release note**:
```release-note
Add V1beta1 VolumeAttachment API, co-existing with Alpha API object
```

Kubernetes-commit: 8363129ee6da255ca9fe5c7d62596a3a19378abb
2018-02-02 05:10:54 +00:00
Kubernetes Publisher
ffc92ea3a9 Merge pull request #58930 from smarterclayton/background_rotate
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>.

Only rotate certificates in the background

Change the Kubelet to not block until the first certs have rotated (we didn't act on it anyway) and fall back to the bootstrap cert if the most recent rotated cert is expired on startup.

The certificate manager originally had a "block on startup" rotation behavior to ensure at least one rotation happened on startup. However, since rotation may not succeed within the first time window the code was changed to simply print the error rather than return it. This meant that the blocking rotation has no purpose - it cannot cause the kubelet to fail, and it *does* block the kubelet from starting static pods before the api server becomes available.

The current block behavior causes a bootstrapped kubelet that is also set to run static pods to wait several minutes before actually launching the static pods, which means self-hosted masters using static pods have a pointless delay on startup.

Since blocking rotation has no benefit and can't actually fail startup, this commit removes the blocking behavior and simplifies the code at the same time. The goroutine for rotation now completely owns the deadline, the shouldRotate() method is removed, and the method that sets rotationDeadline now returns it. We also explicitly guard against a negative sleep interval and omit the message.

Should have no impact on bootstrapping except the removal of a long delay on startup before static pods start.

The other change is that an expired certificate from the cert manager is *not* considered a valid cert, which triggers an immediate rotation.  This causes the cert manager to fall back to the original bootstrap certificate until a new certificate is issued.  This allows the bootstrap certificate on masters to be "higher powered" and allow the node to function prior to initial approval, which means someone configuring the masters with a pre-generated client cert can be guaranteed that the kubelet will be able to communicate to report self-hosted static pod status, even if the first client rotation hasn't happened.  This makes master self-hosting more predictable for static configuration environments.

```release-note
When using client or server certificate rotation, the Kubelet will no longer wait until the initial rotation succeeds or fails before starting static pods.  This makes running self-hosted masters with rotation more predictable.
```

Kubernetes-commit: 06472a054a69c0aa0c7cb29697c334704feeb5eb
2018-02-01 21:10:53 +00:00
bin liu
526671fd79 Fix typos
Kubernetes-commit: 4260bf2a2bbc7301072860567537d30ea413c395
2018-02-01 19:53:51 +08:00
pigletfly
68154ad48f Fix typo
Kubernetes-commit: 5eba676508af6571e38b8b37dd4cde6efd33acd3
2018-02-01 19:11:19 +08:00
Haowei Cai
3bf2cc9238 Add comments about potential race in delta fifo.
Kubernetes-commit: 8b03e77aec6fe9496edf51ba11d580c460e8fb5e
2018-01-31 15:22:09 -08:00
halfcrazy
b6a34c5a00 fix typo in client-go
Kubernetes-commit: 86801dee64215e76080fe8df83ffd1fb7df9e093
2018-02-01 02:33:45 +08:00
Kubernetes Publisher
4b76cf9824 Merge pull request #57457 from vfreex/fix-port-forward-ipv6
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: Fix broken TCP6 listen for port forwarding

**What this PR does / why we need it**:
The IPV6 loopback address `::1` is enclosed in square brackets twice,
which cause a failure to listen on the TCP6 port.

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

**Special notes for your reviewer**:

**Release note**:

```release-note
Fix an issue where port forwarding doesn't forward local TCP6 ports to the pod
```
/area ipv6
/sig cli

Kubernetes-commit: a241087f9966deef6175a370da060f9623e92d94
2018-01-31 13:10:54 +00:00
NickrenREN
b719749aa6 update all
Kubernetes-commit: 8915e275c0a04461b67251e67d693e8cb7b06b12
2018-01-31 18:09:44 +08:00
Clayton Coleman
7e1535c0b5 Promote v1alpha1 meta to v1beta1
No code changes, just renames

Kubernetes-commit: d07a608607e1f4d252003c17cd615652574a0823
2018-01-30 13:30:57 -05:00
Kubernetes Publisher
9f7db9794b Merge pull request #58971 from deads2k/client-01-prefix
Automatic merge from submit-queue (batch tested with PRs 58955, 58968, 58971, 58963, 58298). 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 dead prefix field

The `Prefix` field was never used.

Kubernetes-commit: 946b1f023ffc8dc1c0f713f4cc75206252c1e197
2018-01-30 01:11:33 +00:00
David Eads
c673e31530 remove dead prefix field
Kubernetes-commit: e7b6d77c7ec39b00da7215626cef3c0ae87fca3c
2018-01-29 11:30:14 -05:00
Clayton Coleman
3f65b38279 Only rotate certificates in the background
The certificate manager originally had a "block on startup" rotation
behavior to ensure at least one rotation happened on startup. However,
since rotation may not succeed within the first time window the code was
changed to simply print the error rather than return it. This meant that
the blocking rotation has no purpose - it cannot cause the kubelet to
fail, and it *does* block the kubelet from starting static pods before
the api server becomes available.

The current block behavior causes a bootstrapped kubelet that is also
set to run static pods to wait several minutes before actually launching
the static pods, which means self-hosted masters using static pods have
a pointless delay on startup.

Since blocking rotation has no benefit and can't actually fail startup,
this commit removes the blocking behavior and simplifies the code at the
same time. The goroutine for rotation now completely owns the deadline,
the shouldRotate() method is removed, and the method that sets
rotationDeadline now returns it. We also explicitly guard against a
negative sleep interval and omit the message.

Should have no impact on bootstrapping except the removal of a long
delay on startup before static pods start.

Also add a guard condition where if the current cert in the store is
expired, we fall back to the bootstrap cert initially (we use the
bootstrap cert to communicate with the server). This is consistent with
when we don't have a cert yet.

Kubernetes-commit: 44493de195d89ec43cc7246af921e626e0002c16
2018-01-28 14:28:28 -05:00
Kubernetes Publisher
91392bcd63 Merge pull request #58141 from ahmetb/configurable-scopes
Automatic merge from submit-queue (batch tested with PRs 58903, 58141, 58900). 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>.

auth/gcp: configurable scopes for gcp default credentials

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

- add `config.scopes` field comma-separated scope URLs, to be used with Google
  Application Default Credentials (i.e. GOOGLE_APPLICATION_CREDENTIALS env)
- users now should be able to set a gserviceaccount key in GOOGLE_APPLICATION_CREDENTIALS
  env, craft a kubeconfig file with GKE master IP+CA cert and should be able to authenticate
  to GKE in headless mode _without requiring gcloud_ CLI, and they can now use the
  email address of the gserviceaccount in RBAC role bindings and _not use Google Cloud IAM at all._
- gcp default scopes now include userinfo.email scope, so authenticating to GKE
  using gserviceaccount keys can now be done without gcloud as well.
- since userinfo.email scope is now a default, users who have existing RBAC bindings
  that use numeric uniqueID of the gserviceaccount will be broken (this behavior was
  never documented/guaranteed). from now on email address of the service account
  should be used as the subject in RBAC Role Bindings.

**Release note**:
```release-note
Google Cloud Service Account email addresses can now be used in RBAC
Role bindings since the default scopes now include the "userinfo.email"
scope. This is a breaking change if the numeric uniqueIDs of the Google
service accounts were being used in RBAC role bindings. The behavior
can be overridden by explicitly specifying the scope values as
comma-separated string in the "users[*].config.scopes" field in the
KUBECONFIG file.
```

/assign @cjcullen
/sig gcp

Kubernetes-commit: 6ef0514bd94e184f51960f0545095f0fae4964b4
2018-01-27 05:11:15 +00:00