Automatic merge from submit-queue
E2E & Node E2E: Move pods test into common directory
This is the 4th part of #29494.
For #29081.
Based on #29092, #29806.
The first commit is squash of all dependent commits. Please only review the last 2 commits.
The 2nd commit migrates pods.go to `common/pods.go`.
Notice that the test `should be schedule with cpu and memory limits` is removed because:
* It doesn't make sense at the node level.
* It should have been tested in scheduler_predicates at the cluster level https://github.com/kubernetes/kubernetes/blob/master/test/e2e/scheduler_predicates.go#L264
The 3rd commit splits pods.go into several pods (nothing is changed, only move code):
* **Liveness probe test:** Moved into `container_probe.go`.
* **Init container test:** Moved into a new file `init_container.go`.
* **Others:** Still in pods.go
@vishh @timstclair
<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.kubernetes.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.kubernetes.io/reviews/kubernetes/kubernetes/29814)
<!-- Reviewable:end -->
Automatic merge from submit-queue
[GarbageCollector] only store typeMeta and objectMeta in the gc store
GC only needs to know the apiVersion, kind, and objectMeta of an object. This PR makes the stores of GC only save these fields.
cc @kubernetes/sig-api-machinery
<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.kubernetes.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.kubernetes.io/reviews/kubernetes/kubernetes/28480)
<!-- Reviewable:end -->
Automatic merge from submit-queue
Update scale cmd help to display duration "units" in --timeout usage
release-note-none
`kubectl scale` has `--timeout` option, but the help info does not give accepted time units.
The help info gives default value 0 without a unit, potentially misleading a user into thinking they need to pass the numbered time only.
<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.kubernetes.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.kubernetes.io/reviews/kubernetes/kubernetes/30022)
<!-- Reviewable:end -->
Automatic merge from submit-queue
Add service and deployment create sub-commands to kubectl
```release-note
Added new commands kubectl create service & kubectl create deployment
```
Partial #25382
Automatic merge from submit-queue
Allow expressing inodes in percentages for eviction
Per discussion here:
https://github.com/kubernetes/kubernetes/pull/28055#issuecomment-230078770
The amount of inodes per disk can vary, and our operators would prefer to express eviction in terms of percentage available. So independent of a disk having 3.2M or 12M of total inodes, its more convenient to just express eviction as saying if available inodes falls below 10 or 5 percent of total capacity then trigger an action.
/cc @vishh @ronnielai @kubernetes/rh-cluster-infra @twiest @kubernetes/sig-node
Automatic merge from submit-queue
Add integration test for volume controller startup.
Tests #28002 with real etcd (unit tests have a fake one with different behavior).
@kubernetes/sig-storage
Automatic merge from submit-queue
Add total inodes to kubelet summary api
Needed to support inode based eviction thresholds as a percentage.
/cc @ronnielai @vishh @kubernetes/rh-cluster-infra
Automatic merge from submit-queue
Edits to bring the tls-terminated etcd cluster to the layer.
fixes#23198
```release-note
* Updates required for juju kubernetes to use the tls-terminated etcd charm.
```
Automatic merge from submit-queue
Admission control errors should have consistent lower casing
noticed while reviewing other PRs, but convention is that error messages should start with lower-case.
fixed up inconsistencies in admission control plug-ins.
/cc @ncdc
Automatic merge from submit-queue
pkg/util/exec: don't specify paths for echo
`ex.Command()` already searches the binary in PATH, no need to manually
specify it as `/bin/echo`. `pkg/util/exec` tests fail in non-conventional environments
due to this (e.g. NixOS).
`ex.Command()` already searches the binary in PATH, no need to manually
specify it. `pkg/util/exec` tests fail in non-conventional environments
due to this (e.g. NixOS).
Automatic merge from submit-queue
Install authorization group in 1.4 client
By the way, buried in my other PR there is an e2e test which will remind people adding this line.
@deads2k
Automatic merge from submit-queue
Fix PVC.Status.Capacity and AccessModes after binding
Also, fix unit tests to have the same claim and volume sizes in most of the
tests where we don't test matching based on size and test for a specific size
when we do actually test the matching.
Fixes#29425
Also, fix unit tests to have the same claim and volume sizes in most of the
tests where we don't test matching based on size and test for a specific size
when we do actually test the matching.
Automatic merge from submit-queue
remove useless value copy
Copy something to values in parameters won't change them in go. So, remove it to avoid making people confused.
Automatic merge from submit-queue
e2e flake: real fix of PodAntiAffinity test
The fix in PR https://github.com/kubernetes/kubernetes/pull/30135 was wrong in using a wrong test condition for an already broken test.
### Summary
The test tries to launch a pod with an anti-affinity annotation, waits 10
seconds and then checks that it is still pending.
But the anti-affinity annotation does not forbid to launch that pod on just
another node that does not have the zone label at all.
This commit changes this behavior by labeling two nodes with the zone label
and then forcing the pod to be launched on one of those two nodes.
**I assume here that a non-existing label is considered as a different label value.**
Fixes#30078
Automatic merge from submit-queue
SchedulerExtender: add failedPredicateMap in Filter() returns
Fix#25797. modify extender.Filter for adding extenders information to “failedPredicateMap” in findNodesThatFit.
When all the filtered nodes that passed "predicateFuncs" don’t pass the extenders filter, the failedPredicateMap hasn’t the extenders information, should add it, I think. So when the length of the “filteredNodes.Items” is 0, we can know the integral information. (The length of the “filteredNodes.Items” is 0, may be because the extenders filter failed.)
Automatic merge from submit-queue
make correction to two variables in inverse order
from Fprintf info ""Renaming %s to %s\n", it should be renamed from old to new.
Automatic merge from submit-queue
[kubelet] Auto-discover node IP if neither cloud provider exists and IP is not explicitly specified
One example where the earlier implementation failed is when running kubelet on CoreOS (bare-metal), where the nameserver is set to `8.8.8.8`. kubelet tries to lookup the node name agains Google DNS, which obviously fails. The kubelet won't recover after that.
The workaround hsa been to set `--hostname-override` to an IP address, but it's quite annoying to try to make a multi-distro way of getting the IP in bash for example. This way is much cleaner.
Refactored the function a little bit at the same time
@vishh @yujuhong @resouer @Random-Liu
Automatic merge from submit-queue
Verify volume.GetPath() never returns ""
Add a new helper method volume.GetPath(Mounter) instead of calling
the GetPath() of the Mounter directly. Check if GetPath() is returning
a "" and convert that into an error.
Fixes#23163
Automatic merge from submit-queue
WIP: Add goimports to the cross build
A couple of verifiers have their own Dockerfiles because this doesn't have goimports (the protobuf one and the new runtime one)