Feature 11069: Integration of MongoDB helm chart as subchart of OSM helm chart 70/15170/3
authorgarciadeblas <gerardo.garciadeblas@telefonica.com>
Tue, 22 Apr 2025 12:13:23 +0000 (14:13 +0200)
committergarciadeblas <gerardo.garciadeblas@telefonica.com>
Wed, 23 Apr 2025 07:00:59 +0000 (09:00 +0200)
Change-Id: Ie1abbb1714e2cdf6dccf5fb12ce502c5d4bb7066
Signed-off-by: garciadeblas <gerardo.garciadeblas@telefonica.com>
installers/full_install_osm.sh
installers/helm/osm/Chart.yaml
installers/helm/osm/values.yaml

index 2875228..a79a143 100755 (executable)
@@ -271,24 +271,6 @@ EOF"
     [ -z "${DEBUG_INSTALL}" ] || DEBUG end of function
 }
 
-#deploy charmed services
-function deploy_charmed_services() {
-    [ -z "${DEBUG_INSTALL}" ] || DEBUG beginning of function
-    juju add-model $OSM_NAMESPACE $OSM_VCA_K8S_CLOUDNAME
-    juju deploy ch:mongodb-k8s -m $OSM_NAMESPACE --channel latest/stable
-    [ -z "${DEBUG_INSTALL}" ] || DEBUG end of function
-}
-
-#deploy mongodb
-function deploy_mongodb() {
-    [ -z "${DEBUG_INSTALL}" ] || DEBUG beginning of function
-    MONGO_OPTS="-d ${OSM_HELM_WORK_DIR} -D ${OSM_DEVOPS} -s ${OSM_NAMESPACE} -t ${OSM_DOCKER_TAG} -U ${DOCKER_USER} ${DEBUG_INSTALL}"
-    [ -n "${DOCKER_REGISTRY_URL}" ] && MONGO_OPTS="${MONGO_OPTS} -r ${DOCKER_REGISTRY_URL}"
-    $OSM_DEVOPS/installers/install_mongodb.sh ${MONGO_OPTS} || \
-    FATAL_TRACK install_osm_mongodb_service "install_mongodb.sh failed"
-    [ -z "${DEBUG_INSTALL}" ] || DEBUG end of function
-}
-
 function install_osm_ngsa_service() {
     [ -z "${DEBUG_INSTALL}" ] || DEBUG beginning of function
     NGSA_OPTS="-i ${OSM_K8S_EXTERNAL_IP} -d ${OSM_HELM_WORK_DIR} -D ${OSM_DEVOPS} -s ${OSM_NAMESPACE} -t ${OSM_DOCKER_TAG} -U ${DOCKER_USER} ${DEBUG_INSTALL}"
@@ -461,9 +443,8 @@ function install_k8s_cluster() {
 
 function deploy_osm() {
     [ -z "${DEBUG_INSTALL}" ] || DEBUG beginning of function
-    deploy_mongodb
-    track deploy_osm deploy_mongodb_ok
     deploy_osm_helm_chart
+    track deploy_osm deploy_mongodb_ok
     track deploy_osm deploy_osm_services_k8s_ok
     if [ -n "$INSTALL_NGSA" ]; then
         # optional NGSA install
index b105bc9..8a441a0 100644 (file)
@@ -26,6 +26,10 @@ dependencies:
   repository: "https://charts.bitnami.com/bitnami"
   version: "9.12.3"
   condition: mysql.enabled
+- name: mongodb
+  repository: "https://charts.bitnami.com/bitnami"
+  version: "13.9.4"
+  condition: mongodb.enabled
 - name: kafka
   repository: "https://charts.bitnami.com/bitnami"
   version: 30.1.6
@@ -42,10 +46,6 @@ dependencies:
   repository: "https://prometheus-community.github.io/helm-charts"
   version: 25.11.0
   condition: prometheus.enabled
-# - name: mongodb
-#   repository: "https://charts.bitnami.com/bitnami"
-#   version: "13.9.4"
-#   condition: mongodb.enabled
 # - name: airflow
 #   repository: "https://airflow.apache.org"
 #   version: "1.6.0"
index 695b224..a83911d 100644 (file)
@@ -265,6 +265,27 @@ mon:
   # secretName: "mon-secret"
   config: {}
 
+mongodb:
+  enabled: true
+  replicaCount: 1
+  service:
+    nameOverride: "mongodb-k8s"
+  auth:
+    enabled: false
+  architecture: "replicaset"
+  livenessProbe:
+    initialDelaySeconds: 60
+    periodSeconds: 30
+    timeoutSeconds: 10
+    failureThreshold: 10
+    successThreshold: 1
+  readinessProbe:
+    initialDelaySeconds: 60
+    periodSeconds: 30
+    timeoutSeconds: 10
+    failureThreshold: 10
+    successThreshold: 1
+
 mysql:
   enabled: false
   image: