Skip to content

Commit

Permalink
Merge pull request #364 from ingvagabund/set-min-length-for-mdb-crd
Browse files Browse the repository at this point in the history
MDB: Set minimum value constraint for MinAvailable and MaxUnavailable
  • Loading branch information
openshift-merge-robot authored Jul 29, 2019
2 parents 2a49705 + c14a953 commit 15b0376
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
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

0 comments on commit 15b0376

Please sign in to comment.