Skip to content

Commit 0d5516d

Browse files
Merge pull request #130033 from ardaguclu/completion-use-restclientgetter
Add completion in kubectl debug Kubernetes-commit: 990b02bf3952a14249fe74add831a5bb02576995
2 parents 5cbdedb + 246e544 commit 0d5516d

File tree

3 files changed

+6
-4
lines changed

3 files changed

+6
-4
lines changed

go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ require (
2929
github.com/stretchr/testify v1.10.0
3030
golang.org/x/sys v0.30.0
3131
gopkg.in/evanphx/json-patch.v4 v4.12.0
32-
k8s.io/api v0.0.0-20250319053034-feb95d943ada
32+
k8s.io/api v0.0.0-20250319173042-c5abc769f013
3333
k8s.io/apimachinery v0.0.0-20250319092800-e8a77bd768fd
3434
k8s.io/cli-runtime v0.0.0-20250319060948-178adec27e2b
3535
k8s.io/client-go v0.0.0-20250319053412-169f1af1bf07

go.sum

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -196,8 +196,8 @@ gopkg.in/inf.v0 v0.9.1/go.mod h1:cWUDdTG/fYaXco+Dcufb5Vnc6Gp2YChqWtbxRZE0mXw=
196196
gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
197197
gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA=
198198
gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
199-
k8s.io/api v0.0.0-20250319053034-feb95d943ada h1:jkgp/vD+5CoL2n17AMKQ3g3ELsKmn+zBDXqwvpPvmXw=
200-
k8s.io/api v0.0.0-20250319053034-feb95d943ada/go.mod h1:MsIjX9SIqRiiwfw1r0s0lMHaMw6jhSX8h4VjblK393I=
199+
k8s.io/api v0.0.0-20250319173042-c5abc769f013 h1:DeD6ts7mBL7HlhnkmDi00/TYm4yKLFIcpVZsIrJfjcQ=
200+
k8s.io/api v0.0.0-20250319173042-c5abc769f013/go.mod h1:JO0tyTI0qSXXaGVhLdqwfi3RMbS2g9hcYvzBmZP5wVk=
201201
k8s.io/apimachinery v0.0.0-20250319092800-e8a77bd768fd h1:KoXgjwEokLM8o95kMxowg5vp5iQ4v46Kk+zobsqeTgU=
202202
k8s.io/apimachinery v0.0.0-20250319092800-e8a77bd768fd/go.mod h1:D2UW665TVSpInyOuG6C+PMtC1MZheP0KQz65UPQEiI4=
203203
k8s.io/cli-runtime v0.0.0-20250319060948-178adec27e2b h1:U2IpmC0Xy+HhTucipOTB8bW6K9swj0MxHk0QUa1DsRo=

pkg/cmd/cmd.go

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -389,6 +389,8 @@ func NewKubectlCommand(o KubectlOptions) *cobra.Command {
389389
// Avoid import cycle by setting ValidArgsFunction here instead of in NewCmdGet()
390390
getCmd := get.NewCmdGet("kubectl", f, o.IOStreams)
391391
getCmd.ValidArgsFunction = utilcomp.ResourceTypeAndNameCompletionFunc(f)
392+
debugCmd := debug.NewCmdDebug(f, o.IOStreams)
393+
debugCmd.ValidArgsFunction = utilcomp.ResourceTypeAndNameCompletionFunc(f)
392394

393395
groups := templates.CommandGroups{
394396
{
@@ -440,7 +442,7 @@ func NewKubectlCommand(o KubectlOptions) *cobra.Command {
440442
proxyCmd,
441443
cp.NewCmdCp(f, o.IOStreams),
442444
auth.NewCmdAuth(f, o.IOStreams),
443-
debug.NewCmdDebug(f, o.IOStreams),
445+
debugCmd,
444446
events.NewCmdEvents(f, o.IOStreams),
445447
},
446448
},

0 commit comments

Comments
 (0)