Skip to content

Pod prefix - #9

Open
ChaosInTheCRD wants to merge 4 commits into
rajatjindal:masterfrom
ChaosInTheCRD:pod-prefix
Open

Pod prefix#9
ChaosInTheCRD wants to merge 4 commits into
rajatjindal:masterfrom
ChaosInTheCRD:pod-prefix

Conversation

@ChaosInTheCRD

Copy link
Copy Markdown

Mergeable after #8.

Fixes #7.

This strips out a prefix of pod/ if it exists in the request, before sending to the Kubernetes API. It overwrites the current value, but my thoughts are that there is no need for the user to care about this prefix, nor the Kubernetes API, if it exists.

Comment thread pkg/cmd/evict_pod.go Outdated
}

if len(args) > 1 {
o.podNames = args

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

can this be merged with above if condition?

if len(args) > 0 {
    o.podNames = args
}

Comment thread pkg/cmd/evict_pod.go

if len(o.args) > 0 {
o.podName = o.args[0]
if len(args) == 0 {

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

apologies for super delay in reviewing this PR. if only label is provided, the len(args) can be 0 right?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Allow pod/ prefix on pod name

2 participants