Skip to content
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

Allow to use several values.yaml files (i.e. for different environments) #859

Closed
andresmgot opened this issue Nov 29, 2018 · 22 comments
Closed
Assignees
Labels
component/packages Issue related to kubeapps packaging formats to be distributed (Helm chart and Carvel packages) kind/proposal An issue that reports a new feature proposal to be discussed stale Automatic label to stale issues due inactivity to be closed if no further action
Projects
Milestone

Comments

@andresmgot
Copy link
Contributor

andresmgot commented Nov 29, 2018

We include a second values.yaml on infrastructure charts with values that are supposed to be “production ready”.
It would be good if this file is also shown by Kubeapps.

cc/ @beltran-rubo @juan131

@project-bot project-bot bot added this to Inbox in Kubeapps Nov 29, 2018
@prydonius
Copy link
Contributor

To clarify, this is something that the Bitnami charts offer (e.g. https://github.com/helm/charts/blob/master/stable/mongodb/values-production.yaml). This file is available in the chart package (not in Helm ignore), so we are able to extract it from the chart-repo tool. In the UI, I think we can show a button for "Default" or "Production-optimized" above the values input if we detect a values-production.yaml file in a Chart.

The only reason that we might not want to do this, is that it's not really an adopted standard by the community and only the Bitnami charts implement it (which is not very surprising because there isn't a good way to use and discover the production values using the Helm CLI). That said, I think it does add value to Bitnami chart users in Kubeapps.

@prydonius
Copy link
Contributor

I think we can do a better job of publicising what guidelines the Bitnami charts follow to provide some insight, reasoning and help the community adopt some of the interesting things we're doing with charts. Created bitnami/charts#959.

@migmartri migmartri moved this from Inbox to Backlog in Kubeapps Dec 3, 2018
@fudali113
Copy link

I think it's not just production environments, what if we have multiple environments? Can values-*.yaml be supported?

@prydonius
Copy link
Contributor

@fudali113 interesting idea, do you have any examples of charts that have other values-*.yaml files today?

@RomanGz
Copy link

RomanGz commented Jan 7, 2019

+1

Would be great to be able to specify which values file to use like you can with helm cli. Having one chart, but different values templated into configmaps for dev/qa/prod, etc.

@fudali113
Copy link

@fudali113 interesting idea, do you have any examples of charts that have other values-*.yaml files today?

my use cases like with @rgazaryants

Would be great to be able to specify which values file to use like you can with helm cli. Having one chart, but different values templated into configmaps for dev/qa/prod, etc.

@prydonius

@prydonius
Copy link
Contributor

So the idea here would be to save sets of values files (in a configmap, or CRD or something) and then be able to choose from them to apply during deployment? Sort of like templates you can save and reuse?

@fudali113
Copy link

yes, choose and not input. reduce error rate

@arapulido arapulido changed the title Allow to use the "values-production.yaml" Allow to use several values.yaml files (i.e. for different environments) Feb 7, 2019
@arapulido arapulido added the kind/feature An issue that reports a feature (approved) to be implemented label Feb 7, 2019
@alexandredantas
Copy link

@prydonius I'm willing to contribute with this feature. Currently, I'm working on Gympass and we are needing this feature. Is that ok?

@absoludity
Copy link
Contributor

Hi @alexandredantas . There's been a few options on this thread... but one of the key factors is that this isn't (yet?) a standard property of helm charts, so yes we can update Kubeapps to check for multiple values.yaml files when importing charts so that when displaying charts for install we can include a selector if (and only if) there are multiple?

If you're keen, can you do a PR with a brief design proposal of what you're thinking/planning in https://github.com/kubeapps/kubeapps/tree/master/docs/architecture/design-proposals ? Thanks!

@alexandredantas
Copy link

@absoludity sure, I'm preparing a design proposal. Soon I will commit it to be reviewed. Thanks!

@gkulkarni32
Copy link

gkulkarni32 commented Jan 28, 2021

Hello,
Interesting proposal on the having multiple values-*.yaml available on kubeApps portal. It would be great value add to have other values-*.yaml files displayed if they are detected. Is the development already in progress for this?

Thanks
Geeta

@andresmgot
Copy link
Contributor Author

Hi @gkulkarni32, there has not been progress related to this. It's still not clear how useful this would be since there is no standard related to this. Also, the Bitnami team has stopped supporting several values files (see bitnami/charts#5095).

@danlishka danlishka added this to the 2.3 milestone Feb 10, 2021
@ppbaena ppbaena added the component/project (To be removed) label May 24, 2021
@antgamdia antgamdia added the awaiting-more-evidence Need more info to actually get it done. label May 24, 2021
@frank-bee
Copy link

@gkulkarni32 I think there is no standard neither in helm nor at bitnami.

For our usecase here in my company it would be anyway better to configure the value file(s) either in the kubeapps frontend or when deploying kubeapps (the latter would be enough).

Could be done via another CRD or in the database: allowing to configure apps ( not app repositories ).
Unfortunately for each version of an app may have different value file (s).
The CRD could be uses to overwrite the values file of an app or add a values file to the app ( if multiple value files should be supported). The CRD could contain something like an expression / regex to define for which repo + app + version a value file is contributed.

@frank-bee
Copy link

frank-bee commented Jun 1, 2021

I found another interesting approach to handle user customized values:
https://codefresh.io/docs/docs/configure-ci-cd-pipeline/shared-configuration/#using-shared-helm-values

