---
apiVersion: apps/v1
kind: Deployment
metadata:
  name: github-webhook
  namespace: system
  labels:
    control-plane: github-webhook
spec:
  selector:
    matchLabels:
      control-plane: github-webhook
  replicas: 1
  template:
    metadata:
      labels:
        control-plane: github-webhook
    spec:
      containers:
        - image: github-webhook:latest
          name: github-webhook
          ports:
            - name: http
              containerPort: 8080
          resources:
            limits:
              cpu: 100m
              memory: 30Mi
            requests:
              cpu: 100m
              memory: 20Mi
          volumeMounts:
            - name: github-secrets
              readOnly: true
              mountPath: /etc/secrets
      terminationGracePeriodSeconds: 10
      volumes:
        - name: github-secrets
          secret:
            secretName: github-secrets
