Add configmap tests

This commit is contained in:
Nico Schottelius 2021-06-08 14:49:02 +02:00
parent 26c0b967a1
commit 3d302a912f
2 changed files with 52 additions and 0 deletions

View File

@ -0,0 +1,36 @@
apiVersion: v1
kind: Pod
metadata:
name: alpine-sleep
spec:
containers:
- name: alpine
image: alpine:3.13
args:
- sleep
- "1000000"
volumeMounts:
- name: config
mountPath: "/etc/configmap"
readOnly: true
volumes:
- name: config
configMap:
name: cm-test-alpine
---
apiVersion: v1
kind: ConfigMap
metadata:
name: cm-test-alpine
data:
# property-like keys; each key maps to a simple value
nick_name: "13"
# file-like keys
game.properties: |
enemy.types=aliens,monsters
player.maximum-lives=5
user-interface.properties: |
color.good=purple
color.bad=yellow
allow.textmode=true

16
generic/configmap.yaml Normal file
View File

@ -0,0 +1,16 @@
apiVersion: v1
kind: ConfigMap
metadata:
name: cm-test
data:
# property-like keys; each key maps to a simple value
nick_name: "13"
# file-like keys
game.properties: |
enemy.types=aliens,monsters
player.maximum-lives=5
user-interface.properties: |
color.good=purple
color.bad=yellow
allow.textmode=true