- sudo sed -i "s#defaultAirflowTag:.*#defaultAirflowTag: ${OSM_DOCKER_TAG}#g" ${OSM_HELM_WORK_DIR}/airflow-values.yaml
- 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
-}
+ sudo sed -i "s#defaultAirflowTag:.*#defaultAirflowTag: \"${OSM_DOCKER_TAG}\"#g" ${OSM_HELM_WORK_DIR}/airflow-values.yaml
+ echo "Updating Helm values file helm/values/airflow-values.yaml to use defaultAirflowRepository: ${DOCKER_REGISTRY_URL}${DOCKER_USER}/airflow"
+ sudo sed -i "s#defaultAirflowRepository:.*#defaultAirflowRepository: ${DOCKER_REGISTRY_URL}${DOCKER_USER}/airflow#g" ${OSM_HELM_WORK_DIR}/airflow-values.yaml
+ echo "Updating Helm values file helm/values/airflow-values.yaml to set ingress.web.hosts with host \"airflow.${DEFAULT_IP}.nip.io\""
+ sudo sed -i "s#name: \"localhost\"#name: \"airflow.${DEFAULT_IP}.nip.io\"#g" ${OSM_HELM_WORK_DIR}/airflow-values.yaml