added ebs hostpath storage

This commit is contained in:
2022-11-10 01:09:46 +13:00
parent e5fdf35669
commit 3e70f70fa3
15 changed files with 125 additions and 16516 deletions

View File

@ -0,0 +1,55 @@
# This probbaly won't work, as multiple OSDs are required
# on a physical disk in order to place it in multiple pools
# HDD should probably be placed in an EC fs only.
apiVersion: ceph.rook.io/v1
kind: CephBlockPool
metadata:
name: hdd-block-ec-pool
namespace: rook-ceph
spec:
failureDomain: host
erasureCoded:
dataChunks: 2
codingChunks: 1
deviceClass: hdd
---
apiVersion: storage.k8s.io/v1
kind: StorageClass
metadata:
name: rook-ssd-block-replica
# Change "rook-ceph" provisioner prefix to match the operator namespace if needed
provisioner: rook-ceph.rbd.csi.ceph.com
parameters:
#Parameters are relative to the provisioner being referenced.
# clusterID is the namespace where the rook cluster is running
clusterID: rook-ceph
# Ceph pool into which the RBD image shall be created
pool: ssd-block-replica-pool
# RBD image format. Defaults to "2".
# Options are only 1 (old-gen) or 2 (current).
imageFormat: "2"
# RBD image features. Available for imageFormat: "2". CSI RBD currently supports only `layering` feature.
imageFeatures: layering
# The secrets contain Ceph admin credentials.
csi.storage.k8s.io/provisioner-secret-name: rook-csi-rbd-provisioner
csi.storage.k8s.io/provisioner-secret-namespace: rook-ceph
csi.storage.k8s.io/controller-expand-secret-name: rook-csi-rbd-provisioner
csi.storage.k8s.io/controller-expand-secret-namespace: rook-ceph
csi.storage.k8s.io/node-stage-secret-name: rook-csi-rbd-node
csi.storage.k8s.io/node-stage-secret-namespace: rook-ceph
# Specify the filesystem type of the volume. If not specified, csi-provisioner
# will set default as `ext4`. Note that `xfs` is not recommended due to potential deadlock
# in hyperconverged settings where the volume is mounted on the same node as the osds.
csi.storage.k8s.io/fstype: ext4
# Delete the rbd volume when a PVC is deleted
reclaimPolicy: Retain
# Optional, if you want to add dynamic resize for PVC.
allowVolumeExpansion: true

View File

@ -0,0 +1,48 @@
apiVersion: ceph.rook.io/v1
kind: CephBlockPool
metadata:
name: ssd-block-replica-pool
namespace: rook-ceph
spec:
failureDomain: host
replicated:
size: 3
deviceClass: ssd
---
apiVersion: storage.k8s.io/v1
kind: StorageClass
metadata:
name: rook-ssd-block-replica
# Change "rook-ceph" provisioner prefix to match the operator namespace if needed
provisioner: rook-ceph.rbd.csi.ceph.com
parameters:
#Parameters are relative to the provisioner being referenced.
# clusterID is the namespace where the rook cluster is running
clusterID: rook-ceph
# Ceph pool into which the RBD image shall be created
pool: ssd-block-replica-pool
# RBD image format. Defaults to "2".
# Options are only 1 (old-gen) or 2 (current).
imageFormat: "2"
# RBD image features. Available for imageFormat: "2". CSI RBD currently supports only `layering` feature.
imageFeatures: layering
# The secrets contain Ceph admin credentials.
csi.storage.k8s.io/provisioner-secret-name: rook-csi-rbd-provisioner
csi.storage.k8s.io/provisioner-secret-namespace: rook-ceph
csi.storage.k8s.io/controller-expand-secret-name: rook-csi-rbd-provisioner
csi.storage.k8s.io/controller-expand-secret-namespace: rook-ceph
csi.storage.k8s.io/node-stage-secret-name: rook-csi-rbd-node
csi.storage.k8s.io/node-stage-secret-namespace: rook-ceph
# Specify the filesystem type of the volume. If not specified, csi-provisioner
# will set default as `ext4`. Note that `xfs` is not recommended due to potential deadlock
# in hyperconverged settings where the volume is mounted on the same node as the osds.
csi.storage.k8s.io/fstype: ext4
# Delete the rbd volume when a PVC is deleted
reclaimPolicy: Retain
# Optional, if you want to add dynamic resize for PVC.
allowVolumeExpansion: true

View File

@ -0,0 +1,91 @@
apiVersion: ceph.rook.io/v1
kind: CephFilesystem
metadata:
name: fs-pool
namespace: rook-ceph
spec:
metadataPool:
failureDomain: host
replicated:
size: 3
deviceClass: ssd
dataPools:
- name: ssd-replica
failureDomain: host
replicated:
size: 3
deviceClass: ssd
- name: hdd-ec
failureDomain: host
erasureCoded:
dataChunks: 2
codingChunks: 1
deviceClass: hdd
preserveFilesystemOnDelete: true
metadataServer:
activeCount: 1
activeStandby: true
---
apiVersion: storage.k8s.io/v1
kind: StorageClass
metadata:
name: rook-fs-ssd-replica
# Change "rook-ceph" provisioner prefix to match the operator namespace if needed
provisioner: rook-ceph.cephfs.csi.ceph.com
parameters:
#Parameters are relative to the provisioner being referenced.
# clusterID is the namespace where the rook cluster is running
clusterID: rook-ceph
# CephFS filesystem name into which the volume shall be created
fsName: fs-pool
# Ceph pool into which the volume shall be created
# Required for provisionVolume: "true"
pool: ssd-replica
# The secrets contain Ceph admin credentials. These are generated automatically by the operator
# in the same namespace as the cluster.
csi.storage.k8s.io/provisioner-secret-name: rook-csi-cephfs-provisioner
csi.storage.k8s.io/provisioner-secret-namespace: rook-ceph
csi.storage.k8s.io/controller-expand-secret-name: rook-csi-cephfs-provisioner
csi.storage.k8s.io/controller-expand-secret-namespace: rook-ceph
csi.storage.k8s.io/node-stage-secret-name: rook-csi-cephfs-node
csi.storage.k8s.io/node-stage-secret-namespace: rook-ceph
reclaimPolicy: Retain
allowVolumeExpansion: true
---
apiVersion: storage.k8s.io/v1
kind: StorageClass
metadata:
name: rook-fs-hdd-ec
# Change "rook-ceph" provisioner prefix to match the operator namespace if needed
provisioner: rook-ceph.cephfs.csi.ceph.com
parameters:
#Parameters are relative to the provisioner being referenced.
# clusterID is the namespace where the rook cluster is running
clusterID: rook-ceph
# CephFS filesystem name into which the volume shall be created
fsName: fs-pool
# Ceph pool into which the volume shall be created
# Required for provisionVolume: "true"
pool: hdd-ec
# The secrets contain Ceph admin credentials. These are generated automatically by the operator
# in the same namespace as the cluster.
csi.storage.k8s.io/provisioner-secret-name: rook-csi-cephfs-provisioner
csi.storage.k8s.io/provisioner-secret-namespace: rook-ceph
csi.storage.k8s.io/controller-expand-secret-name: rook-csi-cephfs-provisioner
csi.storage.k8s.io/controller-expand-secret-namespace: rook-ceph
csi.storage.k8s.io/node-stage-secret-name: rook-csi-cephfs-node
csi.storage.k8s.io/node-stage-secret-namespace: rook-ceph
reclaimPolicy: Retain
allowVolumeExpansion: true