blob: de5899dd59185f6a9879565f2af322a804295b51 [file] [log] [blame] [edit]
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: firefox-node
labels:
app: firefox-node
spec:
replicas: 1
selector:
matchLabels:
app: firefox-node
template:
metadata:
labels:
app: firefox-node
spec:
containers:
- name: firefox-node
image: "selenium/firefox-node:latest"
imagePullPolicy: Always
command:
- /opt/selenium/bin/selenium.sh
- --ext
- /opt/selenium/libk8s.jar
- node
- -p
- "5555"
- --max-sessions
- "1"
- --stereotype
- '{"browserName":"firefox"}'
ports:
- containerPort: 5555
- containerPort: 5900 # VNC
env:
- name: EVENTS_BIND
value: "false"
- name: EVENTS_PUBLISH
value: "tcp://event-bus:4442"
- name: EVENTS_SUBSCRIBE
value: "tcp://event-bus:4443"
- name: NODE_IMPLEMENTATION
value: "org.openqa.selenium.grid.node.k8s.OneShotNode"
- name: NODE_GRID_URL
value: "http://localhost:4444/"
- name: NODE_REGISTER_CYCLE
value: "10"
- name: NODE_REGISTER_PERIOD
value: "120"
resources:
limits:
memory: "1Gi"
cpu: "2"
livenessProbe:
tcpSocket:
port: 5555
initialDelaySeconds: 2
periodSeconds: 5
readinessProbe:
httpGet:
port: 5555
path: "/readyz"
initialDelaySeconds: 2
periodSeconds: 60
---
apiVersion: v1
kind: Service
metadata:
name: firefox-node
labels:
run: firefox-node
spec:
type: NodePort
selector:
app: firefox-node
ports:
- port: 5555
targetPort: 5555
protocol: TCP
name: web
- port: 5900
targetPort: 5900
protocol: TCP
name: vnc