Insert Helm / Tiller environment variables along with Kubernetes variables

Everyone can contribute. Help move this issue forward while earning points, leveling up and collecting rewards.

  • Close this issue

Problem to solve

Configuring environment variables required to deploy using Helm in GitLab is a tedious task. Various environment variables need to be set.

image

An alternative is to run the following before every job. However, this is also annoying.

kubectl get secrets/tiller-secret -n gitlab-managed-apps -o "jsonpath={.data['tls\.crt']}" | base64 -d > ~/.helm/cert.pem
kubectl get secrets/tiller-secret -n gitlab-managed-apps -o "jsonpath={.data['tls\.key']}" | base64 -d > ~/.helm/key.pem

GitLab already knows which variables should be used, since it manages Tiller.

Intended users

  • Developer
  • Release Manager

Further details

GitLab already inserts Kubernetes related environment variables. https://docs.gitlab.com/ee/user/project/clusters/#deployment-variables

Proposal

If a Kubernetes environment is specified, GitLab might as well inject Helm related variables along with the other Kubernetes environment variables.

Permissions and Security

Documentation

Helm variables should be added to https://docs.gitlab.com/ee/user/project/clusters/#deployment-variables.

Testing

What does success look like, and how can we measure that?

Links / references

Edited Aug 19, 2025 by 🤖 GitLab Bot 🤖
Assignee Loading
Time tracking Loading