Automatic merge from submit-queue
dockertools: don't test linux-specific cases on OSX
There are a few test cases in dockertools are linux-specific. This PR moves them to docker_manager_linux_test.go
Fixes#39183.
Automatic merge from submit-queue (batch tested with PRs 39053, 36446)
CRI: clarify purpose of annotations
Add language to make it explicit that annotations are not to be altered
by runtimes, and should only be used for features that are opaque to the
Kubernetes APIs. Unfortunately there are currently exceptions
introduced in [1][1], but this change makes it clear that they are to be
changed and that no more such semantic-affecting annotations should be
introduced.
In the spirit of the discussion and conclusion in [2][2].
Also captures the link between the annotations returned by various
status queries and those supplied in associated configs.
[1]: https://github.com/kubernetes/kubernetes/pull/34819
[2]: https://github.com/kubernetes/kubernetes/issues/30819#issuecomment-253369441
Automatic merge from submit-queue (batch tested with PRs 39053, 36446)
fix --no-header help description
**What this PR does / why we need it**:
the current description is
> --no-headers=false: When using the default or custom-column output format, don't print headers.
but ,
> kubectl get po
the header has been printing , so the default condition is printing headers.
> kubectl get po --no-headers=true
the header has been not printing
> kubectl get po --no-headers=false
the header has been printing
So , I fixed the help description
Thanks.
**Special notes for your reviewer**:
**Release note**:
```release-note
```
Automatic merge from submit-queue
Kubectl top now also accepts short forms for "node" and "pod" ("no", "po")
**What this PR does / why we need it**:
People are used to typing `kubectl get po` and will expect `kubectl top po` to also work (without having to type the full resource name).
Automatic merge from submit-queue
Update CHANGELOG.md
**What this PR does / why we need it**:
Updates deprecation notice for 1.5.1 informing users that mixed case field names for annotations will now return an error.
**Which issue this PR fixes**
fixes#39189
Automatic merge from submit-queue (batch tested with PRs 39266, 39268)
cluster/log-dump.sh: Add a way to dump more journalctl services as well
(And tiny refactor of the two generic ones we already dump)
```release-note
NONE
```
Automatic merge from submit-queue
Remove system:anonymous check from kubectl test
This verbiage doesn't appear when the cluster is `AlwaysAllow` (and just makes the check more brittle).
Follow-on to #39263, this is the last (consistent) failure on [kops-aws](https://k8s-testgrid.appspot.com/google-aws#kops-aws&sort-by-failures=)
Automatic merge from submit-queue
Add three more columns to `kubectl get deploy -o wide` output.
Added CONTAINER(S), IMAGE(S) and SELECTOR fields to the output
of `kubectl get deploy -o wide`.
Fixed#39147
Automatic merge from submit-queue
Avoid unnecessary memory allocations
Low-hanging fruits in saving memory allocations. During our 5000-node kubemark runs I've see this:
ControllerManager:
- 40.17% k8s.io/kubernetes/pkg/util/system.IsMasterNode
- 19.04% k8s.io/kubernetes/pkg/controller.(*PodControllerRefManager).Classify
Scheduler:
- 42.74% k8s.io/kubernetes/plugin/pkg/scheduler/algrorithm/predicates.(*MaxPDVolumeCountChecker).filterVolumes
This PR is eliminating all of those.
Automatic merge from submit-queue
Tolerate a Forbidden error in e2e RBAC RoleBinding setup.
The three tests that require RBAC rolebindings to be set up currently fail if RBAC is not enabled. This allows those tests to work as they did before we added the RBAC setup step.
Addresses #39259
Automatic merge from submit-queue
Refactor operation_executor to make it testable
**What this PR does / why we need it**:
To refactor operation_executor to make it unit testable
**Release note**:
`NONE`
Automatic merge from submit-queue (batch tested with PRs 39152, 39142, 39055)
openstack: Forcibly detach an attached cinder volume before attaching elsewhere
Fixes#33288
**What this PR does / why we need it**:
Without this fix, we can't preemptively reschedule pods with persistent volumes to other hosts (for rebalancing or hardware failure recovery).
**Which issue this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close that issue when PR gets merged)*: fixes#33288
**Special notes for your reviewer**:
(This is a resurrection/cleanup of PR #33734, originally authored by @Rotwang)
**Release note**:
Automatic merge from submit-queue (batch tested with PRs 39152, 39142, 39055)
Add test for json tags on internal and external types
Follow up from https://github.com/kubernetes/kubernetes/pull/38406
- adds static analysis tests preventing internal types from adding new json or protobuf tags
- adds static analysis tests requiring json tags on external types (and enforcing lower-case first letter)
- fixes issues found by the tests
Automatic merge from submit-queue (batch tested with PRs 38909, 39213)
Add path exist check in getPodVolumePathListFromDisk
Add the path exist check in the function. If the path does not exist,
return empty list and nil error.
fix issue #38498
Automatic merge from submit-queue
Add bazel-build and bazel-test to the Makefile.
Lets make these the source of truth rather than some script living in test-infra. That way we can test changes in presubmit.
Automatic merge from submit-queue
Add PDB to kubectl get --help.
**What this PR does / why we need it**: Adds PDB to kubectl get --help
**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/39100
**Release note**:
```release-note
NONE
```
/cc @saad-ali @mwielgus
Automatic merge from submit-queue (batch tested with PRs 39250, 39206)
WIP: work around for IP and port Allocator repair race
Fixes#37488
WIP: This does the IP allocator but not the port allocator yet. Sending for review before I clone the deltas for ports.
Idea: force the repair loop to detect a leak 3 times in a row before actually releasing the IP. That should allow any distributed races to resolve. It's a little hacky, but without mutual exclusion or proper transactions, it works.
Automatic merge from submit-queue
Adds assignees for kube-dns
Adds assignees for auto-assigning. Does not add assignees for pkg/dns folder as we are moving it out.
@thockin