apiVersion: apps/v1
kind: Deployment
metadata:
  labels:
    app.kubernetes.io/component: github-webhook-server
    app.kubernetes.io/part-of: actions-runner-controller
  name: github-webhook-server
spec:
  replicas: 1
  selector:
    matchLabels:
      app.kubernetes.io/component: github-webhook-server
      app.kubernetes.io/part-of: actions-runner-controller
  template:
    metadata:
      labels:
        app.kubernetes.io/component: github-webhook-server
        app.kubernetes.io/part-of: actions-runner-controller
    spec:
      containers:
        - name: github-webhook-server
          image: controller:latest
          command:
            - '/github-webhook-server'
          env:
            - name: GITHUB_WEBHOOK_SECRET_TOKEN
              valueFrom:
                secretKeyRef:
                  key: github_webhook_secret_token
                  name: github-webhook-server
                  optional: true
          ports:
            - containerPort: 8000
              name: http
              protocol: TCP
      serviceAccountName: github-webhook-server
      terminationGracePeriodSeconds: 10
