apiVersion: apps/v1
kind: Deployment
metadata:
  annotations:
    description: Asynchronous indexing for global references.
  labels:
    deploy: sourcegraph
  name: indexer
spec:
  minReadySeconds: 10
  replicas: 1
  revisionHistoryLimit: 10
  selector:
    matchLabels:
      app: indexer
  strategy:
    rollingUpdate:
      maxSurge: 1
      maxUnavailable: 0
    type: RollingUpdate
  template:
    metadata:
      labels:
        app: indexer
    spec:
      containers:
      - env:
        - name: SOURCEGRAPH_CONFIG_FILE
          value: /etc/sourcegraph/config.json
        - name: LSP_PROXY
          value: lsp-proxy:4388
        - name: PGDATABASE
          value: sg
        - name: PGHOST
          value: pgsql
        - name: PGPORT
          value: "5432"
        - name: PGSSLMODE
          value: disable
        - name: PGUSER
          value: sg
        - name: SRC_GIT_SERVERS
          value: gitserver-0.gitserver:3178
        image: sourcegraph/indexer:2.11.2@sha256:77d879a4fd89cd6e1308c65faf102e77aa5612747a9a3fb51241a44a07071823
        name: indexer
        ports:
        - containerPort: 3179
          name: http
        resources:
          limits:
            cpu: "1"
            memory: 1G
          requests:
            cpu: 100m
            memory: 250M
        volumeMounts:
        - mountPath: /etc/sourcegraph
          name: sg-config
      securityContext:
        runAsUser: 0
      volumes:
      - configMap:
          defaultMode: 464
          name: config-file
        name: sg-config
