Skip to content

feat: Set values from local files - #3758

Merged
technosophos merged 1 commit into
helm:masterfrom
mumoshu:set-value-from-local-file
Jul 25, 2018
Merged

technosophos merged 1 commit into
helm:masterfrom
mumoshu:set-value-from-local-file

Conversation

@mumoshu

@mumoshu mumoshu commented Mar 24, 2018 •

Copy link
Copy Markdown
Contributor

This adds the --set-file key=filepath flag to install, upgrade, template and lint sub-commands so that the content of the file at the filepath is set to the value for the key.

Resolves #1754

@k8s-ci-robot k8s-ci-robot added size/S Denotes a PR that changes 10-29 lines, ignoring generated files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. labels Mar 24, 2018
@k8s-ci-robot k8s-ci-robot added size/M Denotes a PR that changes 30-99 lines, ignoring generated files. and removed size/S Denotes a PR that changes 10-29 lines, ignoring generated files. labels Apr 6, 2018
@mumoshu
mumoshu force-pushed the set-value-from-local-file branch from 73f686f to 91d2923 Compare April 6, 2018 09:21
@mumoshu

mumoshu commented Apr 6, 2018

Copy link
Copy Markdown
Contributor Author

Regenerated docs so the next CircleCI build should pass now.

@cwedgwood cwedgwood left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

lgtm, i will try this tomorrow

@mumoshu

mumoshu commented Apr 26, 2018

Copy link
Copy Markdown
Contributor Author

Hi @technosophos @bacongobbler @adamreese

Would you mind reviewing this? This is an implementation for the feature requested since one and a half years 😉

@mumoshu

mumoshu commented Apr 26, 2018

Copy link
Copy Markdown
Contributor Author

@cwedgwood Thanks for taking your time!

@mumoshu
mumoshu force-pushed the set-value-from-local-file branch from 91d2923 to 024555f Compare April 26, 2018 08:43
@k8s-ci-robot k8s-ci-robot added size/L Denotes a PR that changes 100-499 lines, ignoring generated files. and removed size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels Apr 26, 2018
@mumoshu
mumoshu force-pushed the set-value-from-local-file branch 2 times, most recently from 909f5c0 to 92b03d6 Compare April 26, 2018 09:13
@mumoshu

mumoshu commented Apr 26, 2018

Copy link
Copy Markdown
Contributor Author

Fixed bugs and tests after a self-review.

@mumoshu

mumoshu commented Apr 26, 2018

Copy link
Copy Markdown
Contributor Author

Just realized that I have to also cover helm lint. Just a moment...

@mumoshu
mumoshu force-pushed the set-value-from-local-file branch from 92b03d6 to f1fc6ef Compare April 26, 2018 10:15
@mumoshu

mumoshu commented Apr 26, 2018

Copy link
Copy Markdown
Contributor Author

Done.

@mumoshu
mumoshu force-pushed the set-value-from-local-file branch from f1fc6ef to b9b3869 Compare April 27, 2018 00:26
@mumoshu

mumoshu commented Apr 27, 2018

Copy link
Copy Markdown
Contributor Author

Missed doc regen 😉Done.

@davidkarlsen

davidkarlsen commented May 12, 2018 •

Copy link
Copy Markdown
Member

@cwedgwood Any progress on this?
@mumoshu Will need to rebase it seems?

@davidkarlsen

Copy link
Copy Markdown
Member

@cwedgwood @technosophos can you please have a look at the PR?

@cwedgwood

Copy link
Copy Markdown

@davidkarlsen it's not my call ... given there are nearly 100 merge requests pending, I imagine this might take some time.

@davidkarlsen

Copy link
Copy Markdown
Member

@cwedgwood OK - sorry for the nagging - who would be the most appropriate reviewer/merger?

@cwedgwood

Copy link
Copy Markdown

@davidkarlsen i think what you've done is fine/appropriate; given the backlog of issues and pull requests you might want to consider forking for now (or merging into another fork that suits you better)

@davidkarlsen

Copy link
Copy Markdown
Member

I'm just hunting for the feature and there seems to be a fair share of interest for it, it is actually @mumoshu doing the hard work :)

OK, we'll sit in line and watch the queue :)

@bacongobbler bacongobbler left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Hey @mumoshu! I had a look at this and the code looks great. Would you mind adding a note about this new feature flag under the following sections?

https://github.com/kubernetes/helm/blob/48e703997016f3edeb4f0b90e6cfdb3456ce3db0/docs/chart_best_practices/values.md#consider-how-users-will-use-your-values

https://github.com/kubernetes/helm/blob/bae4f4bb248a114a0d6cd4fec62d98f5f5453ded/docs/using_helm.md#customizing-the-chart-before-installing

If you find any other sections where --set-file might be useful, please also feel free to add it into the docs. We just need to document new features; we've heard from users that they want to make sure all new features coming into Helm are documented with clear usage examples.

