Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
CoreOS is used for the nodes. Every node has sda10 mounted to /var/lib/rook and sdb empty used as a whole. The nodes have been labelled according to the placements.
apiVersion: rook.io/v1alpha1
kind: Cluster
metadata:
name: rook
namespace: rook
spec:
versionTag: master
dataDirHostPath: /var/lib/rook-config
# toggle to use hostNetwork
hostNetwork: true
# set the amount of mons to be started
monCount: 3
# To control where various services will be scheduled by kubernetes, use the placement configuration sections below.
# The example under 'all' would have all services scheduled on kubernetes nodes labeled with 'role=storage' and
# tolerate taints with a key of 'storage-node'.
placement:
all:
# nodeAffinity:
# tolerations:
api:
nodeAffinity:
requiredDuringSchedulingIgnoredDuringExecution:
nodeSelectorTerms:
- matchExpressions:
- key: storage.example.com/api
operator: In
values:
- ""
# tolerations:
mon:
podAntiAffinity:
requiredDuringSchedulingIgnoredDuringExecution:
- labelSelector:
matchExpressions:
- key: "app"
operator: In
values:
- rook-ceph-mon
topologyKey: "kubernetes.io/hostname"
nodeAffinity:
requiredDuringSchedulingIgnoredDuringExecution:
nodeSelectorTerms:
- matchExpressions:
- key: storage.example.com/mon
operator: In
values:
- ""
# tolerations:
osd:
nodeAffinity:
requiredDuringSchedulingIgnoredDuringExecution:
nodeSelectorTerms:
- matchExpressions:
- key: storage.example.com/osd
operator: In
values:
- ""
# tolerations:
rgw:
podAntiAffinity:
requiredDuringSchedulingIgnoredDuringExecution:
- labelSelector:
matchExpressions:
- key: "app"
operator: In
values:
- rook-ceph-rgw
topologyKey: "kubernetes.io/hostname"
nodeAffinity:
nodeAffinity:
requiredDuringSchedulingIgnoredDuringExecution:
nodeSelectorTerms:
- matchExpressions:
- key: storage.example.com/rgw
operator: In
values:
- ""
# tolerations:
storage:
useAllNodes: false
useAllDevices: false
deviceFilter: ^sd(b)
metadataDevice:
location:
storeConfig:
storeType: bluestore
# Individual nodes and their config can be specified as well, but 'useAllNodes' above must be set to false. Then, only the named
# nodes below will be used as storage resources. Each node's 'name' field should match their 'kubernetes.io/hostname' label.
nodes:
- name: "kube-node-01.example.com"
directories:
- path: "/var/lib/rook"
devices:
- name: "sdb"
- name: "kube-node-02.example.com"
directories:
- path: "/var/lib/rook"
devices:
- name: "sdb"
- name: "kube-node-03.example.com"
directories:
- path: "/var/lib/rook"
devices:
- name: "sdb"
- name: "kube-node-04.example.com"
directories:
- path: "/var/lib/rook"
devices:
- name: "sdb"
- name: "kube-node-05.example.com"
directories:
- path: "/var/lib/rook"
devices:
- name: "sdb"
- name: "kube-node-06.example.com"
directories:
- path: "/var/lib/rook"
devices:
- name: "sdb"
- name: "kube-node-07.example.com"
directories:
- path: "/var/lib/rook"
devices:
- name: "sdb"
- name: "kube-node-08.example.com"
directories:
- path: "/var/lib/rook"
devices:
- name: "sdb"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment