apiVersion: apps/v1
kind: Deployment
metadata:
  annotations:
    description: Rate-limiting proxy for the GitHub API.
  labels:
    deploy: sourcegraph
  name: github-proxy
spec:
  minReadySeconds: 10
  replicas: 1
  revisionHistoryLimit: 10
  selector:
    matchLabels:
      app: github-proxy
  strategy:
    rollingUpdate:
      maxSurge: 1
      maxUnavailable: 0
    type: RollingUpdate
  template:
    metadata:
      labels:
        app: github-proxy
    spec:
      containers:
      - env:
        - name: SOURCEGRAPH_CONFIG_FILE
          value: /etc/sourcegraph/config.json
        - name: LOG_REQUESTS
          value: "true"
        image: sourcegraph/github-proxy:2.11.2@sha256:6441201bf6075d7bd359d15a4109ec04441710b01cbc0678048868458bdcfb84
        name: github-proxy
        ports:
        - containerPort: 3180
          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
