Adds the EnableStrict option to all places where a codec factory is created, to ensure that extension resource configs are always deserialized in "strict" mode. This means that resources with fields that are not allowed by the API schema will be rejected by validation and will cause errors (categorized as ERR_CONFIGURATION_PROBLEM) during reconciliation as well.
Vendors g/g based on https://github.com/gardener/gardener/pull/3804 to ensure that a strict decoder is used also for ControlPlaneConfig and WorkerConfig, and errors are correctly categorized.
The CI build fails because the vendored g/g requires go 1.16. This PR has to be force-merged, and I will later update the branch.cfg.
Release note:
Extension resource configs (`InfrastructureConfig`, `ControlPlaneConfigs`, `WorkerConfig`) are now deserialized in "strict" mode, including during validation by the admission webhook. This means that resources with fields that are not allowed by the API schema will be rejected by validation. Creating new shoots containing such resources will not be possible, and reconciling existing shoots will fail with an appropriate error until you manually update the shoot to make sure any extension resource configs contained in it are valid.
How to categorize this PR?
/area control-plane /kind enhancement /priority 3 /platform kubevirt
What this PR does / why we need it:
EnableStrict
option to all places where a codec factory is created, to ensure that extension resource configs are always deserialized in "strict" mode. This means that resources with fields that are not allowed by the API schema will be rejected by validation and will cause errors (categorized asERR_CONFIGURATION_PROBLEM
) during reconciliation as well.ControlPlaneConfig
andWorkerConfig
, and errors are correctly categorized.Which issue(s) this PR fixes: Fixes https://github.com/gardener/gardener-extension-provider-azure/pull/270, see also https://github.com/gardener/gardener-extension-provider-azure/pull/271 and https://github.com/gardener/gardener-extension-provider-gcp/pull/249.
Special notes for your reviewer:
branch.cfg
.Release note: