apiVersion: apps/v1
kind: Deployment
metadata:
  labels:
    k8s-app: k8s-webhook-handler
  name: k8s-webhook-handler
  namespace: ci
spec:
  selector:
    matchLabels:
      k8s-app: k8s-webhook-handler
  template:
    metadata:
      labels:
        k8s-app: k8s-webhook-handler
      name: k8s-webhook-handler
    spec:
      serviceAccountName: k8s-webhook-handler
      containers:
        - name: k8s-webhook-handler
          image: itskoko/k8s-webhook-handler:v0.1.0
          env:
            - name: WEBHOOK_SECRET
              valueFrom:
                secretKeyRef:
                  name: webhook-handler
                  key: WEBHOOK_SECRET
            - name: GITHUB_TOKEN
              valueFrom:
                secretKeyRef:
                  name: webhook-handler
                  key: GITHUB_TOKEN
          ports:
          - containerPort: 8080
            name: http
          resources:
            limits:
              memory: 100Mi
            requests:
              memory: 50Mi
