helm: make image name configurable, make postgres and redis charts optional

This commit is contained in:
Jens Langhammer 2020-08-25 18:02:51 +02:00
parent a732beb72b
commit 7d321e8aa8
6 changed files with 65 additions and 43 deletions

View File

@ -5,12 +5,13 @@ For a mid to high-load installation, Kubernetes is recommended. passbook is inst
This installation automatically applies database migrations on startup. After the installation is done, you can use `pbadmin` as username and password.
```
# Default values for passbook.
# This is a YAML-formatted file.
# Declare variables to be passed into your templates.
# passbook version to use. Defaults to latest stable version
# image:
# tag:
###################################
# Values directly affecting passbook
###################################
image:
name: beryju/passbook
name_static: beryju/passbook-static
tag: 0.9.0-stable
nameOverride: ""
@ -20,6 +21,7 @@ config:
# Enable error reporting
error_reporting:
enabled: false
environment: customer
send_pii: false
# Log level used by web and worker
# Can be either debug, info, warning, error
@ -32,19 +34,15 @@ config:
# bucket: s3-bucket
# host: s3-host
ingress:
annotations: {}
# kubernetes.io/ingress.class: nginx
# kubernetes.io/tls-acme: "true"
path: /
hosts:
- passbook.k8s.local
tls: []
# - secretName: chart-example-tls
# hosts:
# - passbook.k8s.local
###################################
# Values controlling dependencies
###################################
# These settings configure the packaged PostgreSQL and Redis chart.
install:
postgresql: true
redis: true
# These values influence the bundled postgresql and redis charts, but are also used by passbook to connect
postgresql:
postgresqlDatabase: passbook
@ -56,4 +54,16 @@ redis:
enabled: false
# https://stackoverflow.com/a/59189742
disableCommands: []
ingress:
annotations: {}
# kubernetes.io/ingress.class: nginx
# kubernetes.io/tls-acme: "true"
path: /
hosts:
- passbook.k8s.local
tls: []
# - secretName: chart-example-tls
# hosts:
# - passbook.k8s.local
```

View File

@ -8,6 +8,8 @@ dependencies:
- name: postgresql
version: 9.3.2
repository: https://charts.bitnami.com/bitnami
condition: install.postgresql
- name: redis
version: 10.7.16
repository: https://charts.bitnami.com/bitnami
condition: install.redis

View File

@ -23,7 +23,7 @@ spec:
spec:
containers:
- name: {{ .Chart.Name }}-static
image: "beryju/passbook-static:{{ .Values.image.tag }}"
image: "{{ .Values.image.name_static }}:{{ .Values.image.tag }}"
imagePullPolicy: IfNotPresent
ports:
- name: http

View File

@ -24,7 +24,7 @@ spec:
spec:
initContainers:
- name: passbook-database-migrations
image: "beryju/passbook:{{ .Values.image.tag }}"
image: "{{ .Values.image.name }}:{{ .Values.image.tag }}"
imagePullPolicy: Always
args:
- ./manage.py
@ -51,7 +51,7 @@ spec:
key: postgresql-password
containers:
- name: {{ .Chart.Name }}
image: "beryju/passbook:{{ .Values.image.tag }}"
image: "{{ .Values.image.name }}:{{ .Values.image.tag }}"
imagePullPolicy: Always
args:
- uwsgi

View File

@ -24,7 +24,7 @@ spec:
spec:
containers:
- name: {{ .Chart.Name }}
image: "beryju/passbook:{{ .Values.image.tag }}"
image: "{{ .Values.image.name }}:{{ .Values.image.tag }}"
imagePullPolicy: IfNotPresent
args:
- celery

View File

@ -1,7 +1,9 @@
# Default values for passbook.
# This is a YAML-formatted file.
# Declare variables to be passed into your templates.
###################################
# Values directly affecting passbook
###################################
image:
name: beryju/passbook
name_static: beryju/passbook-static
tag: 0.9.0-stable
nameOverride: ""
@ -25,19 +27,15 @@ config:
# bucket: s3-bucket
# host: s3-host
ingress:
annotations: {}
# kubernetes.io/ingress.class: nginx
# kubernetes.io/tls-acme: "true"
path: /
hosts:
- passbook.k8s.local
tls: []
# - secretName: chart-example-tls
# hosts:
# - passbook.k8s.local
###################################
# Values controlling dependencies
###################################
# These settings configure the packaged PostgreSQL and Redis chart.
install:
postgresql: true
redis: true
# These values influence the bundled postgresql and redis charts, but are also used by passbook to connect
postgresql:
postgresqlDatabase: passbook
@ -49,3 +47,15 @@ redis:
enabled: false
# https://stackoverflow.com/a/59189742
disableCommands: []
ingress:
annotations: {}
# kubernetes.io/ingress.class: nginx
# kubernetes.io/tls-acme: "true"
path: /
hosts:
- passbook.k8s.local
tls: []
# - secretName: chart-example-tls
# hosts:
# - passbook.k8s.local