mirror of
https://github.com/TECHNOFAB11/zfs-localpv.git
synced 2025-12-12 06:20:11 +01:00
feat(ZFSPV): adding xfs filesystem support for zfs-localpv
Signed-off-by: Pawan <pawan@mayadata.io>
This commit is contained in:
parent
a10dedbd5e
commit
57b3acf079
2 changed files with 72 additions and 1 deletions
71
deploy/sample/mongo-statefulset.yaml
Normal file
71
deploy/sample/mongo-statefulset.yaml
Normal file
|
|
@ -0,0 +1,71 @@
|
|||
# Create a StorageClass suited for Mongo StatefulSet
|
||||
# Can be configured with Anti affinity topology key of hostname (default)
|
||||
# or across zone.
|
||||
---
|
||||
apiVersion: storage.k8s.io/v1
|
||||
kind: StorageClass
|
||||
metadata:
|
||||
name: mongo-pv-az
|
||||
parameters:
|
||||
blocksize: "4k"
|
||||
poolname: "zfspv-pool"
|
||||
fsType: "xfs"
|
||||
provisioner: zfs.csi.openebs.io
|
||||
---
|
||||
# Headless service for stable DNS entries of StatefulSet members.
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: mongo
|
||||
labels:
|
||||
name: mongo
|
||||
spec:
|
||||
ports:
|
||||
- port: 27017
|
||||
targetPort: 27017
|
||||
clusterIP: None
|
||||
selector:
|
||||
role: mongo
|
||||
---
|
||||
apiVersion: apps/v1beta1
|
||||
kind: StatefulSet
|
||||
metadata:
|
||||
name: mongo
|
||||
spec:
|
||||
serviceName: "mongo"
|
||||
replicas: 3
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
role: mongo
|
||||
environment: test
|
||||
spec:
|
||||
terminationGracePeriodSeconds: 10
|
||||
containers:
|
||||
- name: mongo
|
||||
image: mongo
|
||||
command:
|
||||
- mongod
|
||||
- "--replSet"
|
||||
- rs0
|
||||
- "--bind_ip_all"
|
||||
ports:
|
||||
- containerPort: 27017
|
||||
volumeMounts:
|
||||
- name: mongo-persistent-storage
|
||||
mountPath: /data/db
|
||||
- name: mongo-sidecar
|
||||
image: cvallance/mongo-k8s-sidecar
|
||||
env:
|
||||
- name: MONGO_SIDECAR_POD_LABELS
|
||||
value: "role=mongo,environment=test"
|
||||
volumeClaimTemplates:
|
||||
- metadata:
|
||||
name: mongo-persistent-storage
|
||||
spec:
|
||||
storageClassName: mongo-pv-az
|
||||
accessModes:
|
||||
- ReadWriteOnce
|
||||
resources:
|
||||
requests:
|
||||
storage: 5Gi
|
||||
Loading…
Add table
Add a link
Reference in a new issue