Automatic merge from submit-queue
Make kube::util::ensure_clean_working_dir more verbose in log files
Makes it easier to understand why files seem to be changed during CI build, especially
autogenerated files like conversions.
Automatic merge from submit-queue
Use nodePortOp for allocating healthCheck nodePort
**What this PR does / why we need it**: Allocate healthCheck nodePort via nodePortOp so that we won't leak port on failure.
**Which issue this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close that issue when PR gets merged)*: fixes#49999
**Special notes for your reviewer**:
/assign @xiangpengzhao @thockin
**Release note**:
```release-note
NONE
```
Automatic merge from submit-queue
Bump Cluster Autoscaler to 0.6.1
Couple minor bugfixes and godep refresh.
Do not merge until I complete the tests.
```release-note
Cluster Autoscaler - fixes issues with taints and updates kube-proxy cpu request.
```
Automatic merge from submit-queue
Fix error message of statefulset test
**What this PR does / why we need it**:
Fix error message of statefulset test
It should be 0 replocas in the error message.
And fix typo from Falied to Failed
**Which issue this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close that issue when PR gets merged)*: fixes https://github.com/kubernetes/kubernetes/issues/50592
**Special notes for your reviewer**:
**Release note**:
```release-note
NONE
```
Automatic merge from submit-queue (batch tested with PRs 50694, 50702)
Allow injection of policy in RBAC post start hook
This change allows the RBAC PostStartHook logic to be reused with different policy data when bootstrapping the cluster. Thus any changes to the bootstrap logic are separated from the policy data.
Signed-off-by: Monis Khan <mkhan@redhat.com>
```release-note
NONE
```
@kubernetes/sig-auth-pr-reviews
Automatic merge from submit-queue (batch tested with PRs 50694, 50702)
Fix make cross build failure
**What this PR does / why we need it**:
had to fix the method getSecurityOpts in helpers_windows.go to
match the implementation in helpers_linux.go from commit:
bf01fa2f00
**Which issue this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close that issue when PR gets merged)*: fixes #
Fixes#50675
**Special notes for your reviewer**:
**Release note**:
```release-note
NONE
```
Automatic merge from submit-queue
Adds IPv6 test case to kubeadm bootstrap
**What this PR does / why we need it**:
Adds IPv6 test cases in support of kubeadm bootstrap functionality. It's needed to ensure test cases cover IPv6 related networking scenarios.
**Which issue this PR fixes**
This PR is in support of Issue #1443 and Issue #47666
**Special notes for your reviewer**:
Additional PR's will follow to ensure kubeadm fully supports IPv6.
**Release note**:
```NONE
```
/area ipv6
Automatic merge from submit-queue (batch tested with PRs 50198, 49051, 48432)
New kubectl command: `kubectl set service-account`
**What this PR does / why we need it**:
Adds a command to update serviceaccount of resources with pod template
**Which issue this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close that issue when PR gets merged)*: fixes #
fixes#45147
**Special notes for your reviewer**:
**Release note**:
```
NONE
```
Automatic merge from submit-queue (batch tested with PRs 50198, 49051, 48432)
move KubeletConfiguration out of componentconfig API group
I'm splitting #44252 into more manageable steps. This step moves the types and updates references.
To reviewers: the most important changes are the removals from pkg/apis/componentconfig and additions to pkg/kubelet/apis/kubeletconfig. Almost everything else is an import or name update.
I have one unanswered question: Should I create a whole new api scheme for Kubelet APIs rather than register e.g. a kubeletconfig group with the default runtime.Scheme instance? This feels like the right thing, as the Kubelet should be exposing its own API, but there's a big fat warning not to do this in `pkg/api/register.go`. Can anyone answer this?
Automatic merge from submit-queue (batch tested with PRs 50198, 49051, 48432)
Add prefix to common networking e2e tests
**What this PR does / why we need it**:
Common networking e2e tests shared by node and cluster suites should also have prefix `[sig-network]`.
**Which issue this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close that issue when PR gets merged)*: fixes #
Umbrella issue #49161
**Special notes for your reviewer**:
/cc @bowei
**Release note**:
```release-note
NONE
```
This change allows the RBAC PostStartHook logic to be reused with
different policy data when bootstrapping the cluster. Thus any
changes to the bootstrap logic are separated from the policy data.
Signed-off-by: Monis Khan <mkhan@redhat.com>
Automatic merge from submit-queue (batch tested with PRs 50023, 50639)
Extend SetHeader Requests method ito accept multiple values
This allows to set headers that are multivalued directly.
The headers variable is not directly accessible and currently
SetHeaders allows to set only one value.
```release-note
NONE
```
Automatic merge from submit-queue (batch tested with PRs 50023, 50639)
Correct case for starting character of option string
**What this PR does / why we need it**:
Kubectl-conventions.md states:
"Flag descriptions should start with an uppercase letter and not have a period at the end of a sentence"
There are numerous cases where this is violated in `kubectl/cmd`. This PR is the result of an audit of all source files under `kublet/cmd` and corrects the case of the initial Flag description character.
/sig cli
/kind cleanup
/kind documentation
**Release note**:
```release-note
NONE
```
Automatic merge from submit-queue (batch tested with PRs 50626, 50683, 50679, 50684, 50460)
Specify node labels for fakeVolumeHost
**What this PR does / why we need it**:
Adds ability to set arbitrary node labels to type `fakeVolumeHost`.
Allows creation of tests of code that depends on reading node labels using `fakeVolumeHost.GetNodeLabels() `.
**Release note**:
```release-note
NONE
```
Automatic merge from submit-queue (batch tested with PRs 50626, 50683, 50679, 50684, 50460)
Base Fluentd image off debian:stretch-slim for systemd with LZ4
To avoid having to copy libsystemd from host system, base off image with LZ4 capable systemd.
Fixes#50242.
```release-notes
fluentd-elasticsearch addon: change the fluentd base image to fix crashes on systems with non-standard systemd installation
```
Automatic merge from submit-queue (batch tested with PRs 50626, 50683, 50679, 50684, 50460)
kubeadm: Centralize client create-or-update logic in one package
**What this PR does / why we need it**:
Moves all Create-or-Update logic into one package instead of duplicating that logic all around in the codebase.
**Which issue this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close that issue when PR gets merged)*: fixes #
**Special notes for your reviewer**:
This PR depends on https://github.com/kubernetes/kubernetes/pull/50214.
Note that commit 2 is the only one that needs reviewing.
This PR is required for https://github.com/kubernetes/kubernetes/pull/48899 (kubeadm upgrade)
**Release note**:
```release-note
NONE
```
@kubernetes/sig-cluster-lifecycle-pr-reviews @mattmoyer @fabriziopandini
Automatic merge from submit-queue
advanced audit: shutdown batching audit webhook gracefully
Follow-up of https://github.com/kubernetes/kubernetes/pull/50439
When the `stopCh` passed to the batching audit webhook is closed, it stops accepting new events and when `Shutdown` method is called afterwards, it blocks until the last request to the webhook has finished.
/cc @tallclair @soltysh
Automatic merge from submit-queue
FeatureGate: update comments
The godoc - https://godoc.org/k8s.io/apiserver/pkg/util/feature - does not contain descriptions of the functions. This PR adds them.
**Release note**:
```release-note
NONE
```
/cc @sttts
Automatic merge from submit-queue
Add Priority admission controller
**What this PR does / why we need it**: Add Priority admission controller. This admission controller checks creation and update of PriorityClasses. It also resolves a PriorityClass name of a pod to its integer value.
**Which issue this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close that issue when PR gets merged)*: fixes #
**Special notes for your reviewer**:
**Release note**:
```release-note
Add Priority admission controller for monitoring and resolving PriorityClasses.
```
ref/ #47604
ref/ #48646
Automatic merge from submit-queue
apiservers: add synchronous shutdown mechanism on SIGTERM+INT
This is used to shutdown the auditing backend in order not to drop any pending events on the floor.
Automatic merge from submit-queue
[Federation] Fix flake in TestUpdateClusterRace
**What this PR does / why we need it**:
Fix#50262
**Which issue this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close that issue when PR gets merged)*: fixes#50262
**Special notes for your reviewer**:
Although we do locking/unlocking while using protected data in ClusterController, there are chances that `clusterClient` can be deleted as it is a pointer. Also its better to lock/unlock once for the function `UpdateClusterStatus` instead of multiple locks/unlocks.
**Release note**:
```
NONE
```
/assign @madhusudancs
/cc @dminh @kubernetes/sig-federation-bugs
Automatic merge from submit-queue
Remove the status of the terminated containers in the summary endpoint
Ref: https://github.com/kubernetes/kubernetes/issues/47853
- When building summary, a container is considered to be terminated if it has an older creation time and no CPU instantaneous or memory RSS usage.
- We remove the terminated containers in the summary by grouping the containers with the same name in the same pod, sorting them in each group by creation time, and skipping the oldest ones with no usage in each group. Let me know if there's simpler way.
**Release note**:
```
None
```
/assign @yujuhong
Automatic merge from submit-queue
Cleanup DaemonSet templateGeneration
**What this PR does / why we need it**:
**Which issue this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close that issue when PR gets merged)*: fixes#49336
**Special notes for your reviewer**:
/cc @janetkuo @foxish
~~Depends on #49071~~ (Merged)
**Release note**:
```release-note
None
```
Automatic merge from submit-queue (batch tested with PRs 49842, 50649)
Add Unit Test: opaque int resource name
**What this PR does / why we need it**: https://github.com/kubernetes/kubernetes/issues/49384, adding unit tests for functions related to the prefix OpaqueIntResourceName in /pkg/api/v1helper
**Which issue this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close that issue when PR gets merged)*: fixes #
**Special notes for your reviewer**:
**Release note**:
```release-note
NONE
```
Automatic merge from submit-queue (batch tested with PRs 50302, 50573, 50500, 50633, 50617)
[Federation] Kubefed doc fix
Fixes https://github.com/kubernetes/kubernetes/issues/50615
@kubernetes/sig-federation-bugs
@madhusudancs, would it be of any reason to have separate code for kubefed for the version and options subcommands (rather then using ```kubectl.NewCmdVersion()``` and ```kubectl.NewCmdOptions```). I dont see the need, but I might be missing something.
**What this PR does / why we need it**:
Fixes https://github.com/kubernetes/kubernetes/issues/50615
**Which issue this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close that issue when PR gets merged)*: fixes #
**Special notes for your reviewer**:
**Release note**:
```NONE
```
Automatic merge from submit-queue (batch tested with PRs 50302, 50573, 50500, 50633, 50617)
Fix kubernetes-worker charm hook failure when applying labels
**What this PR does / why we need it**:
This fixes a failure that can occur in the kubernetes-worker charm when trying to apply node labels.
The failure is rare, and can occur in two situations that I've seen:
1. kube-apiserver is not up yet
2. kubelet has not registered itself as a node yet
Rather than give up right away, let's give the services a minute to come up.
**Release note**:
```release-note
Fix kubernetes-worker charm hook failure when applying labels
```
Automatic merge from submit-queue (batch tested with PRs 50302, 50573, 50500, 50633, 50617)
add cmd-test for sort-by command
this follow up : https://github.com/kubernetes/kubernetes/pull/48659
/assign @pwittrock
as your suggestion, cmd-test added, ptal
```release-note
NONE
```
Automatic merge from submit-queue
kubeadm: Implementing the controlplane phase
**What this PR does / why we need it:**
This contains implementation of controlplane phases in kubeadm, which is part of the wider effort of implementing phases in kubeadm, previously in alpha stage.
The original proposal for this activity can be found [here](https://github.com/kubernetes/kubeadm/pull/156/files) and related comments.
Kubeadm phase implementation checklist is defined [here](https://github.com/kubernetes/kubeadm/issues/267)
Common implementation guidelines and principles for all phases are defined [here](https://docs.google.com/document/d/1VQMyFIVMfRGQPP3oCUpfjiWtOr3pLxp4g7cP-hXQFXc/edit?usp=sharing)
This PR implements:
- [x] kubeadm phase controlplane: wip by @fabriziopandini
- [x] kubeadm phase controlplane all
- [x] kubeadm phase controlplane etcd
- [x] kubeadm phase controlplane apiserver
- [x] kubeadm phase controlplane scheduler
- [x] kubeadm phase controlplane controller-manager
**Which issue this PR fixes:**
https://github.com/kubernetes/kubeadm/issues/349
**Special notes for your reviewer:**
This PR implements the same approach of #49419, thus minimising rework/impacts on existing codebase.