Skip to content

Commit

Permalink
Merge pull request openshift#4378 from a-dsouza/nodepool-cel-fix
Browse files Browse the repository at this point in the history
OCPBUGS-36897: fix(api): Nodepool CEL validation fix
  • Loading branch information
openshift-merge-bot[bot] authored Jul 19, 2024
2 parents 6e87ba0 + 2b77a81 commit c84168e
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion api/hypershift/v1beta1/nodepool_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ type NodePool struct {
// NodePoolSpec is the desired behavior of a NodePool.
// +kubebuilder:validation:XValidation:rule="!has(oldSelf.arch) || has(self.arch)", message="Arch is required once set"
// +kubebuilder:validation:XValidation:rule="self.arch != 'arm64' || has(self.platform.aws)", message="Setting Arch to arm64 is only supported for AWS"
// +kubebuilder:validation:XValidation:rule="has(self.replicas) ? !has(self.autoScaling) : has(self.autoScaling)", message="One of replicas or autoScaling should be set but not both"
// +kubebuilder:validation:XValidation:rule="!has(self.replicas) || !has(self.autoScaling)", message="Both replicas or autoScaling should not be set"
type NodePoolSpec struct {
// ClusterName is the name of the HostedCluster this NodePool belongs to.
//
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2245,8 +2245,8 @@ spec:
rule: '!has(oldSelf.arch) || has(self.arch)'
- message: Setting Arch to arm64 is only supported for AWS
rule: self.arch != 'arm64' || has(self.platform.aws)
- message: One of replicas or autoScaling should be set but not both
rule: 'has(self.replicas) ? !has(self.autoScaling) : has(self.autoScaling)'
- message: Both replicas or autoScaling should not be set
rule: '!has(self.replicas) || !has(self.autoScaling)'
status:
description: Status is the latest observed status of the NodePool.
properties:
Expand Down
4 changes: 2 additions & 2 deletions hack/app-sre/saas_template.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -68458,8 +68458,8 @@ objects:
rule: '!has(oldSelf.arch) || has(self.arch)'
- message: Setting Arch to arm64 is only supported for AWS
rule: self.arch != 'arm64' || has(self.platform.aws)
- message: One of replicas or autoScaling should be set but not both
rule: 'has(self.replicas) ? !has(self.autoScaling) : has(self.autoScaling)'
- message: Both replicas or autoScaling should not be set
rule: '!has(self.replicas) || !has(self.autoScaling)'
status:
description: Status is the latest observed status of the NodePool.
properties:
Expand Down

0 comments on commit c84168e

Please sign in to comment.