Skip to content

Commit

Permalink
Merge pull request rook#13115 from rkachach/fix_issue_adding_cluster_…
Browse files Browse the repository at this point in the history
…pvc_local

test: adding an example for cluster on local pvc creation
  • Loading branch information
travisn authored Oct 31, 2023
2 parents 674407d + f95c96a commit d5b26c3
Showing 1 changed file with 158 additions and 0 deletions.
158 changes: 158 additions & 0 deletions deploy/examples/cluster-on-pvc-minikube.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,158 @@
#################################################################################################################
# Define the settings for the rook-ceph cluster with settings for a minikube cluster with a single node

# This example expects a single node minikube cluster with three extra disks: vdb, vdc and vdd. Please modify
# it according to your environment. See the documentation for more details on storage settings available.

# For example, to create the cluster:
# kubectl create -f crds.yaml -f common.yaml -f operator.yaml
# kubectl create -f cluster-on-pvc-minikube.yaml
#################################################################################################################
kind: StorageClass
apiVersion: storage.k8s.io/v1
metadata:
name: local-storage
provisioner: kubernetes.io/no-provisioner
volumeBindingMode: WaitForFirstConsumer
---
kind: PersistentVolume
apiVersion: v1
metadata:
name: local0-0
spec:
storageClassName: local-storage
capacity:
storage: 10Gi
accessModes:
- ReadWriteOnce
persistentVolumeReclaimPolicy: Retain
# PV for mon must be a filesystem volume.
volumeMode: Filesystem
local:
# To use dm devices like logical volume, please replace `/dev/sdb` with their device names like `/dev/vg-name/lv-name`.
path: /dev/vdb
nodeAffinity:
required:
nodeSelectorTerms:
- matchExpressions:
- key: kubernetes.io/hostname
operator: In
values:
- minikube
---
kind: PersistentVolume
apiVersion: v1
metadata:
name: local0-1
spec:
storageClassName: local-storage
capacity:
storage: 20Gi
accessModes:
- ReadWriteOnce
persistentVolumeReclaimPolicy: Retain
# PV for mon must be a filesystem volume.
volumeMode: Block
local:
# To use dm devices like logical volume, please replace `/dev/sdb` with their device names like `/dev/vg-name/lv-name`.
path: /dev/vdc
nodeAffinity:
required:
nodeSelectorTerms:
- matchExpressions:
- key: kubernetes.io/hostname
operator: In
values:
- minikube
---
kind: PersistentVolume
apiVersion: v1
metadata:
name: local0-2
spec:
storageClassName: local-storage
capacity:
storage: 20Gi
accessModes:
- ReadWriteOnce
persistentVolumeReclaimPolicy: Retain
# PV for mon must be a filesystem volume.
volumeMode: Block
local:
# To use dm devices like logical volume, please replace `/dev/sdb` with their device names like `/dev/vg-name/lv-name`.
path: /dev/vdd
nodeAffinity:
required:
nodeSelectorTerms:
- matchExpressions:
- key: kubernetes.io/hostname
operator: In
values:
- minikube
---
apiVersion: ceph.rook.io/v1
kind: CephCluster
metadata:
name: my-cluster
namespace: rook-ceph # namespace:cluster
spec:
dataDirHostPath: /var/lib/rook
mon:
count: 1
allowMultiplePerNode: true
volumeClaimTemplate:
spec:
storageClassName: local-storage
resources:
requests:
storage: 10Gi
mgr:
count: 1
modules:
- name: pg_autoscaler
enabled: true
dashboard:
enabled: true
ssl: false
crashCollector:
disable: false
cephVersion:
image: quay.io/ceph/ceph:v18
allowUnsupported: false
skipUpgradeChecks: false
continueUpgradeAfterChecksEvenIfNotHealthy: false
storage:
storageClassDeviceSets:
- name: set1
count: 2
portable: false
tuneDeviceClass: true
tuneFastDeviceClass: false
encrypted: false
placement:
preparePlacement:
volumeClaimTemplates:
- metadata:
name: data
# if you are looking at giving your OSD a different CRUSH device class than the one detected by Ceph
# annotations:
# crushDeviceClass: hybrid
spec:
resources:
requests:
storage: 20Gi
# IMPORTANT: Change the storage class depending on your environment
storageClassName: local-storage
volumeMode: Block
accessModes:
- ReadWriteOnce
# when onlyApplyOSDPlacement is false, will merge both placement.All() and storageClassDeviceSets.Placement
onlyApplyOSDPlacement: false
priorityClassNames:
mon: system-node-critical
osd: system-node-critical
mgr: system-cluster-critical
disruptionManagement:
managePodBudgets: true
osdMaintenanceTimeout: 30
pgHealthCheckTimeout: 0

0 comments on commit d5b26c3

Please sign in to comment.