From the course: Kubernetes: Package Management with Helm
Unlock the full course today
Join today to access over 22,700 courses taught by industry experts or purchase this course individually.
Render a ConfigMap value dynamically with Helm templating
From the course: Kubernetes: Package Management with Helm
Render a ConfigMap value dynamically with Helm templating
- Helm is a powerful tool because it's templating engine can dynamically render values. Let's explore this feature by going back to our configmap file in the templates directory. Right now, the name of the configmap is hard coded as first-chart-configmap. Let's figure out how to add the version number of that chart at the end of the configmap name. That value is stored in the chart.yaml file, and right now the chart is version 0.1.0. We could hard-code it by naming the configmap. first-chart-configmap-0.1.0, but you're going to update the chart and it's virgin number often, and you don't want to have to do that by hand, each time you've got a new chart release. This is where Helm templates will make your life easier. The template engine will pull values from the chart.yaml and values.yaml files, and all you have to use is the template directive, which is an opening and closing set of two curly braces like this. We…
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.