Thanks so much!

@bacongobbler

bacongobbler commented May 15, 2018 •

Copy link
Copy Markdown
Member

@davidkarlsen you rang? ;)

Since this PR is a size/L we'll also need a sign-off from another maintainer.

@mumoshu

mumoshu commented May 16, 2018

Copy link
Copy Markdown
Contributor Author

@bacongobbler Thanks for the review. Good point! I completed adding docs to everywhere I think good.

Would you mind taking a look once again?

@mumoshu
mumoshu force-pushed the set-value-from-local-file branch 3 times, most recently from bdb4f18 to a1fb0f9 Compare July 25, 2018 01:44
@mumoshu

mumoshu commented Jul 25, 2018

Copy link
Copy Markdown
Contributor Author

@technosophos Thanks for the review! I reverted the changes that turned out wrong. It should be good to go now.

@mumoshu

mumoshu commented Jul 25, 2018

Copy link
Copy Markdown
Contributor Author

For your reference, here's the commits I made in order to revert things. They're already incorporated and squashed into this PR, but I thought it would help your review.

Adds the `--set-file key=filepath` flag to `install`, `upgrade`, `template` and `lint` sub-commands so that the content of the file at the `filepath` is set to the value for the `key`.

Resolves helm#1754
@mumoshu
mumoshu force-pushed the set-value-from-local-file branch from a1fb0f9 to 1edb839 Compare July 25, 2018 01:54
@technosophos technosophos added this to the 2.11.0 - Features milestone Jul 25, 2018

@technosophos technosophos left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Thank you for the quick turn-around on the TLS options. This is looking great.

@wpc009

wpc009 commented Oct 10, 2018 •

Copy link
Copy Markdown

The document is not very clear about how this --set-file option works.
I figured it out that --set-file key=path_to_file will treat the content of path_to_file as multilines string, and set it to variable key. This description should be added to the docs.
The first time I see the --set-file option, I expecting that helm will import values from the file provided.

@mumoshu

mumoshu commented Oct 10, 2018

Copy link
Copy Markdown
Contributor Author

@wpc009 Hey! Thx for the feedback.
Honestly I did my best to make it as clear as possible.
So would you mind proposing alternative sentence(s)?

@wpc009

wpc009 commented Oct 18, 2018 •

Copy link
Copy Markdown

set values from respective files specified via the command line

This line makes user think that --set-file may read the provided file as YAML and override the value.
This is the part that I get confused.

splisson pushed a commit to splisson/helm that referenced this pull request Dec 6, 2018
Adds the `--set-file key=filepath` flag to `install`, `upgrade`, `template` and `lint` sub-commands so that the content of the file at the `filepath` is set to the value for the `key`.

Resolves helm#1754

Signed-off-by: Sebastien Plisson <[email protected]>
splisson pushed a commit to splisson/helm that referenced this pull request Dec 6, 2018
Adds the `--set-file key=filepath` flag to `install`, `upgrade`, `template` and `lint` sub-commands so that the content of the file at the `filepath` is set to the value for the `key`.

Resolves helm#1754

Signed-off-by: Sebastien Plisson <[email protected]>
splisson pushed a commit to splisson/helm that referenced this pull request Dec 6, 2018
Adds the `--set-file key=filepath` flag to `install`, `upgrade`, `template` and `lint` sub-commands so that the content of the file at the `filepath` is set to the value for the `key`.

Resolves helm#1754
splisson pushed a commit to splisson/helm that referenced this pull request Dec 6, 2018
Adds the `--set-file key=filepath` flag to `install`, `upgrade`, `template` and `lint` sub-commands so that the content of the file at the `filepath` is set to the value for the `key`.

Resolves helm#1754
jianghang8421 pushed a commit to jianghang8421/helm that referenced this pull request Feb 17, 2019
Adds the `--set-file key=filepath` flag to `install`, `upgrade`, `template` and `lint` sub-commands so that the content of the file at the `filepath` is set to the value for the `key`.

Resolves helm#1754
@mattfarina mattfarina added the Needs v3 backport Label PRs for v4/main, which are still applicable to v3 so need a separate backport PR label Aug 5, 2019
thomastaylor312 added a commit to thomastaylor312/helm that referenced this pull request Sep 24, 2019
I made a few modifications from the original code to fit in with the new
code layout and to clarify a few things. This is a port of helm#3758

Signed-off-by: Taylor Thomas <[email protected]>
@bacongobbler bacongobbler added the v3 port complete For completed v2->v3 ports label Sep 24, 2019
@gjenkins8 gjenkins8 removed the Needs v3 backport Label PRs for v4/main, which are still applicable to v3 so need a separate backport PR label Dec 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. size/L Denotes a PR that changes 100-499 lines, ignoring generated files. v3 port complete For completed v2->v3 ports

Projects

None yet

Development

Successfully merging this pull request may close these issues.

proposal: import file(s) during helm install

10 participants