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

Is there a way for a module to use values from a ConfigMap? Or for a bundle to use a Values file? #381

Open
nlongton opened this issue Apr 17, 2024 · 3 comments

Comments

@nlongton
Copy link

We have a module that needs some per-cluster values that we have stored in a ConfigMap under a defined name in a defined namespace.
Currently we have a python wrapper that fetches this and structures it for use in the module.
However we really dont want the extra code and looked at the Bundle Runtime - which whilst it can get the cluster data does not seem to support being given a values file like a module does.

Is there a way to achieve this using timoni?

@stefanprodan
Copy link
Owner

With the Bundle Runtime you map fields from cluster objects to the module values of an instance.

@Ironflash
Copy link

Hi @stefanprodan, I am working on the same project as @nlongton. We are trying to use Timoni as an app abstraction for the internal users of our platform. We have created a collection of Timoni modules which lets the users supply just a values.yaml with a few inputs and we can apply the module using CICD. Our top goal is to not require our users to write anything more than a simple yaml with their app requirements.

Our issue now is that we have some values that are unique depending on the cluster being deployed to and we have put those values in a configmap. I understand that with the use of bundles we can package concept of runtime with a module which would work great, except that bundles do not seem to allow passing in values from the cli which we must have in order to support reusing the same module/bundle across many teams. Having teams create their own bundles exposes too much implementation detail to them. Ideally they don't need to care we are using Timoni.

What would work for us is if we could take our existing modules and wrap them in a bundle which specifies how to map the values from configmap using a runtime to the module. Then in our CICD we can run timoni bundle apply my-app oci://url/to/bundle -n user-namespace --values user-values.yml . Open to other suggestions if we are thinking about this wrong.

Thank you in advance 😄

@jmgilman
Copy link
Contributor

If you want to hide implementation details, the next logical step might be to dynamically generate the bundles yourself. It is CUE, after all, which tends to be very good with transformations.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants