You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix: optimize CEL validation cost and refactor controller tests
- api/v1alpha1/common_types.go: Re-enable `XValidation` for `PodAnnotations` and `PodLabels` but optimize the rule cost by reducing `MaxProperties` to 20. Removed invalid `MaxLength` markers on map fields to fix `controller-gen` build errors. This ensures validation remains active while staying within the Kubernetes API server's estimated cost budget.
- pkg/cluster-handler/controller/multigrescluster/multigrescluster_controller_test.go: Refactor the test runner to default `tc.multigrescluster` to `baseCluster.DeepCopy()`. This removes repetitive boilerplate from individual test cases. Moved inline cluster modifications to `preReconcileUpdate` for better consistency across tests.
0 commit comments