apiVersion: apps/v1
kind: Deployment
metadata:
  annotations:
    description: Backend for symbols operations.
  labels:
    deploy: sourcegraph
  name: symbols
spec:
  minReadySeconds: 10
  replicas: 1
  revisionHistoryLimit: 10
  selector:
    matchLabels:
      app: symbols
  strategy:
    rollingUpdate:
      maxSurge: 1
      maxUnavailable: 1
    type: RollingUpdate
  template:
    metadata:
      labels:
        app: symbols
    spec:
      containers:
      - env:
        - name: SYMBOLS_CACHE_SIZE_MB
          value: "100000"
        - name: POD_NAME
          valueFrom:
            fieldRef:
              fieldPath: metadata.name
        - name: CACHE_DIR
          value: /mnt/cache/$(POD_NAME)
        image: index.docker.io/sourcegraph/symbols:3.6.0-rc.2@sha256:d9b8b6fa5c1d4b8d1bc1c8331f097b090965c6010d3ef661f80e9b7946e57209
        terminationMessagePolicy: FallbackToLogsOnError
        name: symbols
        livenessProbe:
          httpGet:
            path: /healthz
            port: http
            scheme: HTTP
          initialDelaySeconds: 60
          timeoutSeconds: 5
        readinessProbe:
          httpGet:
            path: /healthz
            port: http
            scheme: HTTP
          periodSeconds: 5
          timeoutSeconds: 5
        ports:
        - containerPort: 3184
          name: http
        - containerPort: 6060
          name: debug
        resources:
          limits:
            cpu: "2"
            memory: 2G
          requests:
            cpu: 500m
            memory: 500M
        volumeMounts:
        - mountPath: /mnt/cache
          name: cache-ssd
      securityContext:
        runAsUser: 0
      volumes:
      - emptyDir: {}
        name: cache-ssd
