Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

oc debug: add help for --to-namespace #346

Merged
merged 1 commit into from Mar 16, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
8 changes: 7 additions & 1 deletion pkg/cli/debug/debug.go
Expand Up @@ -99,7 +99,13 @@ var (
%[1]s daemonset/test -c second -- /bin/env

# See the pod that would be created to debug
%[1]s mypod-9xbc -o yaml`)
%[1]s mypod-9xbc -o yaml

# Debug a resource but launch the debug pod in another namespace.
# Note: Not all resources can be debugged using --to-namespace without modification. For example,
# volumes and serviceaccounts are namespace-dependent. Add '-o yaml' to output the debug pod definition
# to disk. If necessary, edit the definition then run 'oc debug -f -' or run without --to-namespace.
%[1]s mypod-9xbc --to-namespace testns`)
)
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

might be a bit wordy. from what I see, --to-namespace is the only default flag that causes issues (that a user might stumble across). --node-name causes issues if you try to run a node-role.kubernetes.io/master pod on a worker node 🤷‍♀️


type DebugOptions struct {
Expand Down