chore: bump DefaultKubeBinaryVersion to 1.32, make 1.32 CEL changes, fix int tests to handle 1 version off API deprecation, and fix prerelease-lifecycle-gen for # of APIs
With https://github.com/kubernetes/kubernetes/pull/122079,
kubeadm now relies on `ttlSecondsAfterFinished` to clean
up `upgrade-health-check` once its pod reaches a terminal state.
However, there is a case where the pod won't reach a terminal state and
the job will not register a terminal state, hence no garbage collection.
For example, if the pause image is not present, `ErrImagePull` will make
the pod keep retrying to pull the image and the pod will never reach a
terminal state on its own. And the job will continue to wait for the pod
to reach a terminal state which will not happen.
So we need to set `activeDeadlineSeconds` to prevent the job from
waiting forever for the pod to reach a terminal state.
Without this, users invoking `kubeadm upgrade plan` need to cleanup the
job outside of kubeadm even if they ignore the preflight result because
the job still runs when the result is configured to be ignored via
`--ignore-prelight-errors=CreateJob` flag.
Since the timeout for the polling in the `CreateJob` step in kubeadm
is 15 seconds, we should set the `activeDeadlineSeconds` to the same
timeout.
After the flags to control manifest paths were removed,
the variables in diff.go remained empty and the validation
fails with "empty manifest path".
Always populate the paths with the kubeadm defaults under
/etc/kubernetes/manifest and remove the empty path validation.
If an unknown command or a phase is called consistently
return the same error.
If a command that has subcommands is called
return an error.
To achieve the above add a new util function
RequireSubcommand() that sets NoArgs and RunE for
regular commands or a "phase" command.
Remove MacroCommandLongDescription and just return an
error that a subcommand is required from the phase runner.
Fix minor comments capitalization.
Perform other minor fixes in util/error.go.
The flags for control-plane component manifest under 'upgrade diff'
and the --feture-gates flag were deprecated and NOOP in 1.31
and can be removed in 1.32.
In scheduler_perf, the caller configures ktesting without per-test output. When
StartTestServer initialized it again, it did so with per-test output. In other
cases it might have been simply redundant.
MergeKubeadmEnvVars use a map which results in non
deterministic output in the end slice EnvVar objects.
Before returning the slice, sort it by the Name field.
Update the unit test to capture the sorting aspect.