Unverified Commit 28cfdcc7 authored by atchernych's avatar atchernych Committed by GitHub
Browse files

fix: CEL validation rule (#7550)


Signed-off-by: default avatarAnna Tchernych <atchernych@nvidia.com>
parent 435c8024
...@@ -8171,7 +8171,7 @@ spec: ...@@ -8171,7 +8171,7 @@ spec:
type: object type: object
x-kubernetes-validations: x-kubernetes-validations:
- message: sharedMemory.size must not be set when sharedMemory.disabled is true - message: sharedMemory.size must not be set when sharedMemory.disabled is true
rule: '!(self.disabled && has(self.size))' rule: '!(has(self.disabled) && self.disabled && has(self.size))'
ttlSecondsAfterFinished: ttlSecondsAfterFinished:
default: 300 default: 300
description: TTLSecondsAfterFinished specifies how long to keep the Job after completion description: TTLSecondsAfterFinished specifies how long to keep the Job after completion
......
...@@ -11213,7 +11213,7 @@ spec: ...@@ -11213,7 +11213,7 @@ spec:
type: object type: object
x-kubernetes-validations: x-kubernetes-validations:
- message: sharedMemory.size must not be set when sharedMemory.disabled is true - message: sharedMemory.size must not be set when sharedMemory.disabled is true
rule: '!(self.disabled && has(self.size))' rule: '!(has(self.disabled) && self.disabled && has(self.size))'
subComponentType: subComponentType:
description: SubComponentType indicates the sub-role of this component (for example, "prefill"). description: SubComponentType indicates the sub-role of this component (for example, "prefill").
type: string type: string
......
...@@ -11436,7 +11436,7 @@ spec: ...@@ -11436,7 +11436,7 @@ spec:
type: object type: object
x-kubernetes-validations: x-kubernetes-validations:
- message: sharedMemory.size must not be set when sharedMemory.disabled is true - message: sharedMemory.size must not be set when sharedMemory.disabled is true
rule: '!(self.disabled && has(self.size))' rule: '!(has(self.disabled) && self.disabled && has(self.size))'
subComponentType: subComponentType:
description: SubComponentType indicates the sub-role of this component (for example, "prefill"). description: SubComponentType indicates the sub-role of this component (for example, "prefill").
type: string type: string
......
...@@ -71,7 +71,7 @@ type Autoscaling struct { ...@@ -71,7 +71,7 @@ type Autoscaling struct {
Metrics []autoscalingv2.MetricSpec `json:"metrics,omitempty"` Metrics []autoscalingv2.MetricSpec `json:"metrics,omitempty"`
} }
// +kubebuilder:validation:XValidation:rule="!(self.disabled && has(self.size))",message="sharedMemory.size must not be set when sharedMemory.disabled is true" // +kubebuilder:validation:XValidation:rule="!(has(self.disabled) && self.disabled && has(self.size))",message="sharedMemory.size must not be set when sharedMemory.disabled is true"
type SharedMemorySpec struct { type SharedMemorySpec struct {
Disabled bool `json:"disabled,omitempty"` Disabled bool `json:"disabled,omitempty"`
Size resource.Quantity `json:"size,omitempty"` Size resource.Quantity `json:"size,omitempty"`
......
...@@ -8171,7 +8171,7 @@ spec: ...@@ -8171,7 +8171,7 @@ spec:
type: object type: object
x-kubernetes-validations: x-kubernetes-validations:
- message: sharedMemory.size must not be set when sharedMemory.disabled is true - message: sharedMemory.size must not be set when sharedMemory.disabled is true
rule: '!(self.disabled && has(self.size))' rule: '!(has(self.disabled) && self.disabled && has(self.size))'
ttlSecondsAfterFinished: ttlSecondsAfterFinished:
default: 300 default: 300
description: TTLSecondsAfterFinished specifies how long to keep the Job after completion description: TTLSecondsAfterFinished specifies how long to keep the Job after completion
......
...@@ -11213,7 +11213,7 @@ spec: ...@@ -11213,7 +11213,7 @@ spec:
type: object type: object
x-kubernetes-validations: x-kubernetes-validations:
- message: sharedMemory.size must not be set when sharedMemory.disabled is true - message: sharedMemory.size must not be set when sharedMemory.disabled is true
rule: '!(self.disabled && has(self.size))' rule: '!(has(self.disabled) && self.disabled && has(self.size))'
subComponentType: subComponentType:
description: SubComponentType indicates the sub-role of this component (for example, "prefill"). description: SubComponentType indicates the sub-role of this component (for example, "prefill").
type: string type: string
......
...@@ -11436,7 +11436,7 @@ spec: ...@@ -11436,7 +11436,7 @@ spec:
type: object type: object
x-kubernetes-validations: x-kubernetes-validations:
- message: sharedMemory.size must not be set when sharedMemory.disabled is true - message: sharedMemory.size must not be set when sharedMemory.disabled is true
rule: '!(self.disabled && has(self.size))' rule: '!(has(self.disabled) && self.disabled && has(self.size))'
subComponentType: subComponentType:
description: SubComponentType indicates the sub-role of this component (for example, "prefill"). description: SubComponentType indicates the sub-role of this component (for example, "prefill").
type: string type: string
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment