- if ! helm -n osm status airflow 2> /dev/null ; then
- # if it does not exist, create secrets and install
- kubectl -n osm create secret generic airflow-webserver-secret --from-literal="webserver-secret-key=$(python3 -c 'import secrets; print(secrets.token_hex(16))')"
- helm repo add apache-airflow https://airflow.apache.org
- helm repo update
- helm -n osm install airflow apache-airflow/airflow -f ${OSM_HELM_WORK_DIR}/airflow-values.yaml --version ${AIRFLOW_HELM_VERSION}
- else
- # if it exists, upgrade
- helm repo update
- helm -n osm upgrade airflow apache-airflow/airflow -f ${OSM_HELM_WORK_DIR}/airflow-values.yaml --version ${AIRFLOW_HELM_VERSION}
- fi
- [ -z "${DEBUG_INSTALL}" ] || DEBUG end of function
-}
-
-# Install Prometheus Pushgateway helm chart
-function install_prometheus_pushgateway() {
- [ -z "${DEBUG_INSTALL}" ] || DEBUG end of function
- if ! helm -n osm status pushgateway 2> /dev/null ; then
- # if it does not exist, install
- helm repo add prometheus-community https://prometheus-community.github.io/helm-charts
- helm repo update
- helm -n osm install pushgateway prometheus-community/prometheus-pushgateway --version ${PROMPUSHGW_HELM_VERSION}
- else
- # if it exists, upgrade
- helm repo update
- helm -n osm upgrade pushgateway prometheus-community/prometheus-pushgateway --version ${PROMPUSHGW_HELM_VERSION}
- fi
- [ -z "${DEBUG_INSTALL}" ] || DEBUG end of function
-}
-
-# Install Prometheus AlertManager helm chart
-function install_prometheus_alertmanager() {
- [ -z "${DEBUG_INSTALL}" ] || DEBUG end of function
- # copy alertmanager-values.yaml to the destination folder
- sudo mkdir -p ${OSM_HELM_WORK_DIR}
- sudo cp ${OSM_DEVOPS}/installers/helm/values/alertmanager-values.yaml ${OSM_HELM_WORK_DIR}
- if ! helm -n osm status alertmanager 2> /dev/null ; then
- # if it does not exist, install
- helm repo add prometheus-community https://prometheus-community.github.io/helm-charts
- helm repo update
- helm -n osm install alertmanager prometheus-community/alertmanager -f ${OSM_HELM_WORK_DIR}/alertmanager-values.yaml --version ${ALERTMANAGER_HELM_VERSION}
- else
- # if it exists, upgrade
- helm repo update
- helm -n osm upgrade alertmanager prometheus-community/alertmanager -f ${OSM_HELM_WORK_DIR}/alertmanager-values.yaml --version ${ALERTMANAGER_HELM_VERSION}
- fi