The user can create "value file snippets" (basically yaml files) and use these during helm install / upgrade.

Could be rather simple and flexible, not?

@absoludity
Copy link
Contributor

@gkulkarni32 I think there is no standard neither in helm nor at bitnami.

For our usecase here in my company it would be anyway better to configure the value file(s) either in the kubeapps frontend or when deploying kubeapps (the latter would be enough).

So I think you mean that when deploying, you'd tell Kubeapps that you want to use a different values.yaml file (such as production-values.yaml) which exists in the chart?

Could be done via another CRD or in the database: allowing to configure apps ( not app repositories ).
Unfortunately for each version of an app may have different value file (s).
The CRD could be uses to overwrite the values file of an app or add a values file to the app ( if multiple value files should be supported). The CRD could contain something like an expression / regex to define for which repo + app + version a value file is contributed.

I don't think a CRD is a good candidate for storing config/state like that. A configmap or secret perhaps, if you mean to associate extra config (such as values.yaml) with a specific chart from a specific repo.

I found another interesting approach to handle user customized values:
https://codefresh.io/docs/docs/configure-ci-cd-pipeline/shared-configuration/#using-shared-helm-values

The user can create "value file snippets" (basically yaml files) and use these during helm install / upgrade.

Could be rather simple and flexible, not?

Depends - seems very different to what you'd originally proposed. It's not clear to me whether you mean several values.yaml options in a chart, or you mean adding values.yaml options for an already published chart? If it's the latter, although yes, you can imagine something like configmaps/secrets being used to define extra values.yaml that could be presented in the Kubeapps UI (when installing a certain chart), they'd be a maintainers nightmare, I think? How would you keep them up to date when a new chart is released, or would you create them per chart version?

Let me know if that's what you're thinking.

@frank-bee
Copy link

frank-bee commented Jun 2, 2021

So I think you mean that when deploying, you'd tell Kubeapps that you want to use a different values.yaml file (such as production-values.yaml)

Correct, that's what we need in our current scenario

...which exists in the chart?

That could be an option.
But in our case the chart itself is open source but the values we use in our deployments are pretty company specific (URLs, CSS styling,..).
That's why I'm thinking if there is a ways to allow a "kubeapps admin" to define these values (Remark: "kubeapps admin" whould be a different persona than the one that deploys the helm charts).
But you are right, could be a maintainers nightmare (the nightmare of this "kubeapps admin").

you can imagine something like configmaps/secrets being used to define extra values.yaml that could be presented in the Kubeapps UI

That would be an option. But it might be difficult to map such a configmap to a chart version or a set of versions (flexible, maintainable). Maybe the user could load / select any kinds of configmaps in the selected namespace (or the ones tagged with a special tag like "value file".

@ppbaena ppbaena removed this from the 2021-Q1 milestone Jul 9, 2021
@absoludity
Copy link
Contributor

As part of our work generalising Kubeapps to support other packaging formats, we'll need to enable selecting other values specifically from config maps or secrets in the namespace, for use during deploy (as, for example, flux enables this with its ValuesReference struct). It won't be supported immediately, but I assume we will be working towards that, and when generalised, it can be available for the direct helm case also.

@ppbaena ppbaena added component/packages Issue related to kubeapps packaging formats to be distributed (Helm chart and Carvel packages) and removed awaiting-more-evidence Need more info to actually get it done. component/project (To be removed) labels Sep 17, 2021
@ppbaena ppbaena added this to the Community requests milestone Sep 24, 2021
@ppbaena ppbaena added kind/proposal An issue that reports a new feature proposal to be discussed and removed kind/feature An issue that reports a feature (approved) to be implemented labels Jun 8, 2022
@stale
Copy link

stale bot commented Dec 24, 2022

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the stale Automatic label to stale issues due inactivity to be closed if no further action label Dec 24, 2022
@stale stale bot closed this as completed Dec 27, 2022
@absoludity absoludity reopened this Jan 8, 2023
@stale stale bot removed the stale Automatic label to stale issues due inactivity to be closed if no further action label Jan 8, 2023
@absoludity
Copy link
Contributor

JFYI, one of the cases here, where the package itself includes the custom default values, has been implemented as part of the separate issue #5692 . I'll leave this issue here open, since IMO it also includes the other options (such as being able to customise the default values without updating the package), and move it back to the backlog until we do that work.

@absoludity absoludity removed their assignment Jan 22, 2023
@stale
Copy link

stale bot commented Feb 11, 2023

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the stale Automatic label to stale issues due inactivity to be closed if no further action label Feb 11, 2023
@absoludity
Copy link
Contributor

JFYI, one of the cases here, where the package itself includes the custom default values, has been implemented as part of the separate issue #5692 . I'll leave this issue here open, since IMO it also includes the other options (such as being able to customise the default values without updating the package), and move it back to the backlog until we do that work.

Actually, the functionality in the latest release implements the original case for this issue: enabling Kubeapps to pick up and display multiple default values files when they are provided in the chart. The extra cases added later for supporting the ability to add these at run-time will be tracked in a separate issue.

@absoludity absoludity self-assigned this Feb 12, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component/packages Issue related to kubeapps packaging formats to be distributed (Helm chart and Carvel packages) kind/proposal An issue that reports a new feature proposal to be discussed stale Automatic label to stale issues due inactivity to be closed if no further action
Projects
Archived in project
Kubeapps
  
Backlog
Development

No branches or pull requests