Feature 11068: Integration of Airflow helm chart as subchart of OSM helm chart

Change-Id: I287d1767dfb356a27de7999ac39ec21dd29b7e60
Signed-off-by: garciadeblas <gerardo.garciadeblas@telefonica.com>
diff --git a/installers/full_install_osm.sh b/installers/full_install_osm.sh
index a79a143..9c6ff88 100755
--- a/installers/full_install_osm.sh
+++ b/installers/full_install_osm.sh
@@ -245,7 +245,13 @@
     fi
     [ -n "$OSM_VCA_APIPROXY" ] && OSM_HELM_OPTS="${OSM_HELM_OPTS} --set lcm.config.OSMLCM_VCA_APIPROXY=${OSM_VCA_APIPROXY}"
 
-    [ -n "${INSTALL_NGSA}" ] || OSM_HELM_OPTS="${OSM_HELM_OPTS} --set global.oldServiceAssurance=true"
+    if [ -n "${INSTALL_NGSA}" ]; then
+        OSM_HELM_OPTS="${OSM_HELM_OPTS} --set airflow.defaultAirflowRepository=${DOCKER_REGISTRY_URL}${DOCKER_USER}/airflow"
+        [ ! "$OSM_DOCKER_TAG" == "testing-daily" ] && OSM_HELM_OPTS="${OSM_HELM_OPTS} --set-string airflow.defaultAirflowTag=${OSM_DOCKER_TAG}"
+        OSM_HELM_OPTS="${OSM_HELM_OPTS} --set airflow.ingress.web.hosts[0].name=airflow.${OSM_K8S_EXTERNAL_IP}.nip.io"
+    else
+        OSM_HELM_OPTS="${OSM_HELM_OPTS} --set global.oldServiceAssurance=true --set airflow.enabled=false"
+    fi
     if [ -n "${OSM_BEHIND_PROXY}" ]; then
         OSM_HELM_OPTS="${OSM_HELM_OPTS} --set global.behindHttpProxy=true"
         [ -n "${HTTP_PROXY}" ] && OSM_HELM_OPTS="${OSM_HELM_OPTS} --set global.httpProxy.HTTP_PROXY=\"${HTTP_PROXY}\""
@@ -446,11 +452,7 @@
     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
-        install_osm_ngsa_service
-        track deploy_osm install_osm_ngsa_ok
-    fi
+    track deploy_osm install_osm_ngsa_ok
     [ -z "${DEBUG_INSTALL}" ] || DEBUG end of function
 }
 
diff --git a/installers/helm/osm/Chart.yaml b/installers/helm/osm/Chart.yaml
index 8a441a0..e8230bd 100644
--- a/installers/helm/osm/Chart.yaml
+++ b/installers/helm/osm/Chart.yaml
@@ -46,7 +46,7 @@
   repository: "https://prometheus-community.github.io/helm-charts"
   version: 25.11.0
   condition: prometheus.enabled
-# - name: airflow
-#   repository: "https://airflow.apache.org"
-#   version: "1.6.0"
-#   condition: airflow.enabled
+- name: airflow
+  repository: "https://airflow.apache.org"
+  version: "1.9.0"
+  condition: airflow.enabled
diff --git a/installers/helm/osm/values.yaml b/installers/helm/osm/values.yaml
index a83911d..b1b8b21 100644
--- a/installers/helm/osm/values.yaml
+++ b/installers/helm/osm/values.yaml
@@ -92,6 +92,78 @@
 
 airflow:
   enabled: true
+  config:
+    core:
+      parallelism: 4
+      dag_concurrency: 2
+      max_active_tasks_per_dag: 2
+      worker_concurrency: 2
+      dags_folder: "/home/airflow/.local/lib/python3.10/site-packages/osm_ngsa"
+  defaultAirflowRepository: opensourcemano/airflow
+  defaultAirflowTag: "testing-daily"
+  executor: LocalExecutor
+  extraEnv: |
+    - name: AIRFLOW__API__AUTH_BACKENDS
+      value: 'airflow.api.auth.backend.basic_auth'
+    - name: AIRFLOW__LOGGING__LOGGING_LEVEL
+      value: 'INFO'
+    - name: OSMMON_DATABASE_COMMONKEY
+      valueFrom:
+        secretKeyRef:
+          name: osm-secret
+          key: OSM_DATABASE_COMMONKEY
+  # extraEnvFrom: |
+  #   - secretRef:
+  #       name: ngsa-secret
+  ingress:
+    web:
+      enabled: True
+      # hosts:
+      #   - name: "localhost"
+      ingressClassName: nginx
+  # scheduler:
+  #   resources:
+  #     requests:
+  #       memory: 512Mi
+  #       cpu: 250m
+  #     limits:
+  #       memory: 1Gi
+  #       cpu: 500m
+  webserverSecretKeySecretName: airflow-webserver-secret
+  webserver:
+    resources:
+      requests:
+        memory: 256Mi
+        cpu: 250m
+      limits:
+        memory: 1Gi
+        cpu: 500m
+    service:
+      type: ClusterIP
+      ports:
+        - name: airflow-ui
+          port: "{{ .Values.ports.airflowUI }}"
+          targetPort: "{{ .Values.ports.airflowUI }}"
+  workers:
+    persistence:
+      size: 2Gi
+    replicas: 1
+    resources:
+      requests:
+        memory: 512Mi
+        cpu: 250m
+      limits:
+        memory: 1Gi
+        cpu: 500m
+    logGroomerSidecar:
+      retentionDays: 7
+      resources:
+        limits:
+          cpu: 100m
+          memory: 128Mi
+        requests:
+          cpu: 100m
+          memory: 128Mi
 
 alertmanager:
   enabled: true