ccyunchina-deploy/roles/proprietary-cloud/templates/web-ui/deployment.yaml

49 lines
1.1 KiB
YAML

apiVersion: apps/v1
kind: Deployment
metadata:
labels:
k8s-app: web-ui
name: web-ui
spec:
replicas: 2
selector:
matchLabels:
k8s-app: web-ui
template:
metadata:
labels:
k8s-app: web-ui
spec:
volumes:
- name: conf
configMap:
name: web-ui
affinity:
podAntiAffinity:
requiredDuringSchedulingIgnoredDuringExecution:
- labelSelector:
matchExpressions:
- key: k8s-app
operator: In
values:
- web-ui
topologyKey: kubernetes.io/hostname
containers:
- image: {{CLOUD_IMAGE_URL}}/{{web_ui_image}}
name: web-ui
ports:
- containerPort: 443
name: http
protocol: TCP
volumeMounts:
- name: conf
mountPath: /etc/nginx/conf.d/upstream.conf
subPath: upstream.conf
resources:
limits:
cpu: "2"
memory: 1Gi
requests:
cpu: 200m
memory: 100Mi