cluster-api-provider-azure
cluster-api-provider-azure copied to clipboard
add more generic validation funcs
What type of PR is this?
/kind cleanup
What this PR does / why we need it:
This PR standardizes the way we validate immutable fields via webhook, and refactors existing, one-off validation implementations to re-use the common func.
Which issue(s) this PR fixes (optional, in fixes #<issue number>(, fixes #<issue_number>, ...) format, will close the issue(s) when PR gets merged):
Fixes #
Special notes for your reviewer:
Please confirm that if this PR changes any image versions, then that's the sole change this PR makes.
TODOs:
- [ ] squashed commits
- [ ] includes documentation
- [ ] adds unit tests
Release note:
NONE
/hold
under active dev
[APPROVALNOTIFIER] This PR is NOT APPROVED
This pull-request has been approved by:
Once this PR has been reviewed and has the lgtm label, please ask for approval from jackfrancis by writing /assign @jackfrancis in a comment. For more information see the Kubernetes Code Review Process.
The full list of commands accepted by this bot can be found here.
Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment
There are intentional, material changes in this PR to properly handle property immutability for AKS cluster properties that are immutable. The following AzureManagedControlPlane properties are now being checked for strict immutability
We should keep behavior changes separate from refactor changes, especially validation behavior which is considered a breaking change for the user API fields and should have its own release note. Please split those into a separate PR with an explicit release note about which fields are now immutable/required.
@jackfrancis: PR needs rebase.
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.
@CecileRobertMichon the part of the work that simply generalizes immutability checks into a common set of convenience funcs is here: https://github.com/kubernetes-sigs/cluster-api-provider-azure/pull/2741
/test ls
@jackfrancis: The specified target(s) for /test were not found.
The following commands are available to trigger required jobs:
/test pull-cluster-api-provider-azure-build/test pull-cluster-api-provider-azure-ci-entrypoint/test pull-cluster-api-provider-azure-e2e/test pull-cluster-api-provider-azure-test/test pull-cluster-api-provider-azure-verify
The following commands are available to trigger optional jobs:
/test pull-cluster-api-provider-azure-apidiff/test pull-cluster-api-provider-azure-apiversion-upgrade/test pull-cluster-api-provider-azure-capi-e2e/test pull-cluster-api-provider-azure-conformance/test pull-cluster-api-provider-azure-conformance-with-ci-artifacts/test pull-cluster-api-provider-azure-e2e-csi-migration/test pull-cluster-api-provider-azure-e2e-exp/test pull-cluster-api-provider-azure-e2e-optional/test pull-cluster-api-provider-azure-e2e-workload-upgrade/test pull-cluster-api-provider-azure-windows-containerd-upstream-with-ci-artifacts/test pull-cluster-api-provider-azure-windows-containerd-upstream-with-ci-artifacts-serial-slow
Use /test all to run the following jobs that were automatically triggered:
pull-cluster-api-provider-azure-apidiffpull-cluster-api-provider-azure-buildpull-cluster-api-provider-azure-ci-entrypointpull-cluster-api-provider-azure-e2epull-cluster-api-provider-azure-e2e-exppull-cluster-api-provider-azure-testpull-cluster-api-provider-azure-verify
In response to this:
/test ls
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.
Opened https://github.com/kubernetes-sigs/cluster-api-provider-azure/pull/2795 instead