Skip to content

POC: Add support for Release Namespace creation - #6795

Closed
ichekrygin wants to merge 1 commit into
helm:masterfrom
ichekrygin:helm3-namespace
Closed

ichekrygin wants to merge 1 commit into
helm:masterfrom
ichekrygin:helm3-namespace

Conversation

@ichekrygin

Copy link
Copy Markdown

Overview

Currently, in Helm3 there is no way to create Release Namespace during helm chart installation.

Change

Implement functionality to support Release Namespace creation during helm chart install.
While this PR is marked as Proof of Concept (POC) - it attempts at a fully functional solution.
The initial purpose of this PR is to illustrate and support Proposal #6794

Tracking

This issue and the proposed solution is captured in #6794

Additional Context

This issue was discussed previously in and/or partially related to #3305, #5628, #5753

@helm-bot helm-bot added the size/L Denotes a PR that changes 100-499 lines, ignoring generated files. label Oct 26, 2019
@thomastaylor312 thomastaylor312 added feature v3.x Issues and Pull Requests related to the major version v3 labels Oct 28, 2019
@thomastaylor312 thomastaylor312 added this to the 3.1.0 milestone Oct 28, 2019
@ichekrygin
ichekrygin force-pushed the helm3-namespace branch 3 times, most recently from ef0e7d0 to 50de7d8 Compare November 4, 2019 20:42
@cannibal-kush

Copy link
Copy Markdown

Popular request. This also happens to pertain to Microsoft's fabrikate project, which necessitates a feature they call injectNamespace.

@bacongobbler

Copy link
Copy Markdown
Member

This could be accomplished using the new lookup function once we merge #7474. #7473 (comment) demonstrates an example that accomplishes the same thing this PR is asking for: if the namespace does not exist, create it.

Because of that, I'm in favour of closing this, as the use case provided in #6794 can be accomplished using that pattern without introducing any further code.

@ichekrygin

Copy link
Copy Markdown
Author

I briefly scanned #7473 and not fully (yet) understand how does lookup help with Release.Namespace creation. Is it possible to TL;DR; it possibly answering 2 questions:

  • will the lookup help/allow implicit creation of nonexistent release namespace
  • will the lookup help/allow explicit creation of nonexistent release namespace (declaring of namespace in the chart template)

Thank you.

@bacongobbler

bacongobbler commented Jan 30, 2020 •

Copy link
Copy Markdown
Member

yes and yes. Please have a look at the comment I linked above.

@bacongobbler

Copy link
Copy Markdown
Member

Please try it out and let us know if you have further questions.

@mattfarina

Copy link
Copy Markdown
Collaborator

@bacongobbler A few things occurred to me...

  1. The method described in a failed lookup removes all rendered output #7473 (comment) is different in that the chart creator needs to add that rather than it being the ability of the chart installer to do. It moves the role the feature is leveraged by. Wouldn't this be better off as an application operator feature rather than an application distribution feature?
  2. This new setup is generally undocumented. Before this can be closed it should be documented on helm.sh.

If someone is installing someone else's chart they will need to fork it to add the namespace adding. Especially if the chart was designed for Helm v2. I would be interested in landing this to make it easier on app operators / consumers. Thoughts?

@ichekrygin

Copy link
Copy Markdown
Author

Reposting here (since I can't seem to keep up w/ closing): #7473 (comment)

@ichekrygin

Copy link
Copy Markdown
Author

Also see this: #6794 (comment)

@mattfarina

Copy link
Copy Markdown
Collaborator

@ichekrygin Could your rebase your commits. There is now a conflict because of changes to the go.mod and go.sum files.

@ichekrygin

Copy link
Copy Markdown
Author

@mattfarina - rebased, PTAL.

@bacongobbler

Copy link
Copy Markdown
Member

Closing in favour of #7648, which was merged this morning.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

feature size/L Denotes a PR that changes 100-499 lines, ignoring generated files. v3.x Issues and Pull Requests related to the major version v3

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants