mirror of
https://github.com/truecharts/library-charts.git
synced 2026-07-05 08:46:22 -03:00
1.9 KiB
1.9 KiB
Environment Variable
Key: env
- Type:
dict - Default:
{} - Helm Template:
- key: ❌
- value: ✅
- secretKeyRef.name: ✅
- secretKeyRef.key: ✅
- configMapKeyRef.name: ✅
- configMapKeyRef.key: ✅
env dict contains environment variables and can be defined in few different formats
Examples:
env:
# Key/Value pairs
ADMIN_PASS: password
# Key/Value pairs (tpl)
ADMIN_PASS: "{{ .Values.app.password }}"
# ConfigMap Key Reference
ADMIN_PASS:
configMapKeyRef:
name: configMap_name
key: configMap_key
# ConfigMap Key Reference (tpl)
ADMIN_PASS:
configMapKeyRef:
name: "{{ .Values.config.name }}"
key: "{{ .Values.config.key }}"
# Secret Key Reference
ADMIN_PASS:
secretKeyRef:
optional: true / false
name: secret_name
key: secret_key
# Secret Key Reference (tpl)
ADMIN_PASS:
secretKeyRef:
optional: true / false
name: "{{ .Values.config.name }}"
key: "{{ .Values.config.key }}"
Key: envList
- Type:
list - Default:
[] - Helm Template:
- name: ✅
- value: ✅
envList key is mainly designed to be used in the SCALE GUI.
So users can pass additional environment variables.
Examples:
envList:
# List entry
- name: ADMIN_PASS
value: password
# List entry (tpl)
- name: "{{ .Values.envName }}"
value: "{{ .Values.password }}"
Key: envFrom
- Type:
list - Default:
[] - Helm Template:
- name: ✅
- value: ✅
envFrom key is used to load multiple environment variables
from a configMap or a secret. With a single list entry,
it will load all keys as environment variables
defined in the specified object.
Examples:
envFrom:
# List entry
- secretRef:
name: secretName
- configMapRef:
name: configMapName
# List entry (tpl)
- secretRef:
name: "{{ .Values.secretName }}"
- configMapRef:
name: "{{ .Values.configMapName }}"