-
Notifications
You must be signed in to change notification settings - Fork 7k
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
feat(helm): add --app-version flag to 'helm install/upgrade' #5492
Conversation
Signed-off-by: Kevin Labesse <kevin@labesse.me>
Signed-off-by: Kevin Labesse <kevin@labesse.me>
That commit include some changes according to #4961 (comment) and adding new boolean into Chart metadata (by default false) for allowing or not the flag --app-version |
Signed-off-by: Kevin Labesse <kevin@labesse.me>
Signed-off-by: Kevin Labesse <kevin@labesse.me>
Is this gtg? |
@marshallford yes, waiting for a review at least |
Signed-off-by: Kevin Labesse <kevin@labesse.me>
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.
Thank you for the PR.
Before we can consider reviewing this further, would you please document how chart developers can allow users to set the --app-version
flag for their chart. From looking at this code, by default, any chart that omits the overrideAppVersion
field (i.e. all charts of the legacy charts) will be unable to use this unless they opt in. Users need to know what they need to do to allow users to override the app version field in their charts.
If you're thinking of porting this over to Helm 3, perhaps @adamreese should take a look at this PR. I'm still concerned about the overall design of allowing users to override chart metadata as part of helm install
.
Thanks!
Signed-off-by: Kevin Labesse <kevin@labesse.me>
Signed-off-by: Kevin Labesse <kevin@labesse.me>
@bacongobbler I haven't look next major version yet, what I should know about it ? Of course, i think porting this in helm 3 By the way I have make changes according to the review |
Signed-off-by: Kevin Labesse <kevin@labesse.me>
Signed-off-by: Kevin Labesse <kevin@labesse.me>
Hello, what is the status of this PR? |
would still really like this feature. |
Any updates about merging this? This is a very useful feature, hope to get it =) |
Circleci fail, but i have no idea why. If someone has explication, i can fix it (i guess) |
|
Signed-off-by: Kevin Labesse <kevin@labesse.me>
…p-version Signed-off-by: Kevin Labesse <kevin@labesse.me>
Thanks @bacongobbler, CircleCI pass successfully now, and no conflict 🎉 |
I'd suggest reaching out and finding another maintainer to review this. I'm uncomfortable merging a PR proposing a design that I don't believe is the right path forward for the chart spec as per my last comment made in #4961 (comment), doubly so now that this PR introduces conditional logic in the chart metadata (via Having a few extra maintainers vet the design would help determine a better path forward for this use case. I'm focusing primarily on Helm 3's ongoing development and security fixes for Helm 2, which is why I have not been spending much time looking at features for Helm 2 such as this one. |
Okay. I've been upgrading to the helm this week, since tiller was finally ditched and 3.0alpha is released. And I have encountered the same problems as all you, guys. And I faced the fact that I can't use appVersion in my workflow. I need ability to set appVersion when I Helm installFirst, we need to understand where the problem starts. Actually, helm install has 2 behaviours:
Feels nice and play, similar to the apt, pip, gem, yum, npm - any package manager. Even newbie will handle helm here.
When we install the local chart, it is not a package yet. As it is not a package and we may not need to make one, do we need to edit anything? Maybe... we need to install it directly, every time, since it is handy. This is where the problem begins. The Use CaseUser has a project. User has CI/CD. CD manages the versioning process. User does not want the repo thing, since project is private or personal. User wants to User wants to use User is stuck. OptionsUser has options:
@bacongobbler gave us a good snippet:
Common approach, but feels weird, since we will have two appVersions, it is not conventional, makes harder to understand the codebase for a newbie. It creates a variety lf approaches for the same configurational problem, which should be simple and convenient, with one source of appVersion
It solves the problem in much more convenient approach when the first one: you will use the same variable, same flow, everything is perfect and shiny! But, it will mangle whole ImmutabilityI totally agree with the points @bacongobbler gave. First, immutability. If we will add arguments like so, what is the difference would be between the values and chart yaml files? What logic would be taken when someone will propose to add one more argument, then one more from the values? It'll be a chaos. If we need Chart.yaml - for release variables, which are bound to the release as artifacts, like appVersion, which is used to glue multiple remote artifacts together. So whole ChartPackage will be a release, like a black box. It should not be accessible when we "install the software" Values.yaml - variables and its defaults. Like arguments for the black box, for a function. It could be supplied, could be overridden. I would even call it Second, we already have approach which solves the problem, @bacongobbler snippet:
The real problemThe real problem is, Using Proposal
|
|
I'd like to add another vote for incorporating this change. We rarely change the chart itself, and only vary image tag and a bunch of meta-information about deployment. In our scenario Please accept this change. |
@iorlas I like your breakdown and your suggestions. Thank you for your insight and feedback, and you make a perfect point RE: this case has already been solved if you |
Problem: helm package packages files into archive, so if we will package it and shove into the repository, it won't be easy to customise it, since you will need to extract it first, then package again and then publish. @eraac, am I correct in understanding problem you describe? So, again, we are not talking about the real problem. Currently Helm consists of multiple idioms. Especially: Chart, Package. PackagePackage is a build artifact, release, application. Package is supposed to be customisable using variables(set/values). Treat it like a build: you have a binary or minimised js/css. Think for a minute, are your application builds supposed to be customisable more than configuration allows? No ChartChart is a template. It is like a source code. You can customise it, take some parts out of it, add another. But when you change the source code, are you complaining you are not able to run is directly on you production environment, w/o compiling it first? We are able in some stacks, but under the hood it is the same compile-then-run, so you won't be able to run it w/o compiling Sooo....The real problem all you guys are struggling: you don't want to use Package idiom. You want to skip it when you are working on the non-public project, so it doesn't make sense to "create some reusable package" And I'm with you all on it! Although I feel like it is solid, clean way to distinguish build-specific and stage-specific configuration. I create package as build artifact, then installing it on multiple stages. Use-case: You have small, pet-project, even a startup, you don't want to deal with such complications Problem: You see Helm as orchestration utility, which consists of: templates, input values. And for you, there are no reasons to have anything beside that! ReasoningAs per my previous comment, And, this exact pull request will break distinguish between package and install. It will make harder for newbies to learn the Helm. It will break the Helm! Proposal@bacongobbler, we need to simplify Helm, we need to support both medium/big and small projects. Small project don't need that. Project app could run the code using In this effort, I would suggest to add new command
|
By the way, there is one use-case described here #3555 (comment)
But I see that |
In our case it's not a "pet project", but a bunch of microservices that are following the same template (code, CI/CD, k8s infra) and share a bunch of CI/CD and k8s setup bits. All of them are owned by different teams and are deployed on separate schedules in same or different k8s clusters. There's really no need in publishing Helm packages, because those packages won't be consumed outside of CI/CD context which builds each microservice. Variables that are important for our scenario are: chart version (i.e. version of the template that is used to install the microservice) and an app version (i.e. version of the microservice which was installed with the template). |
@wasker Is isn't pet project, but it still needs "simplified" behavior: write some scripts, install/upgrade it directly. Am I right? It is what I'm trying to describe. Still, package is not necessary sharable artifact, but it is the way to deliver your app into your cluster. Publishing is a like an additional feature allowed by such design. How you set chart version? Are you ok with setting it manually? It supposed to be, since it is the "scrips version". What would you think if you had such command as I described, And what would you think about using different commands to install remove package and install local scripts? |
@iorlas I'm not attached to the actual command we'd have to use for that. |
A "package and install" command would be very useful and simplify the workflow a bit. Currently I need to find the name and version of the packaged file. Having it "in one go" would be nice. |
Same thing here, so we had to hardcode in CI variables, changing it manually, otherwise it won't deploy. I'm not helm contributor/maintainer, but maybe I'll be able to dedicate some time later this month for PoC. We really need it... |
Closing as we're not planning to move this PR forward. A command that wraps the logic of |
According to @iorlas and @bacongobbler , there is a workaround if we use
|
Oh, it is a pity. My case is like that(IMO a lot of projects have the same)I have a common chart for all my applications so the actual apps use this chart. However, the lifecycle of the app and the lifecycle of the chart are different. They are living in different repos and being deployed by different CI/CD pipelines In my case |
Closes #3555
New pull request for #4961, sorry about that
If applicable: