58 lines
1.2 KiB
YAML
58 lines
1.2 KiB
YAML
apiVersion: apps/v1
|
|
kind: Deployment
|
|
metadata:
|
|
name: playwright-service
|
|
namespace: edu-master
|
|
labels:
|
|
app: edu-master-playwright
|
|
spec:
|
|
replicas: 1
|
|
selector:
|
|
matchLabels:
|
|
app: edu-master-playwright
|
|
template:
|
|
metadata:
|
|
labels:
|
|
app: edu-master-playwright
|
|
spec:
|
|
containers:
|
|
- name: playwright
|
|
image: mcr.microsoft.com/playwright:v1.56.0-jammy
|
|
imagePullPolicy: IfNotPresent
|
|
command:
|
|
- npx
|
|
- -y
|
|
- playwright@1.56.0
|
|
- run-server
|
|
- --port
|
|
- "3000"
|
|
- --path
|
|
- /ws
|
|
ports:
|
|
- containerPort: 3000
|
|
readinessProbe:
|
|
tcpSocket:
|
|
port: 3000
|
|
initialDelaySeconds: 5
|
|
periodSeconds: 10
|
|
timeoutSeconds: 3
|
|
livenessProbe:
|
|
tcpSocket:
|
|
port: 3000
|
|
initialDelaySeconds: 15
|
|
periodSeconds: 20
|
|
timeoutSeconds: 3
|
|
---
|
|
apiVersion: v1
|
|
kind: Service
|
|
metadata:
|
|
name: playwright-service
|
|
namespace: edu-master
|
|
spec:
|
|
selector:
|
|
app: edu-master-playwright
|
|
ports:
|
|
- name: ws
|
|
port: 3000
|
|
targetPort: 3000
|