Skip to content

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

@borg286

Description

@borg286

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions