apiVersion: apps/v1
kind: Deployment
metadata:
  namespace: kube-system
  name: oke-admission-webhook-deployment
  labels:
    app: oke-admission-webhook
spec:
  replicas: 1
  selector:
    matchLabels:
      app: oke-admission-webhook
  template:
    metadata:
      labels:
        app: oke-admission-webhook
    spec:
      containers:
        - name: oke-admission-webhook
          image: iad.ocir.io/espsnonprodint/autostg/oke-admission-webhook:v1
          imagePullPolicy: Always
          args:
            - -tlsCertFile=/mnt/k8s/cert.pem
            - -tlsKeyFile=/mnt/k8s/key.pem
            - -alsologtostderr
            - -v=4
            - 2>&1
          volumeMounts:
            - name: oke-webhook-certs
              mountPath: /mnt/k8s
              readOnly: true
      volumes:
        - name: oke-webhook-certs
          secret:
            secretName: oke-admission-webhook-secret
