Skip to content

Commit

Permalink
Add Persistence storage configuration handling (#57)
Browse files Browse the repository at this point in the history
* Add Persitence storage configuration and update Eiffel bundle to handle the new configuration configuration

* add storage class parameter

* Removed Size config parameter
  • Loading branch information
tobiasake authored Nov 20, 2020
1 parent 56ac162 commit 6ad259a
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 0 deletions.
4 changes: 4 additions & 0 deletions bundles/Eiffel/K8S/k8s_bundle_functions.bash
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,8 @@ function execute_k8s_command_on_services {
image.tag="$EIFFEL_MONGODB_VERSION"
fullnameOverride="$K8S_SERVICE_EIFFEL_MONGODB"
service.port="$EIFFEL_MONGODB_EXTERNAL_PORT"
persistence.enabled="$K8S_PVC_ENABLE"
persistence.storageClass="$K8S_PVC_STORAGE_CLASS"
)
local valuefile="charts/charts_values/mongodb-values.yaml"
local chart="charts/mongodb-9.3.1.tgz"
Expand Down Expand Up @@ -66,6 +68,8 @@ function execute_k8s_command_on_services {
fullnameOverride="$K8S_SERVICE_EIFFEL_RABBITMQ"
service.nodePort="$EIFFEL_RABBITMQ_AMQP_EXTERNAL_PORT"
service.managerPort="$EIFFEL_RABBITMQ_WEB_EXTERNAL_PORT"
persistence.enabled="$K8S_PVC_ENABLE"
persistence.storageClass="$K8S_PVC_STORAGE_CLASS"
)
local valuefile="charts/charts_values/rabbitmq-values.yaml"
local chart="charts/rabbitmq-7.7.1.tgz"
Expand Down
17 changes: 17 additions & 0 deletions config-default.bash
Original file line number Diff line number Diff line change
Expand Up @@ -109,3 +109,20 @@ HELM_VERSION=V3
# ------------------------------------------------------------------------------
K8S_INGRESS_TLS_ENABLE=false
K8S_INGRESS_CERT_SECRET_NAME=""


# ----------- Services Persistence Storage (PVC) configurations -------------------------------------
# Some components support persitent storage in Kubernetes, e.g. MongoDb and RabbitMq in Eiffel bundle.
# When persistence storage (PVC - PersistenceVolumeClaim) is enabled, data is not lossed in case of restart of pod/container.
# There is two configurations:
# K8S_PVC_ENABLE : if set to true, then persistence storage will be used for components that support that.
# K8S_PVC_STORAGE_CLASS : If defined, storageClassName: <storageClass>
# If set to "-", storageClassName: "", which disables dynamic provisioning
# 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)
# storageClass: "-"
#
# ------------------------------------------------------------------------------
K8S_PVC_ENABLE=false
K8S_PVC_STORAGE_CLASS="null"

0 comments on commit 6ad259a

Please sign in to comment.