forked from labring/sealos
-
Notifications
You must be signed in to change notification settings - Fork 0
/
deploy.yaml.tmpl
100 lines (100 loc) · 2.49 KB
/
deploy.yaml.tmpl
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
apiVersion: v1
kind: Namespace
metadata:
labels:
app: applaunchpad-frontend
name: applaunchpad-frontend
---
apiVersion: v1
kind: ConfigMap
metadata:
name: applaunchpad-frontend-config
namespace: applaunchpad-frontend
data:
config.yaml: |-
addr: :3000
form_slider_config.json: |-
{
"NoGpu": {
"cpu": [100, 200, 500, 1000, 2000, 3000, 4000, 8000],
"memory": [64, 128, 256, 512, 1024, 2048, 4096, 8192, 16384]
}
}
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: applaunchpad-frontend
namespace: applaunchpad-frontend
spec:
replicas: 1
selector:
matchLabels:
app: applaunchpad-frontend
strategy:
type: RollingUpdate
rollingUpdate:
maxUnavailable: 25%
maxSurge: 25%
template:
metadata:
labels:
app: applaunchpad-frontend
spec:
containers:
- env:
- name: SEALOS_DOMAIN
value: {{ .cloudDomain }}
- name: MONITOR_URL
value {{ .monitorUrl }}
- name: DOMAIN_PORT
value: "{{ if .cloudPort }}:{{ .cloudPort }}{{ end }}"
- name: INGRESS_SECRET
value: {{ .ingressSecret }}
- name: GUIDE_ENABLED
value: "false"
name: applaunchpad-frontend
securityContext:
runAsNonRoot: true
runAsUser: 1001
allowPrivilegeEscalation: false
capabilities:
drop:
- "ALL"
resources:
limits:
cpu: 2000m
memory: 2048Mi
requests:
cpu: 10m
memory: 128Mi
# do not modify this image, it is used for CI/CD
image: ghcr.io/labring/sealos-applaunchpad-frontend:latest
imagePullPolicy: Always
volumeMounts:
- name: applaunchpad-frontend-volume
mountPath: /config.yaml
subPath: config.yaml
- mountPath: /app/data/form_slider_config.json
name: applaunchpad-frontend-volume
subPath: form_slider_config.json
volumes:
- name: applaunchpad-frontend-volume
configMap:
name: applaunchpad-frontend-config
---
apiVersion: v1
kind: Service
metadata:
labels:
app: applaunchpad-frontend
name: applaunchpad-frontend
namespace: applaunchpad-frontend
spec:
ports:
- name: http
port: 3000
protocol: TCP
targetPort: 3000
selector:
app: applaunchpad-frontend