Skip to content

MDB: Set minimum value constraint for MinAvailable and MaxUnavailable #364

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
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 @@ -53,13 +53,15 @@ spec:
one can prevent all voluntary deletions by specifying 0. This is a
mutually exclusive setting with "minAvailable".
format: int32
minimum: 0
type: integer
minAvailable:
description: An deletion of the machine is allowed if at least "minAvailable"
machines selected by "selector" will still be available after the
deletion. So for example you can prevent all voluntary deletions by
specifying all available nodes.
format: int32
minimum: 0
type: integer
selector:
description: Label query over machines whose deletions are managed by
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ type MachineDisruptionBudgetSpec struct {
// "selector" will still be available after the deletion.
// So for example you can prevent all voluntary deletions by specifying all available nodes.
// +optional
// +kubebuilder:validation:Minimum=0
MinAvailable *int32 `json:"minAvailable,omitempty" protobuf:"bytes,1,opt,name=minAvailable"`

// Label query over machines whose deletions are managed by the disruption
Expand All @@ -22,6 +23,7 @@ type MachineDisruptionBudgetSpec struct {
// For example, one can prevent all voluntary deletions by specifying 0.
// This is a mutually exclusive setting with "minAvailable".
// +optional
// +kubebuilder:validation:Minimum=0
MaxUnavailable *int32 `json:"maxUnavailable,omitempty" protobuf:"bytes,3,opt,name=maxUnavailable"`
}

Expand Down