we don't need any other utils in the image the way the script is currently written, other utils are just a vuln-patch waiting to happen, and make the download larger
This is purely for consistency with other uses of CEL in the
project. Using `[` for accessing claims or user data is preferred
when names contain characters that would need to be escaped. CEL
optionals via `?` can be used in places where `has` cannot be used,
i.e. `claims[?"kubernetes.io"]` or `user.extra[?"domain.io/foo"]`.
Signed-off-by: Monis Khan <mok@microsoft.com>
Which signal really cause the pause command to exit may be relevant to know.
By supporting the default /dev/termination-log, that information also shows up
in the pod status and then is often already shown in output of E2E tests for
unexpected pod failures.
The advantage is that it separates the dependencies of the different tools
better. golangci-lint in particular has many dependencies and is sometimes
sensitive to the exact version being used. This way, "go get" bumps up
dependencies exactly as defined by the upstream golangci-lint module.
It's not quite self-contained because logcheck as a Go plugin for golangci-lint
must be built from the same dependencies. But it only adds one and does not
change any of the others.
While at it, the Go 1.24 "tools" directive gets used instead of the traditional
tools.go approach.
This finishes the work started in
https://github.com/kubernetes/kubernetes/pull/131113.
Changes:
- Remove TODOs for things that we don't have plans to fix.
- Add issue for older TODO.
- Reorganize and remove suppression rules so that the base check
has no unused rules.
- Document warn-unused, but don't enable it.
- Remove disabling of statistics (they are useful) and ensure that
they don't get the ERROR prefix.
- Avoid ../ prefix in paths via `run.relative-path-mode: gomod`.
Passing a constant value to gomega.Consistently means that it will not re-check
while running.
Found by linter after removing the suppression rule for the check. It was
disabled earlier because of a bug in the linter.
`terminationGracePeriodSeconds: 0` was a mistake, it bypasses the normal
pod shutdown in the kubelet.
The right way to shut down a pod quickly is to have it react to SIGTERM.
The busybox implementation of "sleep" doesn't. `agnhost pause` does,
so let's use that instead.
For E2E tests, the InfiniteSleepCommand was already change about a year ago to
react to SIGTERM, so the `terminationGracePeriodSeconds: 1` workaround is no
longer needed.
Typically, a single DRA driver uses only one ResourceSlice per resource pool.
Currently, the ResourceSliceController updates this slice by deleting and
recreating it when devices are added or removed. For this common
single-slice-per-pool scenario, we can improve efficiency by directly updating
the existing ResourceSlice instead.