apiVersion: apps/v1
kind: Deployment
metadata:
  annotations:
    description: Saved search query runner / notification service.
  labels:
    deploy: sourcegraph
  name: query-runner
spec:
  minReadySeconds: 10
  replicas: 1
  revisionHistoryLimit: 10
  selector:
    matchLabels:
      app: query-runner
  strategy:
    rollingUpdate:
      maxSurge: 1
      maxUnavailable: 0
    type: RollingUpdate
  template:
    metadata:
      labels:
        app: query-runner
    spec:
      containers:
      - env:
        - name: SOURCEGRAPH_CONFIG_FILE
          value: /etc/sourcegraph/config.json
        - name: DEPLOY_TYPE
          value: datacenter
        image: sourcegraph/query-runner:2.11.2@sha256:0a4b5e99c01ded6c65f51c46e6cd89e32107e01797e16911108bbbda6105eb40
        name: query-runner
        ports:
        - containerPort: 3183
          name: http
        resources:
          limits:
            cpu: "1"
            memory: 1G
          requests:
            cpu: 500m
            memory: 1G
        volumeMounts:
        - mountPath: /etc/sourcegraph
          name: sg-config
      securityContext:
        runAsUser: 0
      volumes:
      - configMap:
          defaultMode: 464
          name: config-file
        name: sg-config
