-
Notifications
You must be signed in to change notification settings - Fork 4
Example: ConfigMap
Stéphane Brunner edited this page Jul 3, 2024
·
6 revisions
Values present in the metadata config map:
-
CHART_NAMEwith the chart name. -
RELEASE_NAMEwith the release name. -
RELEASE_NAMESPACEwith the namespace. -
WEB_HOSTwith the host of the first ingress. -
SERVICE_<SERCICE>_NAMEwith the service name. -
SERVICE_<SERVICE>_CONTAINER_<CONTAINER>_IMAGE_TAGwith the tag of the service container image.
Create a ConfigMap with one value and use it in a container as an environment variable.
configMaps:
content:
data1:
value: value1
services:
deployment1:
enabled: true
containers:
container1:
image:
repository: camptocamp/image
tag: latest
env:
env1:
type: configMap
name: self
key: data1Create a ConfigMap with one JSON file to be mounted in a container.
configMaps:
content:
data1:
type: json
value: value1
services:
deployment1:
enabled: true
containers:
container1:
image:
repository: camptocamp/image
tag: latest
volumeMounts:
/tmp/file1.json:
name: volume1
subPath: data1.json
readOnly: true
volumes:
volume1:
configMap:
items:
- key: data1
path: data1.yaml