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>.
fixtodo:generate an event for a missed starting window
**What this PR does / why we need it**:
fixtodo:generate an event for a missed starting window
**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
```
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
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 the "create-update-delete-deployment" example to use apps/v1 and removed rollback example
**What this PR does / why we need it**:
*Waiting for migration to apps/v1*
> The current example at [create-update-delete-deployment/main.go](https://github.com/kubernetes/kubernetes/blob/master/staging/src/k8s.io/client-go/examples/create-update-delete-deployment/main.go) was using `RollbackTo` of `v1beta1.DeploymentSpec` which is deprecated.
The current implementation upgrades `create-update-delete-deployment` main.go to use **apps/v1** instead of **extensions/v1beta1** and removed rollback example for now.
**Which issue(s) this PR fixes**
Helps kubernetes/client-go#346
**Special notes for your reviewer**:
Since it's my first PR dealing with codebase and not a typo fix :xD please let me know my mistakes.
I would love to resolve them.
@nikhita @sttts @jekohk Please review. The other PR #59663 got closed accidentally while changing branch.
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>.
fixes#54017, remove deprecated --mode flag
**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#54017
**Special notes for your reviewer**:
**Release note**:
```release-note
remove deprecated --mode flag in check-network-mode
```
Automatic merge from submit-queue (batch tested with PRs 62063, 62169, 62155, 62139, 61445). 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>.
Schedule even if extender is not available when using extender
**What this PR does / why we need it**:
When using scheduler extender, if the extender is not available scheduling of all pods fail.
We should let the scheduling happen but display error message that extender is failing.
`IsIgnorable()` is added to extender to indicate: if scheduling of all pods should fail when it's unavailable
**Backward compabtiility:**
We use `IsIgnorable` instead of `IsCritical` so that when this flag is not set, the default value will be `false`, i.e. not ignorable, which consistent with the current behavior in existing extenders.
**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: #60616
**Special notes for your reviewer**:
kindly cc @ravisantoshgudimetla to see if this meets your expectation
TODO: update the examples in kubernetes/examples, but the strategy there is not clear to me for now
**Release note**:
```release-note
Schedule even if extender is not available when using extender
```
Automatic merge from submit-queue (batch tested with PRs 62063, 62169, 62155, 62139, 61445). 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>.
begin wiring printflags through set cmds
**Release note**:
```release-note
NONE
```
Begin wiring PrintFlags struct through commands
cc @deads2k @soltysh
Automatic merge from submit-queue (batch tested with PRs 62063, 62169, 62155, 62139, 61445). 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>.
Wait longer in pod cleanup
I've checked the [garbage collector tests](827b3d77cd/test/e2e/apimachinery/garbage_collector.go (L557)) and usually they're waiting up to a minute to clean the resources. So I'm proposing to use that same values when waiting for the pod cleanup. I was not able to reproduce the problem locally, but from reading the logs it looks like the problem might be with just the timing nothing else.
Related to #61484
/assign @Liujingfang1 @mengqiy
Automatic merge from submit-queue (batch tested with PRs 62063, 62169, 62155, 62139, 61445). 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>.
juju: Set apiserver advertise-address to kube-control ingress address
**What this PR does / why we need it**:
This fixes pod->apiserver traffic not obeying Juju network space bindings, by setting `--advertise-address` on kube-apiserver to the ingress address of the kube-control relation.
**Release note**:
```release-note
NONE
```
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 UnstructuredContent return contents without mutating the source
**What this PR does / why we need it**:
This PR solves the issues described in #56316
Before this change:
- A call to `UnstructuredContent()` potentially modified `Object`
- The values returned by `UnstructuredContent()` could be manipulated to modify the value in `Object`. Going through the history it looks like this behavior was added before the addition of `SetUnstructuredContent()`. IMO it makes more sense now to use `SetUnstructuredContent()` or make changes to the exposed `Object` property
- `UnstructuredList` did not implement the behavior described in the godoc. The godoc stated that the value returned should be mutable, but if u.Object == nil the map returned had no effect on Object
With this PR I'm proposing `UnstructuredContent()` returns the data without providing the contract of a mutable map. It also ensures all implementations of the `Unstructured` interface abide by the doc
**Which issue(s) this PR fixes**:
Fixes#56316
**Special notes for your reviewer**:
This PR continues work started in #57713.
**Release note**:
```release-note
NONE
```
/kind bug
/sig api-machinery
/cc sttts deads2k
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 OWNERS labels for cluster-lifecycle and scheduling
**What this PR does / why we need it**:
Updates auto labeling to make everyone's lives easier.
**Special notes for your reviewer**:
**Release note**:
```
NONE
```
/cc @kubernetes/sig-cluster-lifecycle-pr-reviews @kubernetes/sig-scheduling-pr-reviews
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 pvc node affinity update check since beta NodeAffinity is immu…
…table
**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)*:
xref https://github.com/kubernetes/kubernetes/pull/61816#discussion_r178212208
**Special notes for your reviewer**:
/assign @msau42
**Release note**:
```release-note
NONE
```
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 a func to merge multiple Strategic Merge Patches into one patch
This PR is adding a function similar to 9fa11df836/merge.go (L95-L100)
It merges multiple SMPs and yield another SMP.
This PR has no risk to existing SMP code.
```release-note
NONE
```
/cc @apelisse
/assign @pwittrock
Mac OS X was renamed to OS X in 2012, and then renamed again to macOS in 2016.
I suggest that the current name should be used when referencing the Apple OS.
Automatic merge from submit-queue (batch tested with PRs 62162, 60628, 62172). 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>.
When using custom network with IP-alias, use the former's subnet for the latter too
Currently, when we're using custom subnet and ip-alias simultaneously, the cluster fails to come up.
The reason is because we're creating a subnet in the former with one name, but expecting a differently named subnet for the latter.
This is causing [continuous failures in our 100-node job](https://k8s-testgrid.appspot.com/sig-scalability-gce#gce) where I recently turned both of them on.
cc @kubernetes/sig-network-bugs
```release-note
NONE
```
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>.
apiserver: enforce global RequestContextMapper in delegation chain
Having a request context mapper in the generic config makes it easy to forget setting
a common mapper for the whole delegation chain. This PR moves it into the New
constructors that already have the delegationTarget argument. So it is obvious
that the mapper is passed down as well.
Fixes https://github.com/kubernetes/kubernetes/issues/60610
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 bad column alignment when using custom columns from OpenAPI schema
Columns printed by `kubectl get` weren't aligned properly when they were coming from the OpenAPI schema.
This was caused by `CustomColumnPrinter.PrintObj`, which was creating a new `tabwriter.Writer` instead of re-using the tabwriter received through the `out` method parameter (basically, a tabwriter was writing to another tabwriter). Because the PrintObj flushed the tabwriter after writing each individual line, the column widths would reset.
**What this PR does / why we need it**:
This PR fixes the bad column alignment.
**Which issue(s) this PR fixes**
Fixes#56282
**Special notes for your reviewer**:
I've aligned how `CustomColumnPrinter.PrintObj` handles tabwriter with how `HumanReadablePrinter.PrintObj` does it (see https://github.com/kubernetes/kubernetes/blob/master/pkg/printers/humanreadable.go#L299-L303)
**Release note**:
```release-note
Fixed column alignment when kubectl get is used with custom columns from OpenAPI schema
```
Automatic merge from submit-queue (batch tested with PRs 62043, 62168). 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 typo that redefines variable and breaks code
**What this PR does / why we need it**:
Fixes bug in `rbd_util.go`, where a variable is overriden in `if` scope.
**Which issue(s) this PR fixes**
Fixes#32266
**Special notes for your reviewer**:
This is related to the PR: https://github.com/kubernetes/kubernetes/pull/58916 This can not work, as the variable `nbdToolsFound` is changed only in local scope of `if` and is always `false` outside.
**Release note**:
```release-note
Fixes bug in rbd-nbd utility when rbd is used.
```
Automatic merge from submit-queue (batch tested with PRs 62043, 62168). 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 the stackdriver agents yaml to include a deployment for cluster level resources
**What this PR does / why we need it**: This PR introduces a Deployment based on the stackdriver metadata agent, that will allow users to collect cluster level metadata like unscheduled pods, and services.
```release-note
Add support to ingest service level metadata against the "k8s_cluster" resource.
```
Automatic merge from submit-queue (batch tested with PRs 62142, 62137, 62150, 62110). 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 subnet-id annotation for openstack cloud provider
Currently user only specify subnet-id in cloud.conf file.
If user want to specify other subnet for some special services,
the subnet-id annotation should be a good choice.
**Release note**:
```release-note
NONE
```
cc @sapham
Automatic merge from submit-queue (batch tested with PRs 62142, 62137, 62150, 62110). 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 bug in Deployment controller when comparing templates
**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#61639
**Special notes for your reviewer**:
**Release note**:
```release-note
NONE
```
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>.
Adding a kubemci e2e test to verify that single and multicluster ingresses can exist together
Adding an e2e test to verify that single and multicluster ingresses can exist together.
This is the first test that creates 2 ingresses, so there is some funkiness in having to update jig.Ingress and jig.Class since the jig assumes that there is only one ingress in each test.
cc @nicksardo @G-Harmon @csbell
```release-note
NONE
```
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>.
Fixing ip address leak in kubemci e2e tests by always cleaning up cloud resources
Updating AfterEach in kubemci e2e tests to always call CleanupGCEIngressController, even when the ingress has already been deleted.
This is required to delete the IP address.
Our e2e tests are failing right now due to leaking IP addresses: https://k8s-testgrid.appspot.com/sig-multicluster-kubemci#kubemci-ingress-conformance
Relevant log:
https://storage.googleapis.com/kubernetes-jenkins/logs/ci-kubemci-ingress-conformance/1085/build-log.txt
```
W0403 17:45:06.821] 2018/04/03 17:45:06 main.go:299: Something went wrong: encountered 1 errors: [Error: 2 leaked resources
W0403 17:45:06.821] [ addresses ]
W0403 17:45:06.821] +NAME REGION ADDRESS STATUS
W0403 17:45:06.822] +kubemci-edf6f1d1-3761-11e8-bd10-0a580a3c52c2 35.201.100.224 RESERVED]
```
cc @G-Harmon @nicksardo @MrHohn
```release-note
NONE
```
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>.
Ensure /etc/hosts has a header always - Fix conformance test
**What this PR does / why we need it**:
We need to be able to tell if an /etc/hosts in a container has been touched by kubernetes or not (whether we use the host network or not).
We have 2 scenarios where we copy /etc/hosts
- with host network (we just copy the /etc/hosts from node)
- without host network (create a fresh /etc/hosts from pod info)
We are having trouble figuring out whether a /etc/hosts in a
pod/container has been "fixed-up" or not. And whether we used
host network or a fresh /etc/hosts in the various ways we start
up the tests which are:
- VM/box against a remote cluster
- As a container inside the k8s cluster
- DIND scenario in CI where test runs inside a managed container
Please see previous mis-guided attempt to fix this problem at
ba20e63446 In this commit we revert
the code from there as well.
So we should make sure:
- we always add a header if we touched the file
- we add slightly different headers so we can figure out if we used the
host network or not.
**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#60938
**Special notes for your reviewer**:
Also see
- https://github.com/kubernetes/kubernetes/pull/61405
- https://github.com/kubernetes/kubernetes/pull/60939
- https://github.com/kubernetes/kubernetes/issues/60938
**Release note**:
```release-note
NONE
```
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 COS version in Kubernetes GCE default and test
**What this PR does / why we need it**:
Set the default to cos-stable-65 (which is what we are using on GKE for latest 1.9 and 1.8) and set config-test to use cos-beta-66, so that we can get more exposure to it.
The testgrid seems to be fairly happy with these images. (both e2e-gce-cosdev-k8sdev-default and e2e-gce-cosbeta-k8sdev-default are genrally green.)
/cc @yguo0905 @yujuhong
**Which issue(s) this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close the issue(s) when PR gets merged)*:
N/A
**Special notes for your reviewer**:
N/A
**Release note**:
```release-note
NONE
```