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

Allow setup of port forwarder by passing custom PortForward struct #8

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

jcfvalente
Copy link

NewPortForwarderCustom method should allow this. It's basically the same as NewPortForwarder, but by passing a pointer to a previously initialized PortForward struct.

Possible use case: when you know the name,namespace, destination port and listen port and just want to port-forward directly.

Under the current code, this is not possible, as either I would need to provide a labelSelector, which I don't need under this scenario, or I would have to construct everything by hand, having to import all sorts of packages to do it.

Also test updates, I suppose someone forgot to update the assertion strings and tests were failing.

…allow custom creation of PortForward structs while maintaining the rest of the useful creation code. Tied up tests.
@oliviabarrick
Copy link
Owner

Welcome @jcfvalente! It looks like this is your first PR to justinbarrick/go-k8s-portforward 🎉

@oliviabarrick
Copy link
Owner

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: jcfvalente
To fully approve this pull request, please assign additional approvers.
We suggest the following additional approvers:

If they are not already assigned, you can assign the PR to them by writing /assign in a comment when ready.

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

@jcfvalente
Copy link
Author

/assign justinbarrick

@oliviabarrick oliviabarrick self-assigned this Jun 4, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants