apiVersion: apps/v1
kind: Deployment
metadata:
  namespace: prow
  name: tide
  labels:
    app: tide
spec:
  replicas: 1 # Do not scale up.
  strategy:
    type: Recreate
  selector:
    matchLabels:
      app: tide
  template:
    metadata:
      labels:
        app: tide
    spec:
      serviceAccountName: tide
      containers:
      - name: tide
        image: gcr.io/k8s-prow/tide:v20220617-15befaa8ca
        args:
        - --dry-run=false
        - --github-endpoint=http://ghproxy
        - --github-endpoint=https://api.github.com
        - --github-graphql-endpoint=http://ghproxy/graphql
        - --config-path=/etc/config/config.yaml
        - --job-config-path=/etc/job-config
        - --history-uri=gs://gardener-prow/tide-history.json
        - --gcs-credentials-file=/etc/gcs-credentials/service-account.json
        - --status-path=gs://gardener-prow/tide-status-checkpoint.yaml
        - --github-app-id=$(GITHUB_APP_ID)
        - --github-app-private-key-path=/etc/github/cert
        env:
        - name: GITHUB_APP_ID
          valueFrom:
            secretKeyRef:
              name: github-app
              key: appid
        ports:
        - name: http
          containerPort: 8888
        - name: metrics
          containerPort: 9090
        volumeMounts:
        - name: github-app
          mountPath: /etc/github
          readOnly: true
        - name: config
          mountPath: /etc/config
          readOnly: true
        - name: job-config
          mountPath: /etc/job-config
          readOnly: true
        - name: gcs-credentials
          mountPath: /etc/gcs-credentials
          readOnly: true
      volumes:
      - name: github-app
        secret:
          secretName: github-app
      - name: config
        configMap:
          name: config
      - name: job-config
        configMap:
          name: job-config
      - name: gcs-credentials
        secret:
          secretName: gardener-prow-storage
