apiVersion: apps/v1
kind: Deployment
metadata:
  name: ceph-csi-controller-manager
  labels:
    control-plane: controller-manager
    helm.sh/chart: ceph-csi-operator-0.4.1
    app.kubernetes.io/name: ceph-csi
    app.kubernetes.io/instance: rook-ceph
    app.kubernetes.io/version: "v0.4.1"
    app.kubernetes.io/managed-by: Helm
spec:
  replicas: 1
  selector:
    matchLabels:
      control-plane: ceph-csi-op-controller-manager
      app.kubernetes.io/name: ceph-csi
      app.kubernetes.io/instance: rook-ceph
  template:
    metadata:
      labels:
        control-plane: ceph-csi-op-controller-manager
        app.kubernetes.io/name: ceph-csi
        app.kubernetes.io/instance: rook-ceph
      annotations:
        kubectl.kubernetes.io/default-container: manager
    spec:
      containers:
        - args:
            - --leader-elect
          command:
            - /manager
          env:
            - name: OPERATOR_NAMESPACE
              valueFrom:
                fieldRef:
                  fieldPath: metadata.namespace
            - name: CSI_SERVICE_ACCOUNT_PREFIX
              value: "ceph-csi-"
            - name: WATCH_NAMESPACE
              value: ""
            - name: KUBERNETES_CLUSTER_DOMAIN
              value: "cluster.local"
          image: quay.io/cephcsi/ceph-csi-operator:v0.4.1
          livenessProbe:
            httpGet:
              path: /healthz
              port: 8081
            initialDelaySeconds: 15
            periodSeconds: 20
          name: manager
          readinessProbe:
            httpGet:
              path: /readyz
              port: 8081
            initialDelaySeconds: 5
            periodSeconds: 10
          resources:
            limits:
              cpu: 500m
              memory: 128Mi
            requests:
              cpu: 10m
              memory: 64Mi
          securityContext:
            allowPrivilegeEscalation: false
            capabilities:
              drop:
                - ALL
            readOnlyRootFilesystem: true
      imagePullSecrets: []
      securityContext:
        runAsNonRoot: true
      serviceAccountName: ceph-csi-controller-manager
      terminationGracePeriodSeconds: 10
