summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSylvain Desbureaux <sylvain.desbureaux@orange.com>2019-08-29 15:55:28 +0200
committerSylvain Desbureaux <sylvain.desbureaux@orange.com>2019-08-29 15:59:12 +0200
commit881d14c7109c53d341693c912d20db0e44d3e318 (patch)
treee772a8ab6fb52363308ddceb7f2bf03a34b3d4c0
parent424278d0f109f5515393d83ea03162b073773e55 (diff)
Move Storage access to RWO
Today when deploying NBI with OOM, the PersistentVolumeClaim needs the "ReadWriteMany" (or "RWX") capability. According to Kubernetes Documentation (https://kubernetes.io/docs/concepts/storage/persistent-volumes/#access-modes), ReadWriteMany stands for "the volume can be mounted as read-write by many nodes". That means that a particular PVC needs to be read and written from many pods. That also means that your code takes that into account and do the work to avoid write at the same place at the same time. An issue on RWX mode is that most "official" storage driver from Kubernetes doesn't support it (13 over the 19 drivers doesn't support it, espacially OpenStack, Amazon and Google storage classes). MongoDb PVC is used only for one Mongo instance and it's the same for maria. Thus we don't need RWX Change-Id: I4d54cd7853778d8ba6c83551a211abe34d383382 Issue-ID: EXTAPI-305 Signed-off-by: Sylvain Desbureaux <sylvain.desbureaux@orange.com>
-rw-r--r--kubernetes/common/mongo/values.yaml2
-rw-r--r--kubernetes/nbi/charts/mariadb/values.yaml2
2 files changed, 2 insertions, 2 deletions
diff --git a/kubernetes/common/mongo/values.yaml b/kubernetes/common/mongo/values.yaml
index d6938c1ebb..8a681296ce 100644
--- a/kubernetes/common/mongo/values.yaml
+++ b/kubernetes/common/mongo/values.yaml
@@ -71,7 +71,7 @@ persistence:
## If undefined (the default) or set to null, no storageClassName spec is
## set, choosing the default provisioner. (gp2 on AWS, standard on
## GKE, AWS & OpenStack)
- accessMode: ReadWriteMany
+ accessMode: ReadWriteOnce
size: 1Gi
mountPath: /dockerdata-nfs
mountSubPath: "mongo/data"
diff --git a/kubernetes/nbi/charts/mariadb/values.yaml b/kubernetes/nbi/charts/mariadb/values.yaml
index bd79853650..70fa143b9a 100644
--- a/kubernetes/nbi/charts/mariadb/values.yaml
+++ b/kubernetes/nbi/charts/mariadb/values.yaml
@@ -61,7 +61,7 @@ readiness:
persistence:
enabled: true
volumeReclaimPolicy: Retain
- accessMode: ReadWriteMany
+ accessMode: ReadWriteOnce
size: 2Gi
mountPath: /dockerdata-nfs
mountSubPath: mariadb/data