On the OpenShift Documentation for ConfigMaps (https://docs.openshift.com/enterprise/3.2/dev_guide/configmaps.html) is only an example of usage within Pods. But can I use ConfigMaps also inside DeploymentConfig?
The parameter declarations inside Pods look symilar to the DeploymentConfig.
apiVersion: v1
kind: Pod
metadata:
name: dapi-test-pod
spec:
containers:
- name: test-container
image: gcr.io/google_containers/busybox
command: [ "/bin/sh", "-c", "env" ]
env:
- name: SPECIAL_LEVEL_KEY
valueFrom:
configMapKeyRef:
name: special-config
key: special.how
- name: SPECIAL_TYPE_KEY
valueFrom:
configMapKeyRef:
name: special-config
key: special.type
restartPolicy: Never
Both use the env
property.
"spec": {
"containers": [
{
"env": [
{
"name": "PORT",
"value": "${MF-PORT}"
},
{
"name": "NODE_ENV",
"value": "${MF-ENVIRONMENT}"
}
],