apiVersion: apps/v1
kind: Deployment
metadata:
  name: selenium-grid-hub-deployment
  labels:
    app: selenium-grid-hub
    name: selenium-grid-hub
spec:
  replicas: 1
  selector:
    matchLabels:
      app: selenium-grid-hub
  template:
    metadata:
      labels:
        app: selenium-grid-hub
    spec:
      containers:
        - name: selenium-grid-hub
          image: selenium/hub:3.14.0
          env:
            - name: JAVA_OPTS
              value: "-Xmx1024m"
            - name: POOL_MAX
              value: "500"
            - name: GRID_NEW_SESSION_WAIT_TIMEOUT
              value: "-1"
            - name: GRID_JETTY_MAX_THREADS
              value: "-1"
            - name: GRID_NODE_POLLING
              value: "5000"
            - name: GRID_CLEAN_UP_CYCLE
              value: "5000"
            - name: GRID_TIMEOUT
              value: "600"
            - name: GRID_BROWSER_TIMEOUT
              value: "600"
            - name: GRID_MAX_SESSION
              value: "5"
            - name: GRID_UNREGISTER_IF_STILL_DOWN_AFTER
              value: "30000"
          ports:
            - containerPort: 4444
              protocol: TCP