Skip to content

Commit dd4943c

Browse files
authored
kubectl debug: warning message about legacy profile (kubernetes#127230)
* Add warning message for legacy profile * fix1 * fix2
1 parent ae94546 commit dd4943c

File tree

1 file changed

+5
-0
lines changed
  • staging/src/k8s.io/kubectl/pkg/cmd/debug

1 file changed

+5
-0
lines changed

staging/src/k8s.io/kubectl/pkg/cmd/debug/debug.go

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -399,6 +399,11 @@ func (o *DebugOptions) Validate() error {
399399
}
400400
}
401401

402+
// Warning for legacy profile
403+
if o.Profile == ProfileLegacy {
404+
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".`)
405+
}
406+
402407
return nil
403408
}
404409

0 commit comments

Comments
 (0)