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
|
|
@ -5,7 +5,7 @@
|
||||||
|
|
||||||
FROM ubuntu:18.04
|
FROM ubuntu:18.04
|
||||||
RUN apt-get update; exit 0
|
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/*
|
#RUN apt-get clean && rm -rf /var/lib/apt/lists/*
|
||||||
|
|
||||||
COPY zfs-driver /usr/local/bin/
|
COPY zfs-driver /usr/local/bin/
|
||||||
|
|
|
||||||
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