[FEATURE]: Support runtime outputs for Helm chart values
See original GitHub issueFeature Request
Background / Motivation
Today, we use a jungle of bash scripts to pass Cloudformation and Terraform outputs to our Helm charts. Typically, these values are indeterminate until deploy time (e.g. AWS RDS endpoint URLs). We were looking to use Garden to streamline handling these outputs.
What should the user be able to do?
A Garden user should be able to reference runtime outputs in their Helm chart values. e.g.
Terraform that creates an SNS topic
----
kind: Module
type: terraform
name: tf-infra
---
kind: Module
type: helm
.
.
.
serviceResource:
containerModule: docker-image
dependencies:
- tf-infra
values:
microservice:
appConfig:
environment:
SNS_TOPIC_ARN: ${runtime.services.tf-infra.outputs.sns_topic_arn}
# or
# SNS_TOPIC_ARN: ${providers.terraform.outputs.sns_topic_arn}
image:
repository: ${modules.docker-image.outputs.deployment-image-name}
tag: ${modules.docker-image.version}
Why do they want to do this? What problem does it solve?
It allows runtime outputs from Terraform (or other modules such as exec) to be resolvable at deploy time.
Suggested Implementation(s)
- Allow the Helm module
values:
stanza to resolve runtime outputs. - Add an additional
setValues:
stanza to the Helm module to allow runtime variables to be passed to Helm via--set
at deploy time.
How important is this feature for you/your team?
🥀 Crucial, Garden is unusable for us without it
We want to take a machete to our jungle of bash. Please help! 😃
Issue Analytics
- State:
- Created 3 years ago
- Reactions:10
- Comments:6
Top Results From Across the Web
Helm Get Values
This command downloads a values file for a given release. helm get ... --help help for values -o, --output format prints the output...
Read more >Dump Variables in Helm Charts - ITNEXT
Helm allows you to describe your Kubernetes deployment with Go template language and supply different config values to customise your ...
Read more >Deploy Helm Charts - Harness.io Docs
You can deploy Helm charts in standard Helm syntax in YAML from a remote Git repo, HTTP Helm Repository, or cloud storage service...
Read more >does helm have feature of print? - Stack Overflow
When you want to test the template rendering, but not actually install anything, you can use helm install ./mychart --debug --dry-run. This will ......
Read more >Speed deployment on Kubernetes with Helm Chart - IBM
yaml file and should be overwritten at runtime by Chart deployers. There are many ways to handle this type of configuration, but the...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Just for a bit of context, the reason for the current implementation was to allow plugins like
conftest-kubernetes
to validate rendered charts ahead of deployment. So it’s not quite trivial to address, but it’s worth figuring out for sure.Ok, this should be ready in our next release.