When updating master to Go 1.26, the hint in the modernize linter got enabled
automatically. We want to be more conservative to avoid issues when new code
needs to be backported. Currently older release branches do not have Go 1.26 yet.
* Drop WorkloadRef field and introduce SchedulingGroup field in Pod API
* Introduce v1alpha2 Workload and PodGroup APIs, drop v1alpha1 Workload API
Co-authored-by: yongruilin <yongrlin@outlook.com>
* Run hack/update-codegen.sh
* Adjust kube-scheduler code and integration tests to v1alpha2 API
* Drop v1alpha1 scheduling API group and run make update
---------
Co-authored-by: yongruilin <yongrlin@outlook.com>
This change allows slow impersonation requests to be tracked via the
apiserver.latency.k8s.io/impersonation audit event annotation.
Updated tests to assert that the audit event log:
- Contains the new latency annotation
- Contains the impersonationConstraint field
- Failed impersonation attempts are observable by the response status
Signed-off-by: Monis Khan <mok@microsoft.com>
When DRAExtendedResource is enabled, the dynamicresources test setup
registers an event handler for DeviceClasses but was not waiting for it
to sync. This can lead to flaky tests where the cache is not fully
populated when the test starts.
This change captures the event handler registration and includes its
DoneChecker in a WaitFor call.
This prevents the DRA extended resource tests from running against
kubelets older than 1.36 in n-x version skew jobs, avoiding failures
when deploying device plugins on downgraded kubelets.
* issue: setcap build image shouldn't require a shell
* Apply review comment to rename intermediate binary
* Use plain `exec` rather than path to setcap executable.
* Remove deprecated PodRequestsAndLimits from kubectl/pkg/util/resource
The PodRequestsAndLimits function was deprecated in favor of
k8s.io/component-helpers/resource.PodRequests and PodLimits,
which also support pod-level resources. There are no remaining
consumers in kubectl.
This removal includes the unexported helpers: podRequests,
podLimits, determineContainerReqs, max, addResourceList, and
maxResourceList.
* Remove test for deleted max helper function
During cluster upgrade and downgrade, nodes are temporarily restarted.
A pod can be reported as Running by the API server while the kubelet's
container runtime is still initializing, causing transient exec failures:
Internal error occurred: unable to upgrade connection: pod does not exist
Wrapped b.TestPod in tCtx.Eventually so that assertion failures are treated
as temporary and retried.
In some (all?) CI jobs the initial kubelet instance keeps running, despite
command context cancellation. Not reproducible locally, so additional output
was necessary to track down the root cause in CI runs: signal propagation via
sudo didn't work for kube-proxy and kubelet, but only for those two and only in
the CI. The fix is to change the CI jobs so that they disable the usage of
sudo.
While at it, simplify by replacing atomic.Pointer with atomic.Boole.
When invoked with root privileges, sudo isn't necessary. Having it as
intermediary between a test executing the commands (the DRA upgrade/downgrade
tests) and the actual commands let to the kubelet not being killed.
Skipping the use of sudo helped.