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

Add option to pass values.yaml to helm_upgrade #71

Open
borg286 opened this issue Mar 3, 2024 · 1 comment
Open

Add option to pass values.yaml to helm_upgrade #71

borg286 opened this issue Mar 3, 2024 · 1 comment
Labels
enhancement New feature or request

Comments

@borg286
Copy link

borg286 commented Mar 3, 2024

I'd like to be able to have a bazel rule that generates a values.yaml file and pass that into a helm_upgrade target.
Currently I'd have to hard-code them in the opts array, and it looks fairly ugly.
Currently the only way to pass in values is with helm_chart or helm_package, but if I import the helm chart via helm_import_repository, then I don't have a way to pass in values.yaml.

@johansja
Copy link

Not sure if the issue I'm currently facing is identical to this. Basically I defined a BUILD file and a few values.yaml which looks like this:

load("@rules_helm//helm:defs.bzl", "chart_file", "helm_chart")

chart_file(
    name = "file",
    api_version = "v2",
    app_version = "{BUILD_EMBED_LABEL}",
    chart_name = "sample",
    description = "A Helm chart for Kubernetes",
    type = "application",
    version = "0.1.14",
)

helm_chart(
    name = "test",
    chart = ":file",
    images = ["//src/docker/sample:push"],
    install_name = "sample",
    values = "values.yaml",
)

helm_chart(
    name = "staging",
    chart = ":file",
    images = ["//src/docker/sample:push"],
    install_name = "sample",
    values = "values-staging.yaml",
)

helm_chart(
    name = "production",
    chart = ":file",
    images = ["//src/docker/sample:push"],
    install_name = "sample",
    values = "values-production.yaml",
)

Upon issuing bazel run --stamp --embed_label 2024032201 //:test.upgrade, I noticed that whatever changes that I have done in values.yaml won't be reflected in the release.

@abrisco abrisco added the enhancement New feature or request label Aug 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants