apiVersion: apps/v1
kind: Deployment
metadata:
  name: name-mutator-webhook-deployment
  namespace: name-mutator
  labels:
    app: name-mutator
spec:
  replicas: 1
  selector:
    matchLabels:
      app: name-mutator
  template:
    metadata:
      labels:
        app: name-mutator
    spec:
      containers:
        - name: name-mutator
          image: wilsonianbcoil/name-mutator: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: name-mutator-webhook-certs
