apiVersion: apps/v1
kind: Deployment
metadata:
  namespace: prow
  name: ghproxy
  labels:
    app: ghproxy
spec:
  selector:
    matchLabels:
      app: ghproxy
  replicas: 1  # TODO(fejta): this should be HA
  strategy:
    rollingUpdate:
      maxSurge: 0
      maxUnavailable: 1
  template:
    metadata:
      labels:
        app: ghproxy
    spec:
      containers:
      - name: ghproxy
        image: gcr.io/k8s-prow/ghproxy:v20220501-de638098ae
        args:
        - --cache-dir=/cache
        - --cache-sizeGB=99
        - --serve-metrics=true
        ports:
        - name: main
          containerPort: 8888
        - name: metrics
          containerPort: 9090
        volumeMounts:
        - name: cache
          mountPath: /cache
      volumes:
      - name: cache
        persistentVolumeClaim:
          claimName: ghproxy
#      # run on our dedicated node
#      tolerations:
#      - key: "dedicated"
#        operator: "Equal"
#        value: "ghproxy"
#        effect: "NoSchedule"
#      nodeSelector:
#        dedicated: "ghproxy"
