cluster.yaml 18 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357
  1. #################################################################################################################
  2. # Define the settings for the rook-ceph cluster with common settings for a production cluster.
  3. # All nodes with available raw devices will be used for the Ceph cluster. At least three nodes are required
  4. # in this example. See the documentation for more details on storage settings available.
  5. # For example, to create the cluster:
  6. # kubectl create -f crds.yaml -f common.yaml -f operator.yaml
  7. # kubectl create -f cluster.yaml
  8. #################################################################################################################
  9. apiVersion: ceph.rook.io/v1
  10. kind: CephCluster
  11. metadata:
  12. name: rook-ceph
  13. namespace: rook-ceph # namespace:cluster
  14. spec:
  15. cephVersion:
  16. # The container image used to launch the Ceph daemon pods (mon, mgr, osd, mds, rgw).
  17. # v18 is Reef, v19 is Squid
  18. # RECOMMENDATION: In production, use a specific version tag instead of the general v19 flag, which pulls the latest release and could result in different
  19. # versions running within the cluster. See tags available at https://hub.docker.com/r/ceph/ceph/tags/.
  20. # If you want to be more precise, you can always use a timestamp tag such as quay.io/ceph/ceph:v19.2.3-20250717
  21. # This tag might not contain a new Ceph version, just security fixes from the underlying operating system, which will reduce vulnerabilities
  22. image: quay.io/ceph/ceph:v19.2.3
  23. # Whether to allow unsupported versions of Ceph. Currently Reef and Squid are supported.
  24. # Future versions such as Tentacle (v20) would require this to be set to `true`.
  25. # Do not set to true in production.
  26. allowUnsupported: false
  27. # The path on the host where configuration files will be persisted. Must be specified. If there are multiple clusters, the directory must be unique for each cluster.
  28. # Important: if you reinstall the cluster, make sure you delete this directory from each host or else the mons will fail to start on the new cluster.
  29. # In Minikube, the '/data' directory is configured to persist across reboots. Use "/data/rook" in Minikube environment.
  30. dataDirHostPath: /var/lib/rook
  31. # Whether or not upgrade should continue even if a check fails
  32. # This means Ceph's status could be degraded and we don't recommend upgrading but you might decide otherwise
  33. # Use at your OWN risk
  34. # To understand Rook's upgrade process of Ceph, read https://rook.io/docs/rook/latest/ceph-upgrade.html#ceph-version-upgrades
  35. skipUpgradeChecks: false
  36. # Whether or not continue if PGs are not clean during an upgrade
  37. continueUpgradeAfterChecksEvenIfNotHealthy: false
  38. # WaitTimeoutForHealthyOSDInMinutes defines the time (in minutes) the operator would wait before an OSD can be stopped for upgrade or restart.
  39. # If the timeout exceeds and OSD is not ok to stop, then the operator would skip upgrade for the current OSD and proceed with the next one
  40. # if `continueUpgradeAfterChecksEvenIfNotHealthy` is `false`. If `continueUpgradeAfterChecksEvenIfNotHealthy` is `true`, then operator would
  41. # continue with the upgrade of an OSD even if its not ok to stop after the timeout. This timeout won't be applied if `skipUpgradeChecks` is `true`.
  42. # The default wait timeout is 10 minutes.
  43. waitTimeoutForHealthyOSDInMinutes: 10
  44. # Whether or not requires PGs are clean before an OSD upgrade. If set to `true` OSD upgrade process won't start until PGs are healthy.
  45. # This configuration will be ignored if `skipUpgradeChecks` is `true`.
  46. # Default is false.
  47. upgradeOSDRequiresHealthyPGs: false
  48. mon:
  49. # Set the number of mons to be started. Generally recommended to be 3.
  50. # For highest availability, an odd number of mons should be specified.
  51. count: 3
  52. # The mons should be on unique nodes. For production, at least 3 nodes are recommended for this reason.
  53. # Mons should only be allowed on the same node for test environments where data loss is acceptable.
  54. allowMultiplePerNode: false
  55. mgr:
  56. # When higher availability of the mgr is needed, increase the count to 2.
  57. # In that case, one mgr will be active and one in standby. When Ceph updates which
  58. # mgr is active, Rook will update the mgr services to match the active mgr.
  59. count: 2
  60. allowMultiplePerNode: false
  61. modules:
  62. # List of modules to optionally enable or disable.
  63. # Note the "dashboard" and "monitoring" modules are already configured by other settings in the cluster CR.
  64. - name: rook
  65. enabled: true
  66. # enable the ceph dashboard for viewing cluster status
  67. dashboard:
  68. enabled: true
  69. # serve the dashboard under a subpath (useful when you are accessing the dashboard via a reverse proxy)
  70. # urlPrefix: /ceph-dashboard
  71. # serve the dashboard at the given port.
  72. # port: 8443
  73. # serve the dashboard using SSL
  74. ssl: true
  75. # The url of the Prometheus instance
  76. # prometheusEndpoint: <protocol>://<prometheus-host>:<port>
  77. # Whether SSL should be verified if the Prometheus server is using https
  78. # prometheusEndpointSSLVerify: false
  79. # enable prometheus alerting for cluster
  80. monitoring:
  81. # requires Prometheus to be pre-installed
  82. enabled: false
  83. # Whether to disable the metrics reported by Ceph. If false, the prometheus mgr module and Ceph exporter are enabled.
  84. # If true, the prometheus mgr module and Ceph exporter are both disabled. Default is false.
  85. metricsDisabled: false
  86. # Ceph exporter metrics config.
  87. exporter:
  88. # Specifies which performance counters are exported.
  89. # Corresponds to --prio-limit Ceph exporter flag
  90. # 0 - all counters are exported
  91. perfCountersPrioLimit: 5
  92. # Time to wait before sending requests again to exporter server (seconds)
  93. # Corresponds to --stats-period Ceph exporter flag
  94. statsPeriodSeconds: 5
  95. network:
  96. connections:
  97. # Whether to encrypt the data in transit across the wire to prevent eavesdropping the data on the network.
  98. # The default is false. When encryption is enabled, all communication between clients and Ceph daemons, or between Ceph daemons will be encrypted.
  99. # When encryption is not enabled, clients still establish a strong initial authentication and data integrity is still validated with a crc check.
  100. # IMPORTANT: Encryption requires the 5.11 kernel for the latest nbd and cephfs drivers. Alternatively for testing only,
  101. # you can set the "mounter: rbd-nbd" in the rbd storage class, or "mounter: fuse" in the cephfs storage class.
  102. # The nbd and fuse drivers are *not* recommended in production since restarting the csi driver pod will disconnect the volumes.
  103. encryption:
  104. enabled: false
  105. # Whether to compress the data in transit across the wire. The default is false.
  106. # See the kernel requirements above for encryption.
  107. compression:
  108. enabled: false
  109. # Whether to require communication over msgr2. If true, the msgr v1 port (6789) will be disabled
  110. # and clients will be required to connect to the Ceph cluster with the v2 port (3300).
  111. # Requires a kernel that supports msgr v2 (kernel 5.11 or CentOS 8.4 or newer).
  112. requireMsgr2: false
  113. # enable host networking
  114. #provider: host
  115. # enable the Multus network provider
  116. #provider: multus
  117. #selectors:
  118. # The selector keys are required to be `public` and `cluster`.
  119. # Based on the configuration, the operator will do the following:
  120. # 1. if only the `public` selector key is specified both public_network and cluster_network Ceph settings will listen on that interface
  121. # 2. if both `public` and `cluster` selector keys are specified the first one will point to 'public_network' flag and the second one to 'cluster_network'
  122. #
  123. # In order to work, each selector value must match a NetworkAttachmentDefinition object in Multus
  124. #
  125. # public: public-conf --> NetworkAttachmentDefinition object name in Multus
  126. # cluster: cluster-conf --> NetworkAttachmentDefinition object name in Multus
  127. # Provide internet protocol version. IPv6, IPv4 or empty string are valid options. Empty string would mean IPv4
  128. #ipFamily: "IPv6"
  129. # Ceph daemons to listen on both IPv4 and Ipv6 networks
  130. #dualStack: false
  131. # Enable multiClusterService to export the mon and OSD services to peer cluster.
  132. # This is useful to support RBD mirroring between two clusters having overlapping CIDRs.
  133. # Ensure that peer clusters are connected using an MCS API compatible application, like Globalnet Submariner.
  134. #multiClusterService:
  135. # enabled: false
  136. # enable the crash collector for ceph daemon crash collection
  137. crashCollector:
  138. disable: false
  139. # Uncomment daysToRetain to prune ceph crash entries older than the
  140. # specified number of days.
  141. #daysToRetain: 30
  142. # enable log collector, daemons will log on files and rotate
  143. logCollector:
  144. enabled: true
  145. periodicity: daily # one of: hourly, daily, weekly, monthly
  146. maxLogSize: 500M # SUFFIX may be 'M' or 'G'. Must be at least 1M.
  147. # automate [data cleanup process](https://github.com/rook/rook/blob/master/Documentation/Storage-Configuration/ceph-teardown.md#delete-the-data-on-hosts) in cluster destruction.
  148. cleanupPolicy:
  149. # Since cluster cleanup is destructive to data, confirmation is required.
  150. # To destroy all Rook data on hosts during uninstall, confirmation must be set to "yes-really-destroy-data".
  151. # This value should only be set when the cluster is about to be deleted. After the confirmation is set,
  152. # Rook will immediately stop configuring the cluster and only wait for the delete command.
  153. # If the empty string is set, Rook will not destroy any data on hosts during uninstall.
  154. confirmation: ""
  155. # sanitizeDisks represents settings for sanitizing OSD disks on cluster deletion
  156. sanitizeDisks:
  157. # method indicates if the entire disk should be sanitized or simply ceph's metadata
  158. # in both case, re-install is possible
  159. # possible choices are 'complete' or 'quick' (default)
  160. method: quick
  161. # dataSource indicate where to get random bytes from to write on the disk
  162. # possible choices are 'zero' (default) or 'random'
  163. # the 'random' source only works with the 'complete' method, the 'quick' method will use the 'zero' source
  164. # using random sources will consume entropy from the system and will take much more time then the zero source
  165. dataSource: zero
  166. # iteration overwrite N times instead of the default (1)
  167. # takes an integer value
  168. iteration: 1
  169. # allowUninstallWithVolumes defines how the uninstall should be performed
  170. # If set to true, cephCluster deletion does not wait for the PVs to be deleted.
  171. allowUninstallWithVolumes: false
  172. # To control where various services will be scheduled by kubernetes, use the placement configuration sections below.
  173. # The example under 'all' would have all services scheduled on kubernetes nodes labeled with 'role=storage-node' and
  174. # tolerate taints with a key of 'storage-node'.
  175. # placement:
  176. # all:
  177. # nodeAffinity:
  178. # requiredDuringSchedulingIgnoredDuringExecution:
  179. # nodeSelectorTerms:
  180. # - matchExpressions:
  181. # - key: role
  182. # operator: In
  183. # values:
  184. # - storage-node
  185. # podAffinity:
  186. # podAntiAffinity:
  187. # topologySpreadConstraints:
  188. # tolerations:
  189. # - key: storage-node
  190. # operator: Exists
  191. # The above placement information can also be specified for mon, osd, and mgr components
  192. # mon:
  193. # Monitor deployments may contain an anti-affinity rule for avoiding monitor
  194. # collocation on the same node. This is a required rule when host network is used
  195. # or when AllowMultiplePerNode is false. Otherwise this anti-affinity rule is a
  196. # preferred rule with weight: 50.
  197. # osd:
  198. # prepareosd:
  199. # mgr:
  200. # cleanup:
  201. annotations:
  202. # all:
  203. # mon:
  204. # mgr:
  205. # osd:
  206. # exporter:
  207. # crashcollector:
  208. # cleanup:
  209. # prepareosd:
  210. # cmdreporter is for jobs to detect ceph and csi versions, and check network status
  211. # cmdreporter:
  212. # clusterMetadata annotations will be applied to only `rook-ceph-mon-endpoints` configmap and the `rook-ceph-mon` and `rook-ceph-admin-keyring` secrets.
  213. # And clusterMetadata annotations will not be merged with `all` annotations.
  214. # clusterMetadata:
  215. # kubed.appscode.com/sync: "true"
  216. # If no mgr annotations are set, prometheus scrape annotations will be set by default.
  217. # mgr:
  218. labels:
  219. # all:
  220. # mon:
  221. # osd:
  222. # cleanup:
  223. # mgr:
  224. # prepareosd:
  225. # These labels are applied to ceph-exporter servicemonitor only
  226. # exporter:
  227. # monitoring is a list of key-value pairs. It is injected into all the monitoring resources created by operator.
  228. # These labels can be passed as LabelSelector to Prometheus
  229. # monitoring:
  230. # crashcollector:
  231. resources:
  232. #The requests and limits set here, allow the mgr pod to use half of one CPU core and 1 gigabyte of memory
  233. # mgr:
  234. # limits:
  235. # memory: "1024Mi"
  236. # requests:
  237. # cpu: "500m"
  238. # memory: "1024Mi"
  239. # The above example requests/limits can also be added to the other components
  240. # mon:
  241. # osd:
  242. # For OSD it also is a possible to specify requests/limits based on device class
  243. # osd-hdd:
  244. # osd-ssd:
  245. # osd-nvme:
  246. # prepareosd:
  247. # mgr-sidecar:
  248. # crashcollector:
  249. # logcollector:
  250. # cleanup:
  251. # exporter:
  252. # cmd-reporter:
  253. # The option to automatically remove OSDs that are out and are safe to destroy.
  254. removeOSDsIfOutAndSafeToRemove: false
  255. priorityClassNames:
  256. #all: rook-ceph-default-priority-class
  257. mon: system-node-critical
  258. osd: system-node-critical
  259. mgr: system-cluster-critical
  260. #crashcollector: rook-ceph-crashcollector-priority-class
  261. storage: # cluster level storage configuration and selection
  262. useAllNodes: true
  263. useAllDevices: true
  264. #deviceFilter:
  265. config:
  266. # crushRoot: "custom-root" # specify a non-default root label for the CRUSH map
  267. # metadataDevice: "md0" # specify a non-rotational storage so ceph-volume will use it as block db device of bluestore.
  268. # databaseSizeMB: "1024" # uncomment if the disks are smaller than 100 GB
  269. # osdsPerDevice: "1" # this value can be overridden at the node or device level
  270. # encryptedDevice: "true" # the default value for this option is "false"
  271. # deviceClass: "myclass" # specify a device class for OSDs in the cluster
  272. allowDeviceClassUpdate: false # whether to allow changing the device class of an OSD after it is created
  273. allowOsdCrushWeightUpdate: false # whether to allow resizing the OSD crush weight after osd pvc is increased
  274. # Individual nodes and their config can be specified as well, but 'useAllNodes' above must be set to false. Then, only the named
  275. # nodes below will be used as storage resources. Each node's 'name' field should match their 'kubernetes.io/hostname' label.
  276. # nodes:
  277. # - name: "172.17.4.201"
  278. # devices: # specific devices to use for storage can be specified for each node
  279. # - name: "sdb"
  280. # - name: "nvme01" # multiple osds can be created on high performance devices
  281. # config:
  282. # osdsPerDevice: "5"
  283. # - name: "/dev/disk/by-id/ata-ST4000DM004-XXXX" # devices can be specified using full udev paths
  284. # config: # configuration can be specified at the node level which overrides the cluster level config
  285. # - name: "172.17.4.301"
  286. # deviceFilter: "^sd."
  287. # Whether to always schedule OSD pods on nodes declared explicitly in the "nodes" section, even if they are
  288. # temporarily not schedulable. If set to true, consider adding placement tolerations for unschedulable nodes.
  289. scheduleAlways: false
  290. # when onlyApplyOSDPlacement is false, will merge both placement.All() and placement.osd
  291. onlyApplyOSDPlacement: false
  292. # Time for which an OSD pod will sleep before restarting, if it stopped due to flapping
  293. # flappingRestartIntervalHours: 24
  294. # The ratio at which Ceph should block IO if the OSDs are too full. The default is 0.95.
  295. # fullRatio: 0.95
  296. # The ratio at which Ceph should stop backfilling data if the OSDs are too full. The default is 0.90.
  297. # backfillFullRatio: 0.90
  298. # The ratio at which Ceph should raise a health warning if the OSDs are almost full. The default is 0.85.
  299. # nearFullRatio: 0.85
  300. # The section for configuring management of daemon disruptions during upgrade or fencing.
  301. disruptionManagement:
  302. # If true, the operator will create and manage PodDisruptionBudgets for OSD, Mon, RGW, and MDS daemons. OSD PDBs are managed dynamically
  303. # via the strategy outlined in the [design](https://github.com/rook/rook/blob/master/design/ceph/ceph-managed-disruptionbudgets.md). The operator will
  304. # block eviction of OSDs by default and unblock them safely when drains are detected.
  305. managePodBudgets: true
  306. # A duration in minutes that determines how long an entire failureDomain like `region/zone/host` will be held in `noout` (in addition to the
  307. # default DOWN/OUT interval) when it is draining. This is only relevant when `managePodBudgets` is `true`. The default value is `30` minutes.
  308. osdMaintenanceTimeout: 30
  309. # csi defines CSI Driver settings applied per cluster.
  310. csi:
  311. readAffinity:
  312. # Enable read affinity to enable clients to optimize reads from an OSD in the same topology.
  313. # Enabling the read affinity may cause the OSDs to consume some extra memory.
  314. # For more details see this doc:
  315. # https://rook.io/docs/rook/latest/Storage-Configuration/Ceph-CSI/ceph-csi-drivers/#enable-read-affinity-for-rbd-volumes
  316. enabled: false
  317. # cephfs driver specific settings.
  318. cephfs:
  319. # Set CephFS Kernel mount options to use https://docs.ceph.com/en/latest/man/8/mount.ceph/#options.
  320. # kernelMountOptions: ""
  321. # Set CephFS Fuse mount options to use https://docs.ceph.com/en/latest/man/8/ceph-fuse/#options.
  322. # fuseMountOptions: ""
  323. # healthChecks
  324. # Valid values for daemons are 'mon', 'osd', 'status'
  325. healthCheck:
  326. daemonHealth:
  327. mon:
  328. disabled: false
  329. interval: 45s
  330. osd:
  331. disabled: false
  332. interval: 60s
  333. status:
  334. disabled: false
  335. interval: 60s
  336. # Change pod liveness probe timing or threshold values. Works for all mon,mgr,osd daemons.
  337. livenessProbe:
  338. mon:
  339. disabled: false
  340. mgr:
  341. disabled: false
  342. osd:
  343. disabled: false
  344. # Change pod startup probe timing or threshold values. Works for all mon,mgr,osd daemons.
  345. startupProbe:
  346. mon:
  347. disabled: false
  348. mgr:
  349. disabled: false
  350. osd:
  351. disabled: false