From 43f22ca0db353d882a79f316656936d8dd028b6a Mon Sep 17 00:00:00 2001 From: Saravanakumar Date: Wed, 17 Oct 2018 20:40:05 +0530 Subject: [PATCH] bind mount /var/lib/gluster-block to pod [WIP] bind mount /var/lib/gluster-block to pod. This way status file for gluster-block can be persistent. Signed-off-by: Saravanakumar --- deploy/kube-templates/glusterfs-daemonset.yaml | 5 +++++ deploy/ocp-templates/glusterfs-template.yaml | 5 +++++ 2 files changed, 10 insertions(+) diff --git a/deploy/kube-templates/glusterfs-daemonset.yaml b/deploy/kube-templates/glusterfs-daemonset.yaml index 6d887113..3c26b54a 100644 --- a/deploy/kube-templates/glusterfs-daemonset.yaml +++ b/deploy/kube-templates/glusterfs-daemonset.yaml @@ -62,6 +62,8 @@ spec: - name: kernel-modules mountPath: "/usr/lib/modules" readOnly: true + - name: gluster-block + mountPath: "/var/lib/gluster-block" securityContext: capabilities: {} privileged: true @@ -119,3 +121,6 @@ spec: - name: kernel-modules hostPath: path: "/usr/lib/modules" + - name: gluster-block + hostPath: + path: "/var/lib/gluster-block" diff --git a/deploy/ocp-templates/glusterfs-template.yaml b/deploy/ocp-templates/glusterfs-template.yaml index e5de2366..d7ce9add 100644 --- a/deploy/ocp-templates/glusterfs-template.yaml +++ b/deploy/ocp-templates/glusterfs-template.yaml @@ -73,6 +73,8 @@ objects: - name: kernel-modules mountPath: "/usr/lib/modules" readOnly: true + - name: gluster-block + mountPath: "/var/lib/gluster-block" securityContext: capabilities: {} privileged: true @@ -132,6 +134,9 @@ objects: - name: kernel-modules hostPath: path: "/usr/lib/modules" + - name: gluster-block + hostPath: + path: "/var/lib/gluster-block" restartPolicy: Always terminationGracePeriodSeconds: 30 dnsPolicy: ClusterFirst