apiVersion: apps/v1
kind: Deployment
metadata:
  name: validation-webhook
  namespace: validation
  labels:
    app: validation-webhook
spec:
  replicas: 1
  selector:
    matchLabels:
      app: validation-webhook
  template:
    metadata:
      labels:
        app: validation-webhook
    spec:
      containers:
      - name: validation-webhook-example
        image: mifomm/webhook:latest
        resources:
          requests:
            cpu: 25m
            memory: 263M
          limits:
            cpu: 25m
            memory: 263M        
        imagePullPolicy: Always
        ports:
        - containerPort: 8443
          name: webhook-api
        command: ["/server"]
        args:
          [
            "-cert-path",
            "/certs/tls.crt",
            "-key-path",
            "/certs/tls.key",
          ]
        volumeMounts:
          - name: certs
            mountPath: "/certs"
            readOnly: true
      volumes:
        - name: certs
          secret:
            secretName: mifomm-tls-certs          