[stable/airflow] fix: postgres to postgresql for all variables (#21748)

* fix: postgres to postgresql for all variables

* fix: postgres to postgresql for all variables

* refactor: use recommended default function

Signed-off-by: carlosescura <carlosescura@gmail.com>

* Bump Airflow chart version

Signed-off-by: carlosescura <carlosescura@gmail.com>

* Revert README.md modification

Signed-off-by: carlosescura <carlosescura@gmail.com>

* fix: Add new Postgresql variables to readme

Signed-off-by: carlosescura <carlosescura@gmail.com>
This commit is contained in:
Carlos Escura
2020-04-22 09:27:53 -07:00
committed by GitHub
parent 9de5d743ff
commit 93fd17bffd
4 changed files with 17 additions and 16 deletions
+1 -1
View File
@@ -1,7 +1,7 @@
apiVersion: v1
description: Airflow is a platform to programmatically author, schedule and monitor workflows
name: airflow
version: 6.7.0
version: 6.7.1
appVersion: 1.10.4
icon: https://airflow.apache.org/_images/pin_large.png
home: https://airflow.apache.org/
+4 -3
View File
@@ -244,7 +244,7 @@ By default, insecure username/password combinations are used.
For a real production deployment, it's a good idea to create secure credentials before installing the Helm chart.
For example, from the command line, run:
```bash
kubectl create secret generic airflow-postgres --from-literal=postgresql-password=$(openssl rand -base64 13)
kubectl create secret generic airflow-postgresql --from-literal=postgresql-password=$(openssl rand -base64 13)
kubectl create secret generic airflow-redis --from-literal=redis-password=$(openssl rand -base64 13)
```
Next, you can use those secrets with the Helm chart:
@@ -252,7 +252,7 @@ Next, you can use those secrets with the Helm chart:
# values.yaml
postgresql:
existingSecret: airflow-postgres
existingSecret: airflow-postgresql
redis:
existingSecret: airflow-redis
@@ -557,7 +557,7 @@ The following table lists the configurable parameters of the Airflow chart and t
| `postgresql.existingSecret` | The name of an existing secret with a key named `postgresql.existingSecretKey` to use as the password | `nil` |
| `postgresql.existingSecretKey` | The name of the key containing the password in the secret named `postgresql.existingSecret` | `postgresql-password` |
| `postgresql.uri` | full URL to custom postgres setup | (undefined) |
| `postgresql.postgresHost` | PostgreSQL Hostname | (undefined) |
| `postgresql.postgresqlHost` | PostgreSQL Hostname | (undefined) |
| `postgresql.postgresqlUsername` | PostgreSQL User | `postgres` |
| `postgresql.postgresqlPassword` | PostgreSQL Password | `airflow` |
| `postgresql.postgresqlDatabase` | PostgreSQL Database name | `airflow` |
@@ -592,6 +592,7 @@ There are a few config key changes, in order to upgrade from a 5.x chart, modify
| 5.x.x | 6.x.x | Notes |
|--------------------------------------|---------------------------------------|-----------------------------------------------------------|
|`postgresql.postgresHost` |`postgresql.postgresqlHost` | |
|`postgresql.postgresUser` |`postgresql.postgresqlUsername` | |
|`postgresql.postgresPassword` |`postgresql.postgresqlPassword` | |
|`postgresql.postgresDatabase` |`postgresql.postgresqlDatabase` | |
+10 -10
View File
@@ -3,7 +3,7 @@
Expand the name of the chart.
*/}}
{{- define "airflow.name" -}}
{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" -}}
{{- .Values.nameOverride | default .Chart.Name | trunc 63 | trimSuffix "-" -}}
{{- end -}}
{{/*
@@ -26,21 +26,21 @@ Create the name of the service account to use
*/}}
{{- define "airflow.serviceAccountName" -}}
{{- if .Values.serviceAccount.create -}}
{{ default (include "airflow.fullname" .) .Values.serviceAccount.name }}
{{ .Values.serviceAccount.name | default (include "airflow.fullname" .) }}
{{- else -}}
{{ default "default" .Values.serviceAccount.name }}
{{ .Values.serviceAccount.name | default "default" }}
{{- end -}}
{{- end -}}
{{/*
Create a default fully qualified postgresql name or use the `postgresHost` value if defined.
Create a default fully qualified postgresql name or use the `postgresqlHost` value if defined.
We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec).
*/}}
{{- define "airflow.postgresql.fullname" -}}
{{- if .Values.postgresql.postgresHost }}
{{- .Values.postgresql.postgresHost -}}
{{- if .Values.postgresql.postgresqlHost }}
{{- .Values.postgresql.postgresqlHost -}}
{{- else }}
{{- $name := default "postgresql" .Values.postgresql.nameOverride -}}
{{- $name := .Values.postgresql.nameOverride | default "postgresql" -}}
{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" -}}
{{- end -}}
{{- end -}}
@@ -98,19 +98,19 @@ The key names for postgres and redis are fixed, which is consistent with the sub
*/}}
{{- define "airflow.mapenvsecrets" }}
- name: POSTGRES_USER
value: {{ default "postgres" .Values.postgresql.postgresUser | quote }}
value: {{ .Values.postgresql.postgresqlUsername | default "postgres" | quote }}
{{- if or .Values.postgresql.existingSecret .Values.postgresql.enabled }}
- name: POSTGRES_PASSWORD
valueFrom:
secretKeyRef:
name: {{ default (include "airflow.postgresql.fullname" .) .Values.postgresql.existingSecret }}
name: {{ .Values.postgresql.existingSecret | default (include "airflow.postgresql.fullname" .) }}
key: {{ .Values.postgresql.existingSecretKey }}
{{- end }}
{{- if or .Values.redis.existingSecret .Values.redis.enabled }}
- name: REDIS_PASSWORD
valueFrom:
secretKeyRef:
name: {{ default (include "airflow.redis.fullname" .) .Values.redis.existingSecret }}
name: {{ .Values.redis.existingSecret | default (include "airflow.redis.fullname" .) }}
key: {{ .Values.redis.existingSecretKey }}
{{- end }}
{{- if .Values.airflow.extraEnv }}
+2 -2
View File
@@ -650,9 +650,9 @@ postgresql:
existingSecretKey: postgresql-password
##
## If you are bringing your own PostgreSQL, you should set postgresHost and
## If you are bringing your own PostgreSQL, you should set postgresqlHost and
## also probably service.port, postgresqlUsername, postgresqlPassword, and postgresqlDatabase
## postgresHost:
## postgresqlHost:
##
## PostgreSQL port
service: