Skip to content
This repository has been archived by the owner on Jan 9, 2023. It is now read-only.

Disable cobra flags after kubectl sub-command #621

Merged
merged 2 commits into from
Nov 28, 2018

Conversation

JoshVanL
Copy link
Contributor

What this PR does / why we need it:
This fixes a problem whereby we were not passing flags or -- to kubectl correctly as they were being interpreted by croba, e.g. tarmak kubectl exec -it shell-demo -- /bin/bash
This sets all arguments after kubectl to be passed to kubectl.

fixes #477

Disable cobra interpreting flags after kubectl sub-command

/assign @simonswine

@jetstack-bot jetstack-bot added release-note Denotes a PR that will be considered when it comes time to generate release notes. dco-signoff: yes Indicates that all commits in the pull request have the valid DCO sign-off message. labels Nov 12, 2018
@jetstack-bot jetstack-bot added the size/S Denotes a PR that changes 10-29 lines, ignoring generated files. label Nov 12, 2018
@simonswine
Copy link
Contributor

I think a PR should remove the workaround code in here: https://github.com/jetstack/tarmak/blob/master/cmd/tarmak/cmd/root.go#L46

And also apply for the SSH command. A important test is if all arguments before kubectl/ssh are still parsed accordingly by tarmak

@JoshVanL
Copy link
Contributor Author

/unassign @simonswine
/assign

@jetstack-bot jetstack-bot assigned JoshVanL and unassigned simonswine Nov 14, 2018
@simonswine simonswine added this to the release-0.6 milestone Nov 14, 2018
@jetstack-bot jetstack-bot added size/L Denotes a PR that changes 100-499 lines, ignoring generated files. and removed size/S Denotes a PR that changes 10-29 lines, ignoring generated files. labels Nov 14, 2018
@JoshVanL JoshVanL force-pushed the 477-fix-kubectl-flag-parsing branch 2 times, most recently from 619ff9a to 87bcd81 Compare November 14, 2018 18:59
@JoshVanL
Copy link
Contributor Author

/unassign
/assign @simonswine

@jetstack-bot jetstack-bot assigned simonswine and unassigned JoshVanL Nov 14, 2018
@jetstack-bot jetstack-bot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Nov 21, 2018
@simonswine simonswine added this to In progress in release-0.6 Nov 23, 2018
Signed-off-by: JoshVanL <vleeuwenjoshua@gmail.com>
Signed-off-by: JoshVanL <vleeuwenjoshua@gmail.com>
@jetstack-bot jetstack-bot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Nov 23, 2018
@simonswine simonswine moved this from In progress to Needs review in release-0.6 Nov 27, 2018
@simonswine
Copy link
Contributor

Nice work. Esp the testing @JoshVanL

Wasn't able to break it.

@simonswine
Copy link
Contributor

/lgtm

@jetstack-bot jetstack-bot added the lgtm Indicates that a PR is ready to be merged. label Nov 28, 2018
@simonswine
Copy link
Contributor

/approved

@simonswine simonswine added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Nov 28, 2018
@jetstack-bot
Copy link
Collaborator

[APPROVALNOTIFIER] This PR is APPROVED

Approval requirements bypassed by manually added approval.

This pull-request has been approved by:

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@jetstack-bot jetstack-bot merged commit e739f92 into jetstack:master Nov 28, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. dco-signoff: yes Indicates that all commits in the pull request have the valid DCO sign-off message. lgtm Indicates that a PR is ready to be merged. release-note Denotes a PR that will be considered when it comes time to generate release notes. size/L Denotes a PR that changes 100-499 lines, ignoring generated files.
Projects
No open projects
release-0.6
  
Needs review
Development

Successfully merging this pull request may close these issues.

kubectl exec throwing error
3 participants