rules_helm icon indicating copy to clipboard operation
rules_helm copied to clipboard

Add a test to showcase creating a chart/package then using it for multiple instantiations.

Open borg286 opened this issue 9 months ago • 0 comments

I have some template yamls which define a statefulset, 2 configmaps, and a service. I've got these in a bazel project. I can wrap it with either helm_package or helm_chart, like so

helm_chart(
  name = "redis_instance",
  install_name = "redis_instance",
  templates = [glob("templates/*.yaml")
  ...
)

I can then invoke the redis_instance.upgrade to install this instance in my k8s cluster.

But what I want is to be able to define it as more a library, or a helm chart, and then elsewhere in my codebase make a redis_instance1 and elsewhere define redis_instance2. Both would point to the same chart, but each would have their own install_name. Each would spin up different instances, with their own values to override the common template. I'd think this'd be done with helm_install and point to the singular helm_chart build rule somehow. I'd also like to make helm_uninstall that shares the same install_name as it's helm_install sister target. When I tried doing something like this helm_uninstall broke. That is a separate issue

The main request here is to create an example in the tests folder that showcases such a setup.

borg286 avatar Apr 19 '25 02:04 borg286