It turns out there are additional feature gates which may be left
around after an upgrade from the previous release, or if someone
is using the custom K8s config functionality.
This means that the previous commit which special-cased the
RemoveSelfLink feature gate for the kube-apiserver is not
sufficient. At a minimum we also have to deal with a
'HugePageStorageMediumSize: true' feature gate for kubelet.
According to the upstream docs this should still be understood
by kubelet, but the docs are wrong. (An issue has been raised.)
Accordingly this commit creates a generic framework which can
be used to remove one or more feature gates from all locations
before upgrading to a specified K8s version.
Test plan:
PASS: exercise code via test harness to validate various
combinations of feature gates in different sections
PASS: K8s upgrade to 1.24 in standard lab that was upgraded from
previous release
Closes-Bug: 1999837
Change-Id: Ibbcfdbb3deb5a11ee8ca059439bd4e2c7e0fd5a6
Signed-off-by: Chris Friesen <chris.friesen@windriver.com>