Rancher functionality for using overriding values.yaml (like -f option for helm) at deploy time


I am in need of passing environment specific data to my helm charts at deploy time.

I have investigated the following:

  • parent/subchart passing of global values in parent’s values.yaml
  • passing in answers.yaml via Read From File or Edit as Yaml in UI or via Rest API call.
  • using a Kubernetes ConfigMap for env specific data

The parent/subchart option does not work for my program as we don’t want to stage our environment specific parent chart at build time… we want to have this done at deploy time

For the last two options, I am forced to convert my large environment values.yaml (~500 KB) into a template of key/value pairs. This causes 2 issues. The first issue is due to the fact our environment values.yaml includes mappings/arrays. Our helm charts are designed to loop through specific elements to find the exact value needed for the kubernetes manifest (this was how we designed the charts when we originally investigated the parent/subchart option). When the values.yaml is converted to key/value pairs, it automatically assigns numbers to each element. For example:

environment.service[3].microservice: nginx

We cannot use this as we cannot hardcode that number in our helm chart template.

With all that said, I am able to deploy my charts and passing in environment specific data using an overriding values.yaml and the helm cli like so:

helm install --name test ./test -f environment-values.yaml

Is there functionality for submitting an API call to Rancher to deploy a Catalog App with an overriding values.yaml passed in? We want to use Rest API calls for deployments but may have deploy tiller separately and handle our deployments using only the helm cli.

Appreciate all the help I can get!

1 Like

Wow that looks great! What version of rancher are you using? I don’t see that field available in my API page

I’m usually running master for development, fairly sure this is in 2.2.x though.

1 Like

Thanks so much. I am in the process of upgrading now. Appreciate the quick support.