Skip to content

Instantly share code, notes, and snippets.

@bzub
Last active March 23, 2017 20:00
Show Gist options
  • Save bzub/fb7b4fbdf86116216447918caf9a06c3 to your computer and use it in GitHub Desktop.
Save bzub/fb7b4fbdf86116216447918caf9a06c3 to your computer and use it in GitHub Desktop.
Modified Rook OSD DaemonSet
apiVersion: extensions/v1beta1
kind: DaemonSet
metadata:
labels:
app: rook
role: osd
rook_cluster: rookcluster
name: osd
spec:
selector:
matchLabels:
app: osd
rook_cluster: rookcluster
template:
metadata:
labels:
app: osd
rook_cluster: rookcluster
name: osd
spec:
containers:
- command:
- /bin/sh
- -c
- 'sleep 5;
echo $(HOSTNAME) > /etc/hostname;
hostname -F /etc/hostname;
/usr/bin/rookd
osd
--data-dir=/var/lib/rook
--mon-endpoints=mon2=10.2.247.8:6790,mon0=10.2.136.140:6790,mon1=10.2.6.9:6790
--cluster-name=rookcluster
--data-devices=^sd '
env:
- name: ROOKD_MON_SECRET
valueFrom:
secretKeyRef:
key: mon-secret
name: mon
- name: ROOKD_ADMIN_SECRET
valueFrom:
secretKeyRef:
key: admin-secret
name: mon
- name: HOSTNAME
valueFrom:
fieldRef:
apiVersion: v1
fieldPath: spec.nodeName
- name: CEPH_CONF
value: /etc/rook/ceph.conf
- name: ROOK_FSID
valueFrom:
secretKeyRef:
key: fsid
name: mon
- name: ROOK_CLUSTER_NAME
valueFrom:
secretKeyRef:
key: cluster-name
name: mon
image: quay.io/travisn/rookd:dev-2017-03-16-k8s
imagePullPolicy: Always
name: osd
securityContext:
privileged: true
volumeMounts:
- mountPath: /var/lib/rook
name: rook-data
- mountPath: /dev
name: devices
- mountPath: /etc/rook
name: rook-config
readOnly: true
nodeSelector:
storage-node: "true"
restartPolicy: Always
volumes:
- hostPath:
path: /dev
name: devices
- configMap:
defaultMode: 420
name: rook-config
name: rook-config
- name: rook-keyring
secret:
defaultMode: 420
items:
- key: keyring
path: keyring
secretName: rook-keyring
- hostPath:
path: /var/lib/rook
name: rook-data
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment