apiVersion: apps/v1
kind: Deployment
metadata:
  annotations:
    description: Backend for syntax highlighting operations.
  labels:
    deploy: sourcegraph
  name: syntect-server
spec:
  minReadySeconds: 10
  replicas: 1
  revisionHistoryLimit: 10
  selector:
    matchLabels:
      app: syntect-server
  strategy:
    rollingUpdate:
      maxSurge: 1
      maxUnavailable: 0
    type: RollingUpdate
  template:
    metadata:
      labels:
        app: syntect-server
    spec:
      containers:
      - env:
        - name: ROCKET_LIMITS
          value: '{json=10485760}'
        - name: ROCKET_PORT
          value: "9238"
        image: sourcegraph/syntect_server:624a1a2@sha256:46c1c2ffa6d804687c3d921716504ee2f6655cf02e2f4b4b97893c3d85e53e81
        livenessProbe:
          httpGet:
            path: /health
            port: http
            scheme: HTTP
          initialDelaySeconds: 5
          timeoutSeconds: 5
        name: syntect-server
        ports:
        - containerPort: 9238
          name: http
        readinessProbe:
          tcpSocket:
            port: http
        resources:
          limits:
            cpu: "4"
            memory: 512M
          requests:
            cpu: 250m
            memory: 512M
      securityContext:
        runAsUser: 0
