Skip to content

Commit 5ad8d3d

Browse files
committed
f
1 parent 6124fcc commit 5ad8d3d

File tree

4 files changed

+27
-0
lines changed

4 files changed

+27
-0
lines changed

Diff for: pkg/oc/cli/cli.go

+1
Original file line numberDiff line numberDiff line change
@@ -318,6 +318,7 @@ func CommandFor(basename string) *cobra.Command {
318318
default:
319319
// we only need this change for `oc`. `kubectl` should behave as close to `kubectl` as we can
320320
resource.OAPIToGroupified = OAPIToGroupified
321+
kcmdutil.OAPIToGroupifiedGVK = OAPIToGroupifiedGVK
321322
cmd = NewCommandCLI("oc", "oc", in, out, errout)
322323
}
323324

Diff for: pkg/oc/cli/groupification.go

+12
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,18 @@ import (
3131
"github.com/openshift/origin/pkg/user/apis/user"
3232
)
3333

34+
func OAPIToGroupifiedGVK(gvk *schema.GroupVersionKind) {
35+
if len(gvk.Group) > 0 {
36+
return
37+
}
38+
39+
newGroup, ok := oapiKindsToGroup[gvk.Kind]
40+
if !ok {
41+
return
42+
}
43+
gvk.Group = newGroup
44+
}
45+
3446
func OAPIToGroupified(uncast runtime.Object, gvk *schema.GroupVersionKind) {
3547
if len(gvk.Group) > 0 {
3648
return

Diff for: vendor/k8s.io/kubernetes/pkg/kubectl/cmd/run.go

+1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Diff for: vendor/k8s.io/kubernetes/pkg/kubectl/cmd/util/patch_oapi_gvk.go

+13
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)