apiVersion: apps/v1
kind: Deployment
metadata:
  name: selenium-node-chrome
  labels:
    app: selenium-node-chrome
spec:
  replicas: 1
  selector:
    matchLabels:
      app: selenium-node-chrome
  template:
    metadata:
      labels:
        app: selenium-node-chrome
    spec:
      volumes:
        - name: dshm
          emptyDir:
            medium: Memory
      containers:
        - name: selenium-node-chrome
          image: selenium/node-chrome:3.141.59-20201119
          ports:
            - containerPort: 5555
          volumeMounts:
            - mountPath: /dev/shm
              name: dshm
          env:
            - name: HUB_HOST
              value: "selenium-hub"
            - name: HUB_PORT
              value: "4444"
            # Declare NODE_PORT manually and set default value (5555)
            # Leaving it undeclared will result the following exception
            # Caused by: org.openqa.selenium.json.JsonException: Unable to coerce to a number: BOOLEAN
            - name: NODE_PORT
              value: "5555"
          resources:
            limits:
              memory: "1000Mi"
              cpu: ".5"
