Skip to content

Commit

Permalink
Fix NodeTopology crd
Browse files Browse the repository at this point in the history
Signed-off-by: Tamal Saha <[email protected]>
  • Loading branch information
tamalsaha committed Jun 10, 2024
1 parent 2bd1940 commit 3a520e3
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 9 deletions.
1 change: 0 additions & 1 deletion apis/node/v1alpha1/nodetopology_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,6 @@ type NodeTopologySpec struct {
// Requirements are layered with GetLabels and applied to every node.
// +kubebuilder:validation:XValidation:message="requirements with operator 'In' must have a value defined",rule="self.all(x, x.operator == 'In' ? x.values.size() != 0 : true)"
// +kubebuilder:validation:XValidation:message="requirements operator 'Gt' or 'Lt' must have a single positive integer value",rule="self.all(x, (x.operator == 'Gt' || x.operator == 'Lt') ? (x.values.size() == 1 && int(x.values[0]) >= 0) : true)"
// +kubebuilder:validation:XValidation:message="requirements with 'minValues' must have at least that many values specified in the 'values' field",rule="self.all(x, (x.operator == 'In' && has(x.minValues)) ? x.values.size() >= x.minValues : true)"
// +kubebuilder:validation:MaxItems:=30
// +optional
Requirements []core.NodeSelectorRequirement `json:"requirements,omitempty" hash:"ignore"`
Expand Down
4 changes: 0 additions & 4 deletions crds/node.k8s.appscode.com_nodetopologies.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -104,10 +104,6 @@ spec:
integer value
rule: 'self.all(x, (x.operator == ''Gt'' || x.operator == ''Lt'')
? (x.values.size() == 1 && int(x.values[0]) >= 0) : true)'
- message: requirements with 'minValues' must have at least that many
values specified in the 'values' field
rule: 'self.all(x, (x.operator == ''In'' && has(x.minValues)) ?
x.values.size() >= x.minValues : true)'
topologyKey:
type: string
required:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -119,10 +119,6 @@ spec:
integer value
rule: 'self.all(x, (x.operator == ''Gt'' || x.operator == ''Lt'')
? (x.values.size() == 1 && int(x.values[0]) >= 0) : true)'
- message: requirements with 'minValues' must have at least that many
values specified in the 'values' field
rule: 'self.all(x, (x.operator == ''In'' && has(x.minValues)) ? x.values.size()
>= x.minValues : true)'
topologyKey:
type: string
required:
Expand Down

0 comments on commit 3a520e3

Please sign in to comment.