apiVersion: apps/v1
kind: Deployment
metadata:
  name: selenosis
  namespace: selenosis
spec:
  strategy:
    type: RollingUpdate
    rollingUpdate:
      maxSurge: 1
      maxUnavailable: 1
  replicas: 2
  selector:
    matchLabels:
      app: selenosis
  template:
    metadata:
      labels:
        app: selenosis
        selenosis.app.type: worker
      namespace: selenosis
    spec:
      containers:
      - args: ["/selenosis", "--browsers-config", "./config/browsers.yaml", "--namespace", "selenosis", "--service-name", "seleniferous", "--browser-limit", "10", "--proxy-image", "alcounit/seleniferous:v1.0.2"]
        image: alcounit/selenosis:v1.0.5
        name: selenosis
        resources:
          limits:
            cpu: "0.5"
            memory: "128Mi"
          requests:
            cpu: "0.2"
            memory: "128Mi"
        ports:
        - containerPort: 4444
          name: selenium
          protocol: TCP
        volumeMounts:
        - mountPath: ./config
          name: browsers-config
        imagePullPolicy: IfNotPresent
        readinessProbe:
          httpGet:
            path: /healthz
            port: 4444
          periodSeconds: 2
          initialDelaySeconds: 3
        livenessProbe:
          httpGet:
            path: /healthz
            port: 4444
          periodSeconds: 2
          initialDelaySeconds: 3
      volumes:
      - name: browsers-config
        configMap:
          name: selenosis-config
