mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-23 03:41:45 +00:00
Merge pull request #91858 from SataQiu/fix-kubectl-2020060603
kubectl: fix the bug that kubectl scale does not honor --timeout flag
This commit is contained in:
commit
7fc3d9771b
@ -62,10 +62,6 @@ var (
|
||||
kubectl scale --replicas=3 statefulset/web`))
|
||||
)
|
||||
|
||||
const (
|
||||
timeout = 5 * time.Minute
|
||||
)
|
||||
|
||||
type ScaleOptions struct {
|
||||
FilenameOptions resource.FilenameOptions
|
||||
RecordFlags *genericclioptions.RecordFlags
|
||||
@ -234,7 +230,7 @@ func (o *ScaleOptions) RunScale() error {
|
||||
|
||||
var waitForReplicas *scale.RetryParams
|
||||
if o.Timeout != 0 && o.dryRunStrategy == cmdutil.DryRunNone {
|
||||
waitForReplicas = scale.NewRetryParams(1*time.Second, timeout)
|
||||
waitForReplicas = scale.NewRetryParams(1*time.Second, o.Timeout)
|
||||
}
|
||||
|
||||
counter := 0
|
||||
|
Loading…
Reference in New Issue
Block a user