Skip to content
Draft
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
4 changes: 4 additions & 0 deletions machineconfiguration/v1/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -422,7 +422,11 @@ type MachineConfigPoolSpec struct {
// to stop updates, use the 'paused' property instead. Drain will respect
// Pod Disruption Budgets (PDBs) such as etcd quorum guards, even if
// maxUnavailable is greater than one.
// When specified as an integer, the value must be greater than 0.
// When specified as a string, it must be a percentage (e.g., "50%").
// +optional
// +kubebuilder:validation:XIntOrString
// +kubebuilder:validation:XValidation:rule="type(self) == int ? self > 0 : type(self) == string && self.matches('^[0-9]+%$')",message="must be a positive integer greater than 0, or a percentage string (e.g., '50%')"
MaxUnavailable *intstr.IntOrString `json:"maxUnavailable,omitempty"`

// The targeted MachineConfig object for the machine config pool.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -246,7 +246,13 @@ spec:
to stop updates, use the 'paused' property instead. Drain will respect
Pod Disruption Budgets (PDBs) such as etcd quorum guards, even if
maxUnavailable is greater than one.
When specified as an integer, the value must be greater than 0.
When specified as a string, it must be a percentage (e.g., "50%").
x-kubernetes-int-or-string: true
x-kubernetes-validations:
- message: must be a positive integer greater than 0, or a percentage
string (e.g., '50%')
rule: 'type(self) == int ? self > 0 : type(self) == string && self.matches(''^[0-9]+%$'')'
nodeSelector:
description: nodeSelector specifies a label selector for Machines
properties:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -246,7 +246,13 @@ spec:
to stop updates, use the 'paused' property instead. Drain will respect
Pod Disruption Budgets (PDBs) such as etcd quorum guards, even if
maxUnavailable is greater than one.
When specified as an integer, the value must be greater than 0.
When specified as a string, it must be a percentage (e.g., "50%").
x-kubernetes-int-or-string: true
x-kubernetes-validations:
- message: must be a positive integer greater than 0, or a percentage
string (e.g., '50%')
rule: 'type(self) == int ? self > 0 : type(self) == string && self.matches(''^[0-9]+%$'')'
nodeSelector:
description: nodeSelector specifies a label selector for Machines
properties:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -246,7 +246,13 @@ spec:
to stop updates, use the 'paused' property instead. Drain will respect
Pod Disruption Budgets (PDBs) such as etcd quorum guards, even if
maxUnavailable is greater than one.
When specified as an integer, the value must be greater than 0.
When specified as a string, it must be a percentage (e.g., "50%").
x-kubernetes-int-or-string: true
x-kubernetes-validations:
- message: must be a positive integer greater than 0, or a percentage
string (e.g., '50%')
rule: 'type(self) == int ? self > 0 : type(self) == string && self.matches(''^[0-9]+%$'')'
nodeSelector:
description: nodeSelector specifies a label selector for Machines
properties:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -246,7 +246,13 @@ spec:
to stop updates, use the 'paused' property instead. Drain will respect
Pod Disruption Budgets (PDBs) such as etcd quorum guards, even if
maxUnavailable is greater than one.
When specified as an integer, the value must be greater than 0.
When specified as a string, it must be a percentage (e.g., "50%").
x-kubernetes-int-or-string: true
x-kubernetes-validations:
- message: must be a positive integer greater than 0, or a percentage
string (e.g., '50%')
rule: 'type(self) == int ? self > 0 : type(self) == string && self.matches(''^[0-9]+%$'')'
nodeSelector:
description: nodeSelector specifies a label selector for Machines
properties:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -246,7 +246,13 @@ spec:
to stop updates, use the 'paused' property instead. Drain will respect
Pod Disruption Budgets (PDBs) such as etcd quorum guards, even if
maxUnavailable is greater than one.
When specified as an integer, the value must be greater than 0.
When specified as a string, it must be a percentage (e.g., "50%").
x-kubernetes-int-or-string: true
x-kubernetes-validations:
- message: must be a positive integer greater than 0, or a percentage
string (e.g., '50%')
rule: 'type(self) == int ? self > 0 : type(self) == string && self.matches(''^[0-9]+%$'')'
nodeSelector:
description: nodeSelector specifies a label selector for Machines
properties:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -246,7 +246,13 @@ spec:
to stop updates, use the 'paused' property instead. Drain will respect
Pod Disruption Budgets (PDBs) such as etcd quorum guards, even if
maxUnavailable is greater than one.
When specified as an integer, the value must be greater than 0.
When specified as a string, it must be a percentage (e.g., "50%").
x-kubernetes-int-or-string: true
x-kubernetes-validations:
- message: must be a positive integer greater than 0, or a percentage
string (e.g., '50%')
rule: 'type(self) == int ? self > 0 : type(self) == string && self.matches(''^[0-9]+%$'')'
nodeSelector:
description: nodeSelector specifies a label selector for Machines
properties:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -246,7 +246,13 @@ spec:
to stop updates, use the 'paused' property instead. Drain will respect
Pod Disruption Budgets (PDBs) such as etcd quorum guards, even if
maxUnavailable is greater than one.
When specified as an integer, the value must be greater than 0.
When specified as a string, it must be a percentage (e.g., "50%").
x-kubernetes-int-or-string: true
x-kubernetes-validations:
- message: must be a positive integer greater than 0, or a percentage
string (e.g., '50%')
rule: 'type(self) == int ? self > 0 : type(self) == string && self.matches(''^[0-9]+%$'')'
nodeSelector:
description: nodeSelector specifies a label selector for Machines
properties:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -246,7 +246,13 @@ spec:
to stop updates, use the 'paused' property instead. Drain will respect
Pod Disruption Budgets (PDBs) such as etcd quorum guards, even if
maxUnavailable is greater than one.
When specified as an integer, the value must be greater than 0.
When specified as a string, it must be a percentage (e.g., "50%").
x-kubernetes-int-or-string: true
x-kubernetes-validations:
- message: must be a positive integer greater than 0, or a percentage
string (e.g., '50%')
rule: 'type(self) == int ? self > 0 : type(self) == string && self.matches(''^[0-9]+%$'')'
nodeSelector:
description: nodeSelector specifies a label selector for Machines
properties:
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.