apiVersion: apps/v1
kind: Deployment
metadata:
  name: admission-webhook
spec:
  selector:
    matchLabels:
      app: admission-webhook
  template:
    metadata:
      labels:
        app: admission-webhook
    spec:
      containers:
        - name: admission-webhook
          image: quay.io/ixcloud/admission-webhook:0.0.2
          imagePullPolicy: Always
          env:
            - name: CERT_FILE
              value: "/etc/certs/cert.pem"
            - name: KEYFILE
              value: "/etc/certs/key.pem"
            - name: PORT
              value: "8080"
          volumeMounts:
            - name: admission-webhook-certs
              mountPath: /etc/certs
              readOnly: true
          resources:
            limits:
              memory: "128Mi"
              cpu: "500m"
          ports:
            - containerPort: 8080
      volumes:
        - name: admission-webhook-certs
          secret:
            secretName: admission-webhook-tls
