Skip to content

Instantly share code, notes, and snippets.

@elsonrodriguez
Created May 20, 2016 22:17
Show Gist options
  • Save elsonrodriguez/a42c0c974c049f81302f882d63ea2b79 to your computer and use it in GitHub Desktop.
Save elsonrodriguez/a42c0c974c049f81302f882d63ea2b79 to your computer and use it in GitHub Desktop.
---
kind: DaemonSet
apiVersion: extensions/v1beta1
metadata:
labels:
app: ceph
daemon: mon
name: ceph-mon
namespace: ceph
spec:
template:
metadata:
name: ceph-mon
namespace: ceph
labels:
app: ceph
daemon: mon
spec:
nodeSelector:
node-type: storage
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
containers:
- name: ceph-mon
image: quay.io/cornelius/ceph-daemon:latest
# image: quay.io/acaleph/ceph-daemon:kubernetes
# imagePullPolicy: Always
lifecycle:
preStop:
exec:
# remove the mon on Pod stop.
command:
- "/remove-mon.sh"
ports:
- containerPort: 6789
env:
- name: CEPH_DAEMON
value: MON
- name: CEPH_PUBLIC_NETWORK
value: 10.244.0.0/16
- name: CEPH_CLUSTER_NETWORK
value: 10.244.0.0/16
- 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
livenessProbe:
tcpSocket:
port: 6789
initialDelaySeconds: 60
timeoutSeconds: 5
readinessProbe:
tcpSocket:
port: 6789
timeoutSeconds: 5
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment