forked from pablokbs/peladonerd
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path13-pod-configmap.yaml
33 lines (33 loc) · 1.01 KB
/
13-pod-configmap.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
apiVersion: v1
kind: Pod
metadata:
name: nginx
spec:
containers:
- name: nginx
image: nginx:alpine
env:
# Define the environment variable
- name: PLAYER_INITIAL_LIVES # Nombre de la variable
valueFrom:
configMapKeyRef:
name: game-demo # El confimap desde donde vienen los valores
key: player_initial_lives # La key que vamos a usar
- name: UI_PROPERTIES_FILE_NAME
valueFrom:
configMapKeyRef:
name: game-demo
key: ui_properties_file_name
volumeMounts:
- name: config
mountPath: "/config"
readOnly: true
volumes:
- name: config
configMap:
name: game-demo # el nombre del configmap que queremos montar
items: # Un arreglo de keys del configmap para crear como archivos
- key: "game.properties"
path: "game.properties"
- key: "user-interface.properties"
path: "user-interface.properties"