diff --git a/kubernetes-templates/MongoDB/0/mongo-controller.yaml b/kubernetes-templates/MongoDB/0/mongo-controller.yaml index 1bf60a6..6a3395b 100644 --- a/kubernetes-templates/MongoDB/0/mongo-controller.yaml +++ b/kubernetes-templates/MongoDB/0/mongo-controller.yaml @@ -42,7 +42,7 @@ spec: volumes: - name: mongo-datadir hostPath: - path: /data/db + path: ${mongo_volume} - name: utility emptyDir: {} metadata: diff --git a/kubernetes-templates/MongoDB/0/mongo-master.yaml b/kubernetes-templates/MongoDB/0/mongo-master.yaml index 49b7ac7..fdd5935 100644 --- a/kubernetes-templates/MongoDB/0/mongo-master.yaml +++ b/kubernetes-templates/MongoDB/0/mongo-master.yaml @@ -52,6 +52,6 @@ spec: volumes: - name: mongo-datadir hostPath: - path: /data/db + path: ${mongo_volume} - name: utility emptyDir: {} diff --git a/kubernetes-templates/MongoDB/0/rancher-compose.yml b/kubernetes-templates/MongoDB/0/rancher-compose.yml index cc33791..85fc621 100644 --- a/kubernetes-templates/MongoDB/0/rancher-compose.yml +++ b/kubernetes-templates/MongoDB/0/rancher-compose.yml @@ -9,3 +9,8 @@ type: int default: 2 description: "should be even number" + - variable: "mongo_volume" + label: "hostpath volume for mongodb" + required: true + type: string + default: "/data/db"