mirror of
https://github.com/bitnami/charts.git
synced 2026-03-16 06:47:30 +08:00
[bitnami/airflow] Support nameOverride and fullnameOverride for internal Redis® (#30081)
* fix: redis name override should work correctly
Signed-off-by: Lucas Rakotomalala <lucas.rakotomalala@yahoo.fr>
* chore: update `README.md`
Signed-off-by: Lucas Rakotomalala <lucas.rakotomalala@yahoo.fr>
* chore: update `README.md`
Signed-off-by: Lucas Rakotomalala <lucas.rakotomalala@yahoo.fr>
* Update CHANGELOG.md
Signed-off-by: Bitnami Containers <bitnami-bot@vmware.com>
Signed-off-by: Lucas Rakotomalala <lucas.rakotomalala@yahoo.fr>
* Update README.md with readme-generator-for-helm
Signed-off-by: Bitnami Containers <bitnami-bot@vmware.com>
Signed-off-by: Lucas Rakotomalala <lucas.rakotomalala@yahoo.fr>
* chore: update
Signed-off-by: Lucas Rakotomalala <lucas.rakotomalala@yahoo.fr>
* Update README.md with readme-generator-for-helm
Signed-off-by: Bitnami Containers <bitnami-bot@vmware.com>
* Update CHANGELOG.md
Signed-off-by: Bitnami Containers <bitnami-bot@vmware.com>
* Update _helpers.tpl and deployment.yaml templates
- Update _helpers.tpl to use the tpl function for externalRedis.host
- Update _helpers.tpl to conditionally use the tpl function for database.host based on postgresql.architecture
- Update deployment.yaml to use the tpl function for database.host in AIRFLOW_PROMETHEUS_DATABASE_HOST
Signed-off-by: Lucas Rakotomalala <lucas.rakotomalala@yahoo.fr>
* Update database host configuration in templates
Signed-off-by: Lucas Rakotomalala <lucas.rakotomalala@yahoo.fr>
* Update CHANGELOG.md
Signed-off-by: Bitnami Containers <bitnami-bot@vmware.com>
* Update bitnami/airflow/values.yaml
Co-authored-by: Fran Mulero <francisco-jose.mulero@broadcom.com>
Signed-off-by: Lucas <45755076+LucasRakotomalala@users.noreply.github.com>
* Revert bitnami/airflow/Chart.lock
revert partially ff117ef
Signed-off-by: Lucas Rakotomalala <lucas.rakotomalala@yahoo.fr>
* Update CHANGELOG.md
Signed-off-by: Bitnami Containers <bitnami-bot@vmware.com>
---------
Signed-off-by: Lucas Rakotomalala <lucas.rakotomalala@yahoo.fr>
Signed-off-by: Bitnami Containers <bitnami-bot@vmware.com>
Signed-off-by: Lucas <45755076+LucasRakotomalala@users.noreply.github.com>
Co-authored-by: Bitnami Containers <bitnami-bot@vmware.com>
Co-authored-by: Fran Mulero <francisco-jose.mulero@broadcom.com>
This commit is contained in:
@@ -121,12 +121,34 @@ We truncate at 63 chars because some Kubernetes name fields are limited to this
|
||||
{{- include "common.names.dependency.fullname" (dict "chartName" "postgresql" "chartValues" .Values.postgresql "context" $) -}}
|
||||
{{- end -}}
|
||||
|
||||
{{/*
|
||||
Get the Redis® fullname
|
||||
*/}}
|
||||
{{- define "airflow.redis.fullname" -}}
|
||||
{{- include "common.names.dependency.fullname" (dict "chartName" "redis" "chartValues" .Values.redis "context" $) -}}
|
||||
{{- end -}}
|
||||
|
||||
{{/*
|
||||
Create a default fully qualified redis name.
|
||||
We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec).
|
||||
*/}}
|
||||
{{- define "airflow.redis.fullname" -}}
|
||||
{{- include "common.names.dependency.fullname" (dict "chartName" "redis-master" "chartValues" .Values.redis "context" $) -}}
|
||||
{{- define "airflow.redis.host" -}}
|
||||
{{- if .Values.redis.enabled -}}
|
||||
{{- printf "%s-master" (include "airflow.redis.fullname" .) -}}
|
||||
{{- else -}}
|
||||
{{- printf "%s" (tpl .Values.externalRedis.host $) -}}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
|
||||
{{/*
|
||||
Get the Redis® port
|
||||
*/}}
|
||||
{{- define "airflow.redis.port" -}}
|
||||
{{- if .Values.redis.enabled -}}
|
||||
{{- print .Values.redis.master.service.ports.redis -}}
|
||||
{{- else -}}
|
||||
{{- print .Values.externalRedis.port -}}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
|
||||
{{/*
|
||||
@@ -245,7 +267,11 @@ Create the name of the service account to use
|
||||
Add environment variables to configure database values
|
||||
*/}}
|
||||
{{- define "airflow.database.host" -}}
|
||||
{{- ternary (include "airflow.postgresql.fullname" .) .Values.externalDatabase.host .Values.postgresql.enabled | quote -}}
|
||||
{{- if eq .Values.postgresql.architecture "replication" }}
|
||||
{{- (ternary (include "airflow.postgresql.fullname" .) (tpl .Values.externalDatabase.host $) .Values.postgresql.enabled | printf "%s-primary") | quote -}}
|
||||
{{- else -}}
|
||||
{{- ternary (include "airflow.postgresql.fullname" .) (tpl .Values.externalDatabase.host $) .Values.postgresql.enabled | quote -}}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
|
||||
{{/*
|
||||
@@ -361,9 +387,9 @@ Add environment variables to configure redis values
|
||||
{{- define "airflow.configure.redis" -}}
|
||||
{{- if (not (or (eq .Values.executor "KubernetesExecutor" ) (eq .Values.executor "LocalKubernetesExecutor" ))) }}
|
||||
- name: REDIS_HOST
|
||||
value: {{ ternary (include "airflow.redis.fullname" .) .Values.externalRedis.host .Values.redis.enabled | quote }}
|
||||
value: {{ include "airflow.redis.host" . | quote }}
|
||||
- name: REDIS_PORT_NUMBER
|
||||
value: {{ ternary "6379" .Values.externalRedis.port .Values.redis.enabled | quote }}
|
||||
value: {{ include "airflow.redis.port" . | quote }}
|
||||
{{- if and (not .Values.redis.enabled) .Values.externalRedis.username }}
|
||||
- name: REDIS_USER
|
||||
value: {{ .Values.externalRedis.username | quote }}
|
||||
|
||||
Reference in New Issue
Block a user