apiVersion: apps/v1
kind: Deployment
metadata:
  labels:
    app: hook
  name: hook
  namespace: kubeedge-prowbot
spec:
  replicas: 2
  selector:
    matchLabels:
      app: hook
  template:
    metadata:
      labels:
        app: hook
    spec:
      containers:
      - args:
        - --dry-run=false
        - --config-path=/etc/config/config.yaml
        - --github-endpoint=http://ghproxy
        - --github-endpoint=https://api.github.com
        - --github-token-path=/etc/github/oauth
        image: gcr.io/k8s-prow/hook:v20201026-f7d653694b
        imagePullPolicy: IfNotPresent
        livenessProbe:
          failureThreshold: 3
          httpGet:
            path: /healthz
            port: 8081
            scheme: HTTP
          initialDelaySeconds: 3
          periodSeconds: 3
          successThreshold: 1
          timeoutSeconds: 1
        name: hook
        ports:
        - containerPort: 8888
          name: http
          protocol: TCP
        readinessProbe:
          failureThreshold: 3
          httpGet:
            path: /healthz/ready
            port: 8081
            scheme: HTTP
          initialDelaySeconds: 10
          periodSeconds: 3
          successThreshold: 1
          timeoutSeconds: 600
        volumeMounts:
        - mountPath: /etc/webhook
          name: hmac
          readOnly: true
        - mountPath: /etc/github
          name: oauth
          readOnly: true
        - mountPath: /etc/config
          name: config
          readOnly: true
        - mountPath: /etc/plugins
          name: plugins
          readOnly: true
      volumes:
      - name: hmac
        secret:
          secretName: hmac-token
      - name: oauth
        secret:
          secretName: oauth-token
      - configMap:
          name: config
        name: config
      - configMap:
          name: plugins
        name: plugins
