apiVersion: apps/v1
kind: Deployment
metadata:
  namespace: default
  name: test-untested-external-plugin
  labels:
    app: test-untested-external-plugin
spec:
  replicas: 1
  strategy:
    type: RollingUpdate
    rollingUpdate:
      maxSurge: 1
      maxUnavailable: 1
  selector:
    matchLabels:
      app: test-untested-external-plugin
  template:
    metadata:
      labels:
        app: test-untested-external-plugin
    spec:
      terminationGracePeriodSeconds: 180
      containers:
        - name: test-untrusted-external-pugin
          image: eu.gcr.io/sap-kyma-neighbors-dev/test-untrusted-plugin:v0.1.0
          imagePullPolicy: Always
          args:
            - --github-endpoint=http://ghproxy
            - --github-endpoint=https://api.github.com
            - --github-token-path=/etc/github/oauth
          ports:
            - name: http
              containerPort: 8888
          volumeMounts:
            - name: hmac
              mountPath: /etc/webhook
              readOnly: true
            - name: oauth
              mountPath: /etc/github
              readOnly: true
      volumes:
        - name: hmac
          secret:
            secretName: hmac-token
        - name: oauth
          secret:
            secretName: oauth-token
