apiVersion: apps/v1
kind: Deployment
metadata:
  labels:
    app: nightwatch
  name: nightwatch
  namespace: nightwatch
spec:
  progressDeadlineSeconds: 600
  replicas: 1
  revisionHistoryLimit: 10
  selector:
    matchLabels:
      app: nightwatch
  strategy:
    rollingUpdate:
      maxSurge: 1
      maxUnavailable: 1
    type: RollingUpdate
  template:
    metadata:
      labels:
        app: nightwatch
    spec:
      containers:
      - image: edevouge/nightwatch:latest
        imagePullPolicy: Always
        name: nightwatch
        ports:
        - containerPort: 8000
          name: http
          protocol: TCP
        resources:
          limits:
            memory: 512Mi
          requests:
            memory: 64Mi
        volumeMounts:
        - mountPath: /etc/nightwatch
          name: config
      restartPolicy: Always
      serviceAccount: nightwatch
      terminationGracePeriodSeconds: 10
      volumes:
      - configMap:
          defaultMode: 420
          name: nightwatch
        name: config
