Is it possible to use configMap values for port values like containerPort or targetPort?
Here's the possible example how it could work:
apiVersion: extensions/v1beta1
kind: Deployment
metadata:
name: auth
spec:
template:
metadata:
labels:
app: auth
spec:
containers:
- name: auth
image: {{someImage}}
ports:
- name: CONTAINER_PORT
containerPort:
valueFrom:
configMapKeyRef:
name: auth-config
key: PORT
env:
- name: PORT
valueFrom:
configMapKeyRef:
name: auth-config
key: PORT