LogoLogo
  • Welcome to Release
  • Getting started
    • Quickstart
    • Create an account
    • Prepare to use Release
    • Create an application
      • Create custom application
      • Create from template
      • Servers vs runnables
    • Create an environment
  • Guides and examples
    • Domains and DNS
      • Manage domains
      • DNS and nameservers
        • Configure GoDaddy
        • Configure Cloudflare
        • Configure Namecheap
        • Other DNS hosts
      • Routing traffic
    • Example applications
      • Full stack voting app
      • Flask and RDS counter app
      • Static site with Gatsby
      • Golang with Postgres and Nginx
      • WordPress with MySQL
      • Spring and PostgreSQL
      • Terraform and Flask
      • OpenTelemetry demo
      • Load balancer with hostname
      • Static JavaScript service
      • SSH bastion access to services
      • ngrok and OAuth for private tunnels
      • Using OAuth Proxy
      • Hybrid Docker and static site
      • App Imports: Connecting two applications
      • Example library
    • Running instances
      • Cron jobs
      • Jobs
      • Using Helm charts
      • Using terminal
      • Viewing logs
      • Troubleshooting
        • ImagePullBackoff error
        • CrashLoopBackoff error
        • Exit codes
        • OOM: out of memory
    • Advanced guides
      • Containers guide
      • Application guide
      • Kubernetes guide
      • Create a cluster
      • Upgrade a cluster
      • Managing node groups
      • Patch node groups
      • Hostnames and rules
      • Serve traffic on multiple ports
      • Configure access to your K8s cluster
      • Designing for multiple environments
      • Microservices architecture
      • Monitoring your clusters
      • Performance tuning
      • Visibility and monitoring
      • Working with data
        • Container-based data
        • Seeding and migration
        • Cloud-provided data
        • Golden images
        • Third party
      • Pausing Instant Datasets
        • Application pausing schedules
        • Pause/resume environments
      • Infrastructure as code
        • Terraform
  • Reference documentation
    • Account settings
      • Account info
      • Managing users
      • Build settings
        • Build arguments
        • Build SSH keys
      • Add integrations
      • View clusters and cloud integrations
      • Add datasets
      • Environment handles
    • Workflows in Release
      • Stages of workflows
      • Serial deployments
      • Parallel deployments
      • Rolling deployments
      • Rainbow deployments
    • Networking
      • Network architecture (AWS)
      • Network architecture (GCP)
      • Ingresses
      • IP addresses
      • Cloud-provided services
      • Third-party services
    • Release environment versioning
    • Application settings
      • Application Template
        • Schema definition
      • Default environment variables
      • GitHub
      • Pull requests
      • GitOps
      • Just-in-time file mounts
      • Primary App Link
      • Create application FAQ
      • App-level build arguments
      • Parameters
      • Workspaces
    • End-to-end testing
    • Environment settings
      • Environment configuration
      • Environment variables
        • Environment variable mappings
        • Secrets vaults
        • Using Secrets with GitOps
        • Kubernetes Secrets as environment variables
        • Managing legacy Release Secrets
    • Environment expiration
    • Environment presets
    • Instant datasets on AWS
    • Instant datasets on GCP
    • Instant dataset tasks
      • Tonic Cloud
      • Tonic On-Premise
    • Cloud resources
    • Static service deployment
    • Helm
      • Getting started
      • Version-controlled Helm charts
      • Open-source charts
      • Building Docker images
      • Ingress and networking
      • Configuration
    • GitOps
    • The .release.yaml file
    • Docker Compose conversion support
    • Reference examples
      • Adding and removing services
      • Managing service resources
      • Adding database containers to the Application Template
      • Stock Off-The-Shelf Examples
    • Release API
      • Account Authentication
      • Environments API
        • Create
        • Get
        • Setup
        • Patch
      • User Authentication
      • Environment Presets API
        • Get Environment Preset List
        • Get Environment Preset
        • Put Environment Preset
  • Background concepts
    • How Release works
  • Frequently asked questions
    • Release FAQ
    • AWS FAQ
    • Docker FAQ
    • JavaScript FAQ
  • Integrations
    • Integrations overview
      • Artifactory integration
      • Cloud integrations (AWS)
        • AWS guides
        • Grant access to AWS resources
        • AWS how to increase EIP quota
        • Control your EKS fleet with systems manager
        • Managing STS access
        • AWS Permissions Boundaries
        • Private ECR Repositories
        • Using an Existing AWS VPC
        • Using an Existing EKS Cluster
      • Docker Hub integration
      • LaunchDarkly integration
      • Private registries
      • Slack integration
      • Cloud integrations (GCP)
        • GCP Permissions Boundary
      • Datadog Agent
      • Doppler Secrets Manager
      • AWS Secrets Management
    • Source control integrations
      • GitHub
        • Pull request comments
        • Pull request labels
        • GitHub deployments
        • GitHub statuses
        • Remove GitHub integration
      • Bitbucket
      • GitLab
    • Monitoring and logging add-ons
      • Datadog
      • New Relic
      • ELK (Elasticsearch, Logstash, and Kibana)
  • Release Delivery
    • Create new customer integration
    • Delivery guide
    • Release to customer account access controls
    • Delivery FAQs
  • Release Instant Datasets
    • Introduction
    • Quickstart
    • Security
      • AWS Instant Dataset security
    • FAQ
    • API
  • CLI
    • Getting started
    • Installation
    • Configuration
    • CLI usage example
    • Remote development environments
    • Command reference
      • release accounts
        • release accounts list
        • release accounts select
      • release ai
        • release ai chat
        • release ai config-delete
        • release ai config-init
        • release ai config-select
        • release ai config-upsert
      • release apps
        • release apps list
        • release apps select
      • release auth
        • release auth login
        • release auth logout
      • release builds
        • release builds create
      • release clusters
        • release clusters exec
        • release clusters kubeconfig
        • release clusters shell
      • release datasets
        • release datasets list
        • release datasets refresh
      • release deploys
        • release deploys create
        • release deploys list
      • release development
        • release development logs
        • release development start
      • release environments
        • release environments config-get
        • release environments config-set
        • release environments create
        • release environments delete
        • release environments get
        • release environments list
        • release environments vars-get
      • release gitops
        • release gitops init
        • release gitops validate
      • release instances
        • release instances exec
        • release instances logs
        • release instances terminal
  • Release.ai
    • Release.ai Introduction
    • Getting Started
    • Release.ai Templates
    • Template Configuration Basics
    • Using GPU Resources
    • Custom Workflows
    • Fine Tuning LlamaX
    • Serving Inference
Powered by GitBook
On this page
  • The Helm values file
  • Name template
  • Helm chart environment variables
  • Build image environment variables

Was this helpful?

  1. Reference documentation
  2. Helm

Configuration

PreviousIngress and networkingNextGitOps

Last updated 1 year ago

Was this helpful?

The Helm values file

Helm uses one or more to populate the chart templates.

You can add environment variables to the Helm values file. For example, here is a values.yaml file that uses Release autogenerated environment variables:

web:
  image:
    repository: ${RELEASE_REGISTRY_PATH}
    name: web@sha256
    tag: ${WEB_REGISTRY_IMAGE_SHA}
  hostname: ${WEB_INGRESS_HOST}
  url: "jdbc:postgresql://${WEB_RDS_DB_POOL_HOST}:5432/web"

You can use any of the custom environment variables or Release autogenerated environment variables found in the in your Helm values files.

Name template

Helm allows you to specify a name or name_template to name objects in Kubernetes. Helm charts will populate .Release.name with the value specified by the name_template. By default, Release sets the name_template to the name of the application defined in your application configuration.

The following example shows how to override the default name_template set by Release:

helm:
  name_template: acme-app
...
charts:
- name: vault
  repo_url: https://helm.releases.hashicorp.com
  add: hashicorp
  install: hashicorp/vault
  directory: helm/vault
  values: 
  - values.yml
  name_template: vault
- name: backend
  directory: backend
  values: 
  - values.yaml

It can be useful to override the name_template if you're creating an application template that will be used for multiple applications or on-premise deployments. Helm charts often prefix deployments with the name_template, so you may need to adjust hostnames for internal networking when using the same Application Template for two applications.

This table illustrates how name_template affects the naming of deployments:

Application Name
Name Template
Chart Name Template
Service Name
Deployment Name

acme-app

vault

acme-app-vault

acme-app

vault

vault

vault

acme-app

backend

vault

backend-vault

acme-app

acme

vault

acme-vault

acme-app

acme

vault

vault

vault

Helm chart environment variables

Release allows you to reference environment variables from your source control repository. These values will be loaded by Release and can be used to populate the Helm values.yaml file.

Take a look at this example env_file definition for a Helm chart:

charts:
- name: frontend
  name_template: frontend
  directory: frontend
  values: 
  - values.yaml
  env_file: "/config/frontend.env"
- name: backend
  name_template: backend
  directory: backend
  values: 
  - values.yaml
  env_file: "/config/customers/${customer_name}.env"

You can also define environment variables in the Release environment variables configuration file, which can be used as a reference to an environment-specific configuration. In our example above, you can see that backend loads an env_file based on the CUSTOMER_NAME environment variable set in Release.

Build image environment variables

If you use Release to build your container images and Helm charts to deploy them, you need to use the environment variables generated by Release in the values.yaml file to properly start up your containers.

Release uses the container registry SHA from your container images to allow for the rollback of your application should something go wrong. Using a container registry tag to reference a build is common in many Helm charts, like the example shown below. However, tags can move across images in a given container registry, making it hard to track what code is deployed.

Generated build and container registry environment variables

This table shows example generated values for a container build named backend:

Generated Variable Key
Example Value

RELEASE_REGISTRY_ENDPOINT

12345678900.dkr.ecr.us-east-1.amazonaws.com

RELEASE_REGISTRY_PATH

12345678900.dkr.ecr.us-east-1.amazonaws.com/acme/acme-app

BACKEND_REGISTRY_IMAGE_URL

12345678900.dkr.ecr.us-east-1.amazonaws.com/acme/acme-app/backend@sha256:4852bafb7f7cf76375d0e090f737926210de462ef35c9f9616f8a2e17ebb0dda

BACKEND_REGISTRY_IMAGE_SHA

4852bafb7f7cf76375d0e090f737926210de462ef35c9f9616f8a2e17ebb0dda

Each build defined in Release will generate <SERVICE>_REGISTRY_IMAGE_URL and <SERVICE>_REGISTRY_IMAGE_SHA environment variables to be used in the Helm values.yaml file.

The example values.yaml file below references a build generated by Release and demonstrates a common pattern seen in open-source Helm charts when referencing container images. Notice that we set name to frontend@sha256 to use the container registry SHA:

frontend:
  service:
    name: "frontend"
    image:
      repository: ${RELEASE_REGISTRY_PATH}
      name: frontend@sha256
      tag: ${FRONTEND_REGISTRY_IMAGE_SHA}

This example Helm chart template references a build generated by Release:

containers:
- name: {{ .Values.frontend.service.name }}
  image: {{ .Values.frontend.image.repository }}/{{ .Values.frontend.image.name }}:{{ .Values.frontend.image.tag }}
 

Release-generated environment variables are injected into the values.yaml file and properly reference the container image built by Release.

values.yaml files
environment variables configuration