ceph: configuration fixes
[infra/stack/kubernetes.git] / apps / ceph / kubespray / playbooks / roles / common / vars / main.yml
index 933075a..2f5eafa 100644 (file)
 rook_data_dir_path: "/var/lib/rook"
 rook_storage_dir_path: "/rook/storage-dir"
 
-rook_namespace: "rook-ceph"
+rook_namespace: "{{ lookup('env', 'ROOK_NAMESPACE') | default('rook-ceph', true) }}"
 
-rook_use_host_network: "false"
-rook_node_device_filter: "vdb"
+# Per SuSE best practices for Rook deployments, separating nodes providing storage
+# from nodes running workloads consuming said storage
+# https://documentation.suse.com/sbp/all/html/SBP-rook-ceph-kubernetes/index.html
 
-rook_block_pool_name: "block-pool"
-rook_block_pool_replicas: 1
+# Label to be used to separate ceph workloads from other workloads
+rook_storage_label: "storage-node"
+# These nodes will have the label {{rook-storage-label}}=true applied to them
+rook_storage_nodes: "{{ groups['storage'] }}"
+# These nodes will have the label {{rook_storage_label}}=false applied to them
+# as well as a taint {{rook_storage_label}}=false:NoSchedule
+rook_nostorage_nodes: "{{ groups['k8s-cluster'] | difference(rook_storage_nodes) }}"
 
-rook_block_storage_name: "block-storage"
-rook_block_storage_fs: "xfs"
+# Disabled for small test environment
+rook_ceph_crashcollector_disable: "{{ lookup('env', 'ROOK_CEPH_CRASHCOLLECTOR_DISABLE') | default(true, true) }}"
+rook_use_host_network: "{{ lookup('env', 'ROOK_USE_HOST_NETWORK') | default(false, true) }}"
+rook_node_device_filter: "{{ lookup('env', 'ROOK_NODE_DEVICE_FILTER') | default('^vdb$', true) }}"
 
-rook_filesystem_name: "rookfs"
-rook_filesystem_storageclass_name: "csi-cephfs"
+rook_block_pool_name: "{{ lookup('env', 'ROOK_BLOCK_POOL_NAME') | default('block-pool', true) }}"
+rook_block_pool_replicas: "{{ lookup('env', 'ROOK_BLOCK_POOL_REPLICAS') | default(1, true) | int }}"
+# The below values should be customized according to deployment requirements
+# See: https://docs.ceph.com/en/latest/rados/configuration/pool-pg-config-ref/
+rook_ceph_osd_pool_default_size: "{{ lookup('env', 'ROOK_CEPH_OSD_POOL_DEFAULT_SIZE') | default(1, true) | int }}"
+rook_ceph_osd_pool_default_min_size: "{{ lookup('env', 'ROOK_CEPH_OSD_POOL_DEFAULT_MIN_SIZE') | default(1, true) | int }}"
+rook_ceph_mon_warn_on_no_pool_redundancy: "{{ lookup('env', 'ROOK_CEPH_MON_WARN_ON_NO_POOL_REDUNDANCY') | default(false, true) }}"
+# Increase this as required. Must be an odd number. 3 is the recommended value.
+rook_ceph_mon_count: "{{ lookup('env', 'ROOK_CEPH_MON_COUNT') | default(1, true) | int }}"
+
+rook_block_storage_name: "{{ lookup('env', 'ROOK_BLOCK_STORAGE_NAME') | default('block-storage', true) }}"
+rook_block_storage_fs: "{{ lookup('env', 'ROOK_BLOCK_STORAGE_FS') | default('xfs', true) }}"
+
+rook_filesystem: "{{ lookup('env', 'ROOK_FS') | default('false', true) }}"
+rook_filesystem_name: "{{ lookup('env', 'ROOK_FILESYSTEM_NAME') | default('rookfs', true) }}"
+rook_filesystem_storageclass_name: "{{ lookup('env', 'ROOK_FILESYSTEM_STORAGECLASS_NAME') | default('csi-cephfs', true) }}"
+
+# vim: set ts=2 sw=2 expandtab: