From dd4943c831dbc43fb8d410ccdbc27e3c807131fa Mon Sep 17 00:00:00 2001 From: Keita Mochizuki <37737691+mochizuki875@users.noreply.github.com> Date: Fri, 20 Sep 2024 00:28:38 +0900 Subject: [PATCH] kubectl debug: warning message about legacy profile (#127230) * Add warning message for legacy profile * fix1 * fix2 --- staging/src/k8s.io/kubectl/pkg/cmd/debug/debug.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/staging/src/k8s.io/kubectl/pkg/cmd/debug/debug.go b/staging/src/k8s.io/kubectl/pkg/cmd/debug/debug.go index c10426bac01..0c13cfa2cf6 100644 --- a/staging/src/k8s.io/kubectl/pkg/cmd/debug/debug.go +++ b/staging/src/k8s.io/kubectl/pkg/cmd/debug/debug.go @@ -399,6 +399,11 @@ func (o *DebugOptions) Validate() error { } } + // Warning for legacy profile + if o.Profile == ProfileLegacy { + fmt.Fprintln(o.ErrOut, `--profile=legacy is deprecated and will be removed in the future. It is recommended to explicitly specify a profile, for example "--profile=general".`) + } + return nil }