-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
internal/webhooks: make MDT.replicas and autoscaler mut. exclusive
Add new validation functions in cluster.go and clusterclass.go: - ValidateAutoscalerAnnotationsForCluster - ValidateAutoscalerAnnotationsForClusterClass ..ForCluster is called from validateTopology(). It makes sure that a given Topology does not contain MachineDeploymentToplogy objects under Workers, that have both a "replicas" field set to non-nil and an autoscaler min/max annotation present. Also optionally it checks if there are annotations that are set on the ClusterClass's MachineDeploymentClass for this MachineDeploymentTopology. ..ForClusterClass accepts a list of Clusters that use a certain ClusterClass. Inline, it uses the ..ForCluster function and the same validation as above is performed. It is called from validate() for a CC on update. Additionally: - Add a new builder utility function MachineDeploymentTopologyBuilder#WithAnnotations(). - Add 100% test coverage for the new validation functions.
- Loading branch information
Showing
6 changed files
with
322 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters