apiVersion: apps/v1
kind: Deployment
metadata:
  name: kubelet-serving-cert-approver
  labels:
    app.kubernetes.io/controller: main
    app.kubernetes.io/instance: kubelet-serving-cert-approver
    app.kubernetes.io/managed-by: Helm
    app.kubernetes.io/name: kubelet-serving-cert-approver
    helm.sh/chart: kubelet-serving-cert-approver-5.0.1
  namespace: kubelet-serving-cert-approver
spec:
  revisionHistoryLimit: 3
  replicas: 1
  strategy:
    type: Recreate
  selector:
    matchLabels:
      app.kubernetes.io/controller: main
      app.kubernetes.io/name: kubelet-serving-cert-approver
      app.kubernetes.io/instance: kubelet-serving-cert-approver
  template:
    metadata:
      labels:
        app.kubernetes.io/controller: main
        app.kubernetes.io/instance: kubelet-serving-cert-approver
        app.kubernetes.io/name: kubelet-serving-cert-approver
    spec:
      enableServiceLinks: false
      serviceAccountName: kubelet-serving-cert-approver
      automountServiceAccountToken: true
      priorityClassName: system-cluster-critical
      securityContext:
        fsGroup: 65534
        runAsGroup: 65534
        runAsUser: 65534
        seccompProfile:
          type: RuntimeDefault
      hostIPC: false
      hostNetwork: false
      hostPID: false
      dnsPolicy: ClusterFirst
      affinity:
        nodeAffinity:
          preferredDuringSchedulingIgnoredDuringExecution:
            - preference:
                matchExpressions:
                  - key: node-role.kubernetes.io/master
                    operator: DoesNotExist
                  - key: node-role.kubernetes.io/control-plane
                    operator: DoesNotExist
              weight: 100
      tolerations:
        - effect: NoSchedule
          key: node-role.kubernetes.io/master
          operator: Exists
        - effect: NoSchedule
          key: node-role.kubernetes.io/control-plane
          operator: Exists
      containers:
        - args:
            - serve
          env:
            - name: NAMESPACE
              valueFrom:
                fieldRef:
                  fieldPath: metadata.namespace
          image: ghcr.io/alex1989hu/kubelet-serving-cert-approver:0.11.0@sha256:f17017b53983fe93f5a07ef85b2e448b9e4be848d45f05c325c8f2c77e1171c4
          name: main
          resources:
            requests:
              cpu: 1m
              memory: 20Mi
          securityContext:
            allowPrivilegeEscalation: false
            capabilities:
              drop:
                - ALL
            privileged: false
            readOnlyRootFilesystem: true
            runAsNonRoot: true
