apiVersion: apps/v1
kind: Deployment
metadata:
  name: kubeplus-webhook
  labels:
    app: crd-hook
spec:
  replicas: 1
  selector:
    matchLabels:
      app: crd-hook
  template:
    metadata:
      labels:
        app: crd-hook
    spec:
      containers:
        - name: crd-hook
          image: lmecld/pac-mutating-admission-webhook:latest
          imagePullPolicy: Always
          args:
            - -tlsCertFile=/etc/webhook/certs/cert.pem
            - -tlsKeyFile=/etc/webhook/certs/key.pem
            - -alsologtostderr
            #- -v=4
            - 2>&1
          volumeMounts:
            - name: webhook-certs
              mountPath: /etc/webhook/certs
              readOnly: true
      volumes:
        - name: webhook-certs
          secret:
            secretName: webhook-tls-certificates
