Skip to content

Add support for user defined port forwarding#2336

Merged
priyawadhwa merged 13 commits intoGoogleContainerTools:masterfrom
priyawadhwa:user-defined
Jun 28, 2019
Merged

Add support for user defined port forwarding#2336
priyawadhwa merged 13 commits intoGoogleContainerTools:masterfrom
priyawadhwa:user-defined

Conversation

@priyawadhwa
Copy link
Copy Markdown
Contributor

@priyawadhwa priyawadhwa commented Jun 26, 2019

This PR adds support for user defined port forwarding and updates docs around it.

Users can now add something like the following to their skaffold config:

portForward:
- resourceType: deployment
  resourceName: myDep
  namespace: mynamespace
  port: 8080
  localPort: 9000

This PR adds validation for resourceType and sets defaults on namespace and localPort if not specified in the config. Also adds unit tests to test for each of these cases.

@priyawadhwa priyawadhwa changed the title User defined Add support for user defined port forwarding Jun 26, 2019
@balopat balopat added the docs-modifications runs the docs preview service on the given PR label Jun 26, 2019
@container-tools-bot
Copy link
Copy Markdown

Please visit http://35.236.53.50:1313 to view changes to the docs.

@container-tools-bot container-tools-bot removed the docs-modifications runs the docs preview service on the given PR label Jun 26, 2019
@codecov
Copy link
Copy Markdown

codecov bot commented Jun 26, 2019

Codecov Report

Merging #2336 into master will increase coverage by 0.12%.
The diff coverage is 86.88%.

Impacted Files Coverage Δ
pkg/skaffold/schema/latest/config.go 100% <ø> (ø) ⬆️
pkg/skaffold/schema/validation/validation.go 97.56% <100%> (+0.68%) ⬆️
pkg/skaffold/runner/dev.go 63.38% <100%> (ø) ⬆️
pkg/skaffold/schema/defaults/defaults.go 90.41% <100%> (+0.55%) ⬆️
pkg/skaffold/runner/runner.go 68.46% <100%> (+0.24%) ⬆️
...g/skaffold/kubernetes/portforward/pod_forwarder.go 87.32% <100%> (+0.18%) ⬆️
...affold/kubernetes/portforward/forwarder_manager.go 31.57% <50%> (ø) ⬆️
...ffold/kubernetes/portforward/resource_forwarder.go 52% <58.33%> (-0.09%) ⬇️
...g/skaffold/kubernetes/portforward/entry_manager.go 93.1% <66.66%> (-6.9%) ⬇️

Copy link
Copy Markdown
Contributor

@balopat balopat left a comment

Choose a reason for hiding this comment

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

LGTM

@priyawadhwa priyawadhwa added the docs-modifications runs the docs preview service on the given PR label Jun 28, 2019
@container-tools-bot
Copy link
Copy Markdown

Please visit http://35.236.70.48:1313 to view changes to the docs.

@container-tools-bot container-tools-bot removed the docs-modifications runs the docs preview service on the given PR label Jun 28, 2019
@priyawadhwa priyawadhwa merged commit 5be1fa2 into GoogleContainerTools:master Jun 28, 2019
@priyawadhwa priyawadhwa deleted the user-defined branch June 28, 2019 15:07
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.

4 participants