kubernetes-yaml/learn/learn-kubernetes-master/kiamol/ch10/lab/ch10-lab-solution/templates/todo-web-deployment.yaml

32 lines
780 B
YAML

apiVersion: apps/v1
kind: Deployment
metadata:
name: {{ .Release.Name }}
labels:
kiamol: ch10-lab
spec:
selector:
matchLabels:
app: {{ .Release.Name }}
environment: {{ .Values.environment | lower }}
template:
metadata:
labels:
app: {{ .Release.Name }}
environment: {{ .Values.environment | lower }}
spec:
containers:
- name: web
image: kiamol/ch04-todo-list
env:
- name: ASPNETCORE_ENVIRONMENT
value: {{ .Values.environment | title }}
volumeMounts:
- name: config
mountPath: "/app/config"
readOnly: true
volumes:
- name: config
configMap:
name: {{ .Release.Name }}-config