Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
[design] revise port-forwarding behaviour #4832
[design] revise port-forwarding behaviour #4832
Changes from 4 commits
3810eb8
030f14f
1cac7f1
3ed71dc
2c45f8a
4f74bee
497ab40
3dc6da5
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
remove since you have a similar note above?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Will remove once I've confirmed that this can't be done.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is this meant to be extended in the future? seems strange to add a top-level
defaults
field if there's only port-related config in it. maybe we can add this in theportForward
stanza instead?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I had been thinking that we could put other defaults in here, like
default-repo
(#2317), but most of our other settings are found under the appropriate area.The
portForward
block is an array of definitions, and I didn't think of an obvious field name to tuck them under.definitions
?resources
?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
does persisting this in the global config mean that
dev
anddebug
will default to it in the absence of an explicit flag for every project? I'm not sure if that's a good thing. Doesn't seem likeportForwardModes
is a global (shared across projects sort of) variable like kubecontext or default repo.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it'd probably look better as a per-project default but I don't think we have that granularity yet in the global config.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It could also be set on a per-context basis within the
~/.skaffold/config
. The global default is good for people who are adamant that they never ever want port-forwarding.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
IMHO it's better to preserve the defaults for every new project. There's already a way to set it globally via the generated env variable
SKAFFOLD_PORT_FORWARD_MODES
. And all the other properties stored in global config inherently make sense persisted across projects. Is there any issue created by the adamant user?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
#1564 has a few comments. At that time we forwarded all containers across all pods, so it could be confusing. With saner defaults, this shouldn't be an issue, but it is worth implementing here.