Add redisHost variable, clear up postgresHost mysteries (#11336)

* Add redisHost variable, clear up postgresHost mysteries

 * Removed postgresql.uri field that doesn't do anything
 * Clarified docs in a few places about the right place to configure
   postgresql
 * Added redisHost that works in the same way as postgresHost
 * Removed unnecessary extra printf's.

Signed-off-by: Ken Wronkiewicz <kwronkiewicz@salesforce.com>

* Version bump.

Signed-off-by: Ken Wronkiewicz <kwronkiewicz@salesforce.com>

* Fix lint.

Signed-off-by: Ken Wronkiewicz <kwronkiewicz@salesforce.com>
This commit is contained in:
Ken Wronkiewicz
2019-02-11 12:48:56 -08:00
committed by Kubernetes Prow Robot
parent a5d1dff5b5
commit eef006ab1b
4 changed files with 16 additions and 10 deletions
+1 -1
View File
@@ -1,6 +1,6 @@
description: Airflow is a platform to programmatically author, schedule and monitor workflows
name: airflow
version: 0.16.0
version: 0.17.0
appVersion: 1.10.0
icon: https://airflow.apache.org/_images/pin_large.png
home: https://airflow.apache.org/
+1
View File
@@ -327,6 +327,7 @@ The following table lists the configurable parameters of the Airflow chart and t
| `postgresql.persistance.storageClass` | Persistant class | (undefined) |
| `postgresql.persistance.accessMode` | Access mode | `ReadWriteOnce` |
| `redis.enabled` | Create a Redis cluster | `true` |
| `redis.redisHost` | Redis Hostname | (undefined) |
| `redis.password` | Redis password | `airflow` |
| `redis.master.persistence.enabled` | Enable Redis PVC | `false` |
| `redis.cluster.enabled` | enable master-slave cluster | `false` |
+8 -4
View File
@@ -38,7 +38,7 @@ We truncate at 63 chars because some Kubernetes name fields are limited to this
*/}}
{{- define "airflow.postgresql.fullname" -}}
{{- if .Values.postgresql.postgresHost }}
{{- printf "%s" .Values.postgresql.postgresHost -}}
{{- .Values.postgresql.postgresHost -}}
{{- else }}
{{- $name := default "postgresql" .Values.postgresql.nameOverride -}}
{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" -}}
@@ -46,12 +46,16 @@ We truncate at 63 chars because some Kubernetes name fields are limited to this
{{- end -}}
{{/*
Create a default fully qualified redis cluster name.
Create a default fully qualified redis cluster name or use the `redisHost` value if defined
We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec).
*/}}
{{- define "airflow.redis.fullname" -}}
{{- $name := default "redis" .Values.redis.nameOverride -}}
{{- printf "%s-%s-master" .Release.Name $name | trunc 63 | trimSuffix "-" -}}
{{- if .Values.redis.redisHost }}
{{- .Values.redis.redisHost -}}
{{- else }}
{{- $name := default "redis" .Values.redis.nameOverride -}}
{{- printf "%s-%s-master" .Release.Name $name | trunc 63 | trimSuffix "-" -}}
{{- end -}}
{{- end -}}
{{/*
+6 -5
View File
@@ -379,11 +379,8 @@ postgresql:
## Set to false if bringing your own PostgreSQL.
enabled: true
##
## If bringing your own PostgreSQL, the full uri to use
## e.g. postgres://airflow:changeme@my-postgres.com:5432/airflow?sslmode=disable
# uri:
##
## PostgreSQL hostname
## If you are bringing your own PostgreSQL, you should set postgresHost and
## also probably service.port, postgresUser, postgresPassword, and postgresDatabase
## postgresHost:
##
## PostgreSQL port
@@ -421,7 +418,11 @@ redis:
## Set to false if bringing your own redis.
enabled: true
##
## If you are bringing your own redis, you can set the host in redisHost.
## redisHost:
##
## Redis password
##
password: airflow
##
## Master configuration