56 lines
1018 B
YAML
56 lines
1018 B
YAML
![]() |
apiVersion: apps/v1
|
||
|
kind: Deployment
|
||
|
metadata:
|
||
|
name: mobile
|
||
|
spec:
|
||
|
replicas:
|
||
|
selector:
|
||
|
matchLabels:
|
||
|
app: mobile
|
||
|
template:
|
||
|
metadata:
|
||
|
labels:
|
||
|
app: mobile
|
||
|
spec:
|
||
|
containers:
|
||
|
- name: mobile
|
||
|
image: {{image}}
|
||
|
ports:
|
||
|
- containerPort: 80
|
||
|
resources:
|
||
|
requests:
|
||
|
cpu: "100m"
|
||
|
memory: "256Mi"
|
||
|
limits:
|
||
|
cpu: "4000m"
|
||
|
memory: "4096Mi"
|
||
|
|
||
|
volumeMounts:
|
||
|
- name: config-volume
|
||
|
mountPath: /app/www/web_config.js
|
||
|
subPath: web_config.js
|
||
|
readOnly: true
|
||
|
volumes:
|
||
|
- name: config-volume
|
||
|
configMap:
|
||
|
name: mobile-config
|
||
|
items:
|
||
|
- key: web_config.js
|
||
|
path: web_config.js
|
||
|
|
||
|
---
|
||
|
apiVersion: v1
|
||
|
kind: Service
|
||
|
metadata:
|
||
|
name: mobile
|
||
|
|
||
|
spec:
|
||
|
selector:
|
||
|
app: mobile
|
||
|
ports:
|
||
|
- protocol: TCP
|
||
|
name: mobile
|
||
|
port: 80
|
||
|
targetPort: 80
|
||
|
|