shipyard/charts/shipyard/templates/configmap-airflow-etc.yaml
Evgeny L c21555fce0 Use a direct connectivity to RabbitMQ
This patch makes Celery to connect to RabbitMQ directly instead
of using LB. It also brings a forked version of a transport url
template, the reason for this is the format for Kombu/Celery
broker url is different from oslo_messaging transport url:
1. URLs need to be separated with semicolons vs commas.
2. Every item in Kombu broker url needs to be a complete url
   that includes schema, vhost, and all credentials.

This format is specific to Airflow and is not used in upstream
OSH projects, hence it is included here and not in htk.

Depends-On: I5150a64bd29fa062e30496c1f2127de138322863
Change-Id: I0b4ae6a9538f2f6988ed42c8f5cf0a54e7a7ad2e
2019-08-28 23:38:59 +00:00

49 lines
2.3 KiB
YAML

# Copyright 2017 The Openstack-Helm Authors.
# Copyright (c) 2018 AT&T Intellectual Property. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
{{- $envAll := . }}
# Add endpoint URI lookup for Airflow Web Server
{{- if empty .Values.conf.airflow.webserver.base_url -}}
{{- tuple "airflow_web" "internal" "airflow_web" . | include "helm-toolkit.endpoints.keystone_endpoint_uri_lookup" | set .Values.conf.airflow.webserver "base_url" | quote | trunc 0 -}}
{{- end -}}
{{- if empty .Values.conf.airflow.cli.endpoint_url -}}
{{- tuple "airflow_web" "internal" "airflow_web" . | include "helm-toolkit.endpoints.keystone_endpoint_uri_lookup" | set .Values.conf.airflow.cli "endpoint_url" | quote | trunc 0 -}}
{{- end -}}
# Add endpoint URI lookup for Postgresql DB Connection
{{- if empty .Values.conf.airflow.core.sql_alchemy_conn -}}
{{- tuple "postgresql_airflow_db" "internal" "user" "postgresql" . | include "helm-toolkit.endpoints.authenticated_endpoint_uri_lookup" | set .Values.conf.airflow.core "sql_alchemy_conn" | quote | trunc 0 -}}
{{- end -}}
{{- if empty .Values.conf.airflow.celery.result_backend -}}
{{- tuple "postgresql_airflow_celery_db" "internal" "user" "postgresql" . | include "helm-toolkit.endpoints.authenticated_endpoint_uri_lookup" | set .Values.conf.airflow.celery "result_backend" | quote | trunc 0 -}}
{{- end -}}
# Add endpoint URI lookup for RabbitMQ Connection
{{- if empty .Values.conf.airflow.celery.broker_url -}}
{{- tuple "oslo_messaging" "internal" "user" "amqp" . | include "shipyard.endpoints.authenticated_transport_endpoint_uri_lookup" | set .Values.conf.airflow.celery "broker_url" | quote | trunc 0 -}}
{{- end -}}
---
apiVersion: v1
kind: ConfigMap
metadata:
name: airflow-etc
data:
airflow.cfg: |+
{{ include "helm-toolkit.utils.to_oslo_conf" .Values.conf.airflow | indent 4 }}