Skip to content
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

Remove TODO: check for defaulting min-available #53047

Merged
merged 1 commit into from
Nov 10, 2017
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
10 changes: 0 additions & 10 deletions pkg/kubectl/pdb.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ package kubectl

import (
"fmt"
"os"

metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/apimachinery/pkg/runtime"
Expand Down Expand Up @@ -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. "+
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

https://k8s-gubernator.appspot.com/build/kubernetes-jenkins/pr-logs/pull/53047/pull-kubernetes-e2e-kops-aws/50520

W0926 16:37:37.741] # k8s.io/kubernetes/pkg/kubectl
W0926 16:37:37.742] pkg/kubectl/pdb.go:21: imported and not used: "os"
W0926 16:37:49.206] !!! [0926 16:37:49] Call tree:
W0926 16:37:49.207] !!! [0926 16:37:49]  1: /go/src/k8s.io/kubernetes/hack/lib/golang.sh:720 kube::golang::build_binaries_for_platform(...)
W0926 16:37:49.209] !!! [0926 16:37:49]  2: hack/make-rules/build.sh:27 kube::golang::build_binaries(...)
W0926 16:37:49.213] !!! [0926 16:37:49] Call tree:
W0926 16:37:49.215] !!! [0926 16:37:49]  1: hack/make-rules/build.sh:27 kube::golang::build_binaries(...)
W0926 16:37:49.219] !!! [0926 16:37:49] Call tree:
W0926 16:37:49.221] !!! [0926 16:37:49]  1: hack/make-rules/build.sh:27 kube::golang::build_binaries(...)

need to remove the "os" import since you removed the only use of the package

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Got it and Thanks

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

"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{
Expand Down