Commit 29a11be6 authored by yuexiao-wang's avatar yuexiao-wang

Remove the default for min-available

parent b188868f
......@@ -18,7 +18,6 @@ package kubectl
import (
"fmt"
"os"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/apimachinery/pkg/runtime"
......@@ -167,15 +166,6 @@ func (s *PodDisruptionBudgetV2Generator) StructuredGenerate() (runtime.Object, e
return nil, err
}
if len(s.MaxUnavailable) == 0 && len(s.MinAvailable) == 0 {
s.MinAvailable = "1"
// This behavior is intended for backward compatibility.
// TODO: remove in Kubernetes 1.8
fmt.Fprintln(os.Stderr, "Deprecated behavior in kubectl create pdb: Defaulting min-available to 1. "+
"Kubernetes 1.8 will remove this default, and one of min-available/max-available must be specified. ")
}
if len(s.MaxUnavailable) > 0 {
maxUnavailable := intstr.Parse(s.MaxUnavailable)
return &policy.PodDisruptionBudget{
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment