MDB: Set minimum value constraint for MinAvailable and MaxUnavailable #364
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
After applying the change and applying:
I get:
The MachineDisruptionBudget "mdb-test" is invalid: []: Invalid value: map[string]interface {}{"apiVersion":"healthchecking.openshift.io/v1alpha1", "kind":"MachineDisruptionBudget", "metadata":map[string]interface {}{"annotations":map[string]interface {}{"kubectl.kubernetes.io/last-applied-configuration":"{\"apiVersion\":\"healthchecking.openshift.io/v1alpha1\",\"kind\":\"MachineDisruptionBudget\",\"metadata\":{\"annotations\":{},\"name\":\"mdb-test\",\"namespace\":\"kubemark-provider\"},\"spec\":{\"maxUnavailable\":-2,\"selector\":{\"matchLabels\":{\"machine.openshift.io/cluster-api-cluster\":\"kubemark\",\"sigs.k8s.io/cluster-api-machineset\":\"kubemark-scale-group-2a\"}}}}\n"}, "generation":1, "uid":"f2bab200-b1f5-11e9-9a34-bcf37e375394", "name":"mdb-test", "namespace":"kubemark-provider", "creationTimestamp":"2019-07-29T11:42:30Z"}, "spec":map[string]interface {}{"maxUnavailable":-2, "selector":map[string]interface {}{"matchLabels":map[string]interface {}{"machine.openshift.io/cluster-api-cluster":"kubemark", "sigs.k8s.io/cluster-api-machineset":"kubemark-scale-group-2a"}}}}: validation failure list: spec.maxUnavailable in body should be greater than or equal to 0
Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=1733473