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:v20201124-061f85d859
          args:
            - --dry-run=false
            - --config-path=/etc/config/config.yaml
            - --github-token-path=/etc/github/token
            - --github-endpoint=http://ghproxy
            - --github-endpoint=https://api.github.com
            - --github-graphql-endpoint=http://ghproxy/graphql
            - --gcs-credentials-file=/etc/gcs-credentials/service-account.json
            - --status-path=gs://prow-tidb-logs/tide-status
            - --history-uri=gs://prow-tidb-logs/tide-history.json
          ports:
            - name: http
              containerPort: 8888
          volumeMounts:
            - name: github-token
              mountPath: /etc/github
              readOnly: true
            - name: config
              mountPath: /etc/config
              readOnly: true
            - name: gcs-credentials
              mountPath: /etc/gcs-credentials
              readOnly: true
      volumes:
        - name: github-token
          secret:
            secretName: github-token
        - name: config
          configMap:
            name: config
        - name: gcs-credentials
          secret:
            secretName: gcs-credentials