Skip to content

Commit bc99210

Browse files
committed
Fix incorrect oc run default option
oc specific 'RunOptions' supplies incorrect default generator for non-RestartAlways jobs. Fixes: https://bugzilla.redhat.com/show_bug.cgi?id=1577770
1 parent 5cfe890 commit bc99210

File tree

2 files changed

+2
-7
lines changed

2 files changed

+2
-7
lines changed

pkg/oc/cli/cmd/wrappers.go

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@ import (
1818
"k8s.io/kubernetes/pkg/kubectl/cmd/config"
1919
"k8s.io/kubernetes/pkg/kubectl/cmd/resource"
2020
"k8s.io/kubernetes/pkg/kubectl/cmd/templates"
21-
kcmdutil "k8s.io/kubernetes/pkg/kubectl/cmd/util"
2221

2322
cmdutil "github.com/openshift/origin/pkg/cmd/util"
2423
"github.com/openshift/origin/pkg/oc/cli/cmd/create"
@@ -474,7 +473,7 @@ var (
474473

475474
// NewCmdRun is a wrapper for the Kubernetes cli run command
476475
func NewCmdRun(fullName string, f *clientcmd.Factory, in io.Reader, out, errout io.Writer) *cobra.Command {
477-
opts := &kcmd.RunOptions{DefaultRestartAlwaysGenerator: "deploymentconfig/v1", DefaultGenerator: kcmdutil.RunPodV1GeneratorName}
476+
opts := &kcmd.RunOptions{DefaultRestartAlwaysGenerator: "deploymentconfig/v1"}
478477
cmd := kcmd.NewCmdRunWithOptions(f, opts, in, out, errout)
479478
cmd.Long = runLong
480479
cmd.Example = fmt.Sprintf(runExample, fullName)

vendor/k8s.io/kubernetes/pkg/kubectl/cmd/run.go

Lines changed: 1 addition & 5 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)