2021-12-08 16:14:29 -07:00
|
|
|
#################################################################################################################
|
|
|
|
|
# Create a Ceph pool with settings for replication in production environments. A minimum of 3 OSDs on
|
|
|
|
|
# different hosts are required in this example.
|
|
|
|
|
# kubectl create -f nfs.yaml
|
|
|
|
|
#################################################################################################################
|
|
|
|
|
|
2019-01-08 11:48:17 -07:00
|
|
|
apiVersion: ceph.rook.io/v1
|
|
|
|
|
kind: CephNFS
|
|
|
|
|
metadata:
|
|
|
|
|
name: my-nfs
|
2020-12-09 13:21:15 -07:00
|
|
|
namespace: rook-ceph # namespace:cluster
|
2019-01-08 11:48:17 -07:00
|
|
|
spec:
|
2021-12-08 10:43:45 -07:00
|
|
|
# For Ceph v15, the rados block is required. It is ignored for Ceph v16.
|
2019-01-08 11:48:54 -07:00
|
|
|
rados:
|
2021-12-08 10:43:45 -07:00
|
|
|
# RADOS pool where NFS configs are stored.
|
|
|
|
|
# In this example the data pool for the "myfs" filesystem is used.
|
|
|
|
|
# If using the object store example, the data pool would be "my-store.rgw.buckets.data".
|
|
|
|
|
# Note that this has nothing to do with where exported file systems or object stores live.
|
2021-12-02 16:34:54 +04:00
|
|
|
pool: myfs-replicated
|
2021-12-08 10:43:45 -07:00
|
|
|
# RADOS namespace where NFS client recovery data is stored in the pool.
|
|
|
|
|
namespace: nfs-ns
|
2021-11-30 16:24:32 -07:00
|
|
|
|
2019-01-08 11:48:17 -07:00
|
|
|
# Settings for the NFS server
|
|
|
|
|
server:
|
|
|
|
|
# the number of active NFS servers
|
|
|
|
|
active: 3
|
|
|
|
|
# where to run the NFS server
|
|
|
|
|
placement:
|
|
|
|
|
# nodeAffinity:
|
|
|
|
|
# requiredDuringSchedulingIgnoredDuringExecution:
|
|
|
|
|
# nodeSelectorTerms:
|
|
|
|
|
# - matchExpressions:
|
|
|
|
|
# - key: role
|
|
|
|
|
# operator: In
|
|
|
|
|
# values:
|
|
|
|
|
# - mds-node
|
2020-03-31 13:10:36 +00:00
|
|
|
# topologySpreadConstraints:
|
2019-01-08 11:48:17 -07:00
|
|
|
# tolerations:
|
|
|
|
|
# - key: mds-node
|
|
|
|
|
# operator: Exists
|
|
|
|
|
# podAffinity:
|
|
|
|
|
# podAntiAffinity:
|
2019-03-05 11:21:57 +01:00
|
|
|
# A key/value list of annotations
|
|
|
|
|
annotations:
|
|
|
|
|
# key: value
|
2019-01-08 11:48:17 -07:00
|
|
|
# The requests and limits set here allow the ganesha pod(s) to use half of one CPU core and 1 gigabyte of memory
|
|
|
|
|
resources:
|
|
|
|
|
# limits:
|
|
|
|
|
# cpu: "500m"
|
|
|
|
|
# memory: "1024Mi"
|
|
|
|
|
# requests:
|
|
|
|
|
# cpu: "500m"
|
|
|
|
|
# memory: "1024Mi"
|
2019-08-04 15:40:29 -05:00
|
|
|
# the priority class to set to influence the scheduler's pod preemption
|
2020-10-12 13:57:05 +05:30
|
|
|
#priorityClassName:
|
2020-11-09 10:54:14 +05:30
|
|
|
# The logging levels: NIV_NULL | NIV_FATAL | NIV_MAJ | NIV_CRIT | NIV_WARN | NIV_EVENT | NIV_INFO | NIV_DEBUG | NIV_MID_DEBUG |NIV_FULL_DEBUG |NB_LOG_LEVEL
|
|
|
|
|
logLevel: NIV_INFO
|
2021-12-08 16:14:29 -07:00
|
|
|
---
|
|
|
|
|
apiVersion: ceph.rook.io/v1
|
|
|
|
|
kind: CephBlockPool
|
|
|
|
|
metadata:
|
|
|
|
|
name: builtin-nfs
|
|
|
|
|
namespace: rook-ceph # namespace:cluster
|
|
|
|
|
spec:
|
|
|
|
|
# The required pool name ".nfs" cannot be specified as a K8s resource name, thus we override
|
|
|
|
|
# the pool name created in Ceph with this name property
|
|
|
|
|
name: .nfs
|
|
|
|
|
failureDomain: host
|
|
|
|
|
replicated:
|
|
|
|
|
size: 3
|
|
|
|
|
requireSafeReplicaSize: true
|