Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ type ResourceList map[ResourceName]resource.Quantity

// CapacityBufferSpec defines the desired state of CapacityBuffer.
// +kubebuilder:validation:XValidation:rule="!has(self.podTemplateRef) || has(self.replicas) || has(self.limits)",message="If X is set, replicas or limits must also be set"
// +kubebuilder:validation:XValidation:rule="!(has(self.podTemplateRef) && has(self.scalableRef))",message="You must define both PodTemplateRef and ScalableRef"
// +kubebuilder:validation:XValidation:rule="!(has(self.podTemplateRef) && has(self.scalableRef))",message="You must define either PodTemplateRef or ScalableRef, but not both"
type CapacityBufferSpec struct {
// ProvisioningStrategy defines how the buffer is utilized.
// "buffer.x-k8s.io/active-capacity" is the default strategy, where the buffer actively scales up the cluster by creating placeholder pods.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -373,7 +373,8 @@ spec:
x-kubernetes-validations:
- message: If X is set, replicas or limits must also be set
rule: '!has(self.podTemplateRef) || has(self.replicas) || has(self.limits)'
- message: You must define both PodTemplateRef and ScalableRef
- message: You must define either PodTemplateRef or ScalableRef, but not
both
rule: '!(has(self.podTemplateRef) && has(self.scalableRef))'
status:
description: Status represents the current state of the buffer and its
Expand Down