Add a separate AnnotatedEventRecorder interface with an AnnotatedEventf
method that allows attaching annotations to events at creation time.
Implement it in recorderImpl, FakeRecorder, and EventRecorderAdapter.
Add a Verbose option to FakeRecorder that optionally includes action,
object kind/apiVersion, and annotations in event output. The default
format is unchanged.
Signed-off-by: Adrian Fernandez De La Torre <adri1197@gmail.com>
The cleanup step removed only zz_generated.validations.go and left the
per-Kind coverage test fixtures (zz_generated.<version>_test.go,
zz_generated.main_test.go) on disk, so renamed or removed Kinds would
leak stale files. Move every validation-gen output under a shared
zz_generated.validations. prefix and remove them via a single glob.
The endpoint-mappings.yaml file specifies which components use which
metrics. The case some, but not all core components (kube-controller-manager
and kube-scheduler in this case) sharing the same metrics was not
supported. This gets fixed by not returning early once the first file path
matches.
Not all metrics in pkg/controller/resourceclaim/metrics are shared. To make the
sharing clearer and fit into the file-path based component support in
endpoint-mappings.yaml, the shared metric gets moved to a new
pkg/resourceclaim/metrics package.
A newer version of staticcheck is available through golangci-lint, and
that is what the project is using. The direct dependency in tools is
unnecessary, this removes that.
Signed-off-by: Stephen Kitt <skitt@redhat.com>
Pass -test-output-root and -test-allowlist to validation-gen so the
per-Kind coverage fixtures regenerate alongside the validators. Add the
allowlist YAML at test/declarative_validation/coverage-allowlist.yaml.
The local-up-cluster.sh script was used as proxy for controlling the etcd
lifecycle because the script was using a helper function that didn't support
dry-run mode. That approach was flawed in several ways, causing etcd to be left
running:
- Cmd.Stop wasn't actually called for the script by Cluster.Stop.
- If it had been called, the additional output during shutdown wouldn't
have been processed, which might have caused the command to block instead
of terminating (untested).
- It's unclear whether the script would have handled the signal properly.
A cleaner approach is to enable dry-run mode also in etcd .sh and then let
Cluster manage it like any other long-running process. Then we can let
local-up-cluster.sh terminate when it's done with its work. Cluster.Start can
check it's result immediately.
The new kube-openapi revision (v0.0.0-20260502001324-b7f5293f4787) no
longer pulls in github.com/mailru/easyjson, so remove it from the
status.unwantedReferences list to keep verify-vendor.sh green.