---
kind: Deployment
apiVersion: apps/v1
metadata:
  labels:
    app: ceph
    daemon: moncheck
  name: ceph-mon-check
  namespace: ceph
spec:
  replicas: 1
  selector:
    matchLabels:
      app: ceph
      daemon: moncheck
  template:
    metadata:
      name: ceph-mon
      namespace: ceph
      labels:
        app: ceph
        daemon: moncheck
    spec:
      serviceAccount: default
      volumes:
        - name: ceph-conf
          secret:
            secretName: ceph-conf-combined
        - name: ceph-bootstrap-osd-keyring
          secret:
            secretName: ceph-bootstrap-osd-keyring
        - name: ceph-bootstrap-mds-keyring
          secret:
            secretName: ceph-bootstrap-mds-keyring
        - name: ceph-bootstrap-rgw-keyring
          secret:
            secretName: ceph-bootstrap-rgw-keyring
        - name: ceph-bootstrap-rbd-keyring
          secret:
            secretName: ceph-bootstrap-rbd-keyring
      containers:
        - name: ceph-mon
          #image: slpcat/ceph-daemon:mimic
          image: slpcat/ceph-daemon:v3.1.0-mimic-centos7
          imagePullPolicy: Always
          ports:
            - containerPort: 6789
          env:
            - name: K8S_HOST_NETWORK
              value: "1"
            - name: NAMESPACE
              valueFrom:
                fieldRef:
                  apiVersion: v1
                  fieldPath: metadata.namespace
            - name: CEPH_DAEMON
              value: MON_HEALTH
            - name: KV_TYPE
              value: k8s
            - name: MON_IP_AUTO_DETECT
              value: "1"
            - name: CLUSTER
              value: ceph
          volumeMounts:
            - name: ceph-conf
              mountPath: /etc/ceph
            - name: ceph-bootstrap-osd-keyring
              mountPath: /var/lib/ceph/bootstrap-osd
            - name: ceph-bootstrap-mds-keyring
              mountPath: /var/lib/ceph/bootstrap-mds
            - name: ceph-bootstrap-rgw-keyring
              mountPath: /var/lib/ceph/bootstrap-rgw
            - name: ceph-bootstrap-rbd-keyring
              mountPath: /var/lib/ceph/bootstrap-rbd
          resources:
            requests:
              memory: "5Mi"
              cpu: "50m"
            limits:
              memory: "50Mi"
              cpu: "500m"
