-
Notifications
You must be signed in to change notification settings - Fork 2k
/
deploy.yaml.tmpl
83 lines (83 loc) · 1.81 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
apiVersion: v1
kind: Namespace
metadata:
labels:
app: terminal-frontend
name: terminal-frontend
---
apiVersion: v1
kind: ConfigMap
metadata:
name: terminal-frontend-config
namespace: terminal-frontend
data:
config.yaml: |-
addr: :3000
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: terminal-frontend
namespace: terminal-frontend
spec:
selector:
matchLabels:
app: terminal-frontend
strategy:
type: RollingUpdate
rollingUpdate:
maxUnavailable: 25%
maxSurge: 25%
template:
metadata:
labels:
app: terminal-frontend
spec:
containers:
- name: terminal-frontend
resources:
limits:
cpu: 100m
memory: 500Mi
requests:
cpu: 10m
memory: 128Mi
securityContext:
runAsNonRoot: true
runAsUser: 1001
allowPrivilegeEscalation: false
capabilities:
drop:
- "ALL"
env:
- name: TTYD_IMAGE
value: {{ .ttydImage }}
- name: SITE
value: {{ .cloudDomain }}
# do not modify this image, it is used for CI/CD
image: ghcr.io/labring/sealos-terminal-frontend:dev
imagePullPolicy: Always
volumeMounts:
- name: terminal-frontend-volume
mountPath: /config.yaml
subPath: config.yaml
volumes:
- name: terminal-frontend-volume
configMap:
name: terminal-frontend-config
---
apiVersion: v1
kind: Service
metadata:
labels:
app: terminal-frontend
name: terminal-frontend
namespace: terminal-frontend
spec:
ports:
- name: http
port: 3000
protocol: TCP
targetPort: 3000
selector:
app: terminal-frontend