apiVersion: apps/v1
kind: Deployment
metadata:
  labels:
    app: kube-admission
  name: kube-admission
  namespace: default
spec:
  replicas: 1
  selector:
    matchLabels:
      app: kube-admission
  template:
    metadata:
      labels:
        app: kube-admission
    spec:
      containers:
        - name: admission
          image: qqbuby/kube-admission:1.32
          command:
            - /admission
            - webhook 
            - --port=8080
            - --tls-cert-file=/tls/tls.crt 
            - --tls-private-key-file=/tls/tls.key 
            - -v=5
          volumeMounts:
            - mountPath: /tls
              name: tls
              readOnly: true
          ports:
            - name: webhook
              containerPort: 8080
          resources:
            requests:
              cpu: 50m
              memory: 50Mi
            limits:
              cpu: 50m
              memory: 50Mi
          livenessProbe:
            httpGet:
              scheme: HTTPS
              path: /livez
              port: 8080
          readinessProbe:
            httpGet:
              scheme: HTTPS
              path: /readyz
              port: 8080
      volumes: 
        - name: tls
          secret:
            secretName: kube-admission 
