34 lines
1.0 KiB
YAML
34 lines
1.0 KiB
YAML
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"
|