kubectl debug: warning message about legacy profile (#127230)

* Add warning message for legacy profile

* fix1

* fix2

Kubernetes-commit: dd4943c831dbc43fb8d410ccdbc27e3c807131fa
This commit is contained in:
Keita Mochizuki 2024-09-20 00:28:38 +09:00 committed by Kubernetes Publisher
parent 650e81b1f2
commit 90452b2e92
1 changed files with 5 additions and 0 deletions

View File

@ -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
}