shipyard/charts/shipyard/templates/configmap-airflow-etc.yaml

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 "helm-toolkit.endpoints.authenticated_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 }}