apiVersion: apps/v1
kind: Deployment
metadata:
  name: mariadb-operator-cert-controller
  labels:
    helm.sh/chart: mariadb-operator-26.3.0
    app.kubernetes.io/name: mariadb-operator-cert-controller
    app.kubernetes.io/instance: mariadb-operator
    app.kubernetes.io/version: "26.3.0"
    app.kubernetes.io/managed-by: Helm
spec:
  selector:
    matchLabels:
      app.kubernetes.io/name: mariadb-operator-cert-controller
      app.kubernetes.io/instance: mariadb-operator
  template:
    metadata:
      labels:
        app.kubernetes.io/name: mariadb-operator-cert-controller
        app.kubernetes.io/instance: mariadb-operator
    spec:
      serviceAccountName: mariadb-operator-cert-controller-cert-controller
      automountServiceAccountToken: true
      containers:
        - image: "docker-registry3.mariadb.com/mariadb-operator/mariadb-operator:26.3.0"
          imagePullPolicy: IfNotPresent
          name: cert-controller
          args:
            - cert-controller
            - --ca-secret-name=mariadb-operator-webhook-ca
            - --ca-secret-namespace=mariadb-operator
            - --ca-lifetime=26280h
            - --cert-secret-name=mariadb-operator-webhook-cert
            - --cert-secret-namespace=mariadb-operator
            - --cert-lifetime=2160h
            - --renew-before-percentage=33
            - --service-name=mariadb-operator-webhook
            - --service-namespace=mariadb-operator
            - --requeue-duration=5m
            - --metrics-addr=:8080
            - --health-addr=:8081
            - --log-level=INFO
          ports:
            - containerPort: 8080
              protocol: TCP
              name: metrics
            - containerPort: 8081
              protocol: TCP
              name: health
          env:
            - name: CLUSTER_NAME
              value: cluster.local
          readinessProbe:
            httpGet:
              path: /readyz
              port: 8081
            initialDelaySeconds: 20
            periodSeconds: 5
