Skip to content

Commit

Permalink
feat(ZFSPV): adding xfs filesystem support for zfs-localpv
Browse files Browse the repository at this point in the history
Signed-off-by: Pawan <[email protected]>
  • Loading branch information
pawanpraka1 authored and kmova committed Nov 6, 2019
1 parent a10dedb commit 57b3acf
Show file tree
Hide file tree
Showing 2 changed files with 72 additions and 1 deletion.
2 changes: 1 addition & 1 deletion buildscripts/zfs-driver/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

FROM ubuntu:18.04
RUN apt-get update; exit 0
RUN apt-get -y install rsyslog libssl-dev
RUN apt-get -y install rsyslog libssl-dev xfsprogs
#RUN apt-get clean && rm -rf /var/lib/apt/lists/*

COPY zfs-driver /usr/local/bin/
Expand Down
71 changes: 71 additions & 0 deletions deploy/sample/mongo-statefulset.yaml
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit 57b3acf

Please sign in to comment.