Refactor IntOrString into a new pkg

pkg/util/intstr is a cleaner encapsulation for this type and supporting
functions.  No behavioral change.
This commit is contained in:
Tim Hockin
2015-11-09 22:28:45 -08:00
parent 3a07af0b28
commit ba383bcfeb
63 changed files with 676 additions and 656 deletions

View File

@@ -33,7 +33,7 @@ import (
"k8s.io/kubernetes/pkg/kubectl"
cmdutil "k8s.io/kubernetes/pkg/kubectl/cmd/util"
"k8s.io/kubernetes/pkg/kubectl/resource"
"k8s.io/kubernetes/pkg/util"
"k8s.io/kubernetes/pkg/util/intstr"
)
// RollingUpdateOptions is the start of the data required to perform the operation. As new fields are added, add them here instead of
@@ -329,8 +329,8 @@ func RunRollingUpdate(f *cmdutil.Factory, out io.Writer, cmd *cobra.Command, arg
Interval: interval,
Timeout: timeout,
CleanupPolicy: updateCleanupPolicy,
MaxUnavailable: util.NewIntOrStringFromInt(0),
MaxSurge: util.NewIntOrStringFromInt(1),
MaxUnavailable: intstr.FromInt(0),
MaxSurge: intstr.FromInt(1),
}
if rollback {
err = kubectl.AbortRollingUpdate(config)