diff --git a/helm/passbook/Chart.lock b/helm/passbook/Chart.lock new file mode 100644 index 000000000..6572582d1 --- /dev/null +++ b/helm/passbook/Chart.lock @@ -0,0 +1,9 @@ +dependencies: +- name: postgresql + repository: https://kubernetes-charts.storage.googleapis.com/ + version: 6.3.10 +- name: redis + repository: https://kubernetes-charts.storage.googleapis.com/ + version: 9.2.1 +digest: sha256:bdde250e1401dccdd5161e39c807f9e88b05e3e8e72e74df767a1bbb5fc39a4a +generated: "2019-10-01T10:46:06.542706+02:00" diff --git a/helm/passbook/app-readme.md b/helm/passbook/app-readme.md deleted file mode 100644 index 0f0092e27..000000000 --- a/helm/passbook/app-readme.md +++ /dev/null @@ -1 +0,0 @@ -# passbook diff --git a/helm/passbook/charts/postgresql-3.10.1.tgz b/helm/passbook/charts/postgresql-3.10.1.tgz deleted file mode 100644 index 04e30b263..000000000 Binary files a/helm/passbook/charts/postgresql-3.10.1.tgz and /dev/null differ diff --git a/helm/passbook/charts/postgresql-6.3.10.tgz b/helm/passbook/charts/postgresql-6.3.10.tgz new file mode 100644 index 000000000..af1e207a6 Binary files /dev/null and b/helm/passbook/charts/postgresql-6.3.10.tgz differ diff --git a/helm/passbook/charts/rabbitmq-4.3.2.tgz b/helm/passbook/charts/rabbitmq-4.3.2.tgz deleted file mode 100644 index c41057755..000000000 Binary files a/helm/passbook/charts/rabbitmq-4.3.2.tgz and /dev/null differ diff --git a/helm/passbook/charts/redis-5.1.0.tgz b/helm/passbook/charts/redis-5.1.0.tgz deleted file mode 100644 index 71237425a..000000000 Binary files a/helm/passbook/charts/redis-5.1.0.tgz and /dev/null differ diff --git a/helm/passbook/charts/redis-9.2.1.tgz b/helm/passbook/charts/redis-9.2.1.tgz new file mode 100644 index 000000000..2bc25540e Binary files /dev/null and b/helm/passbook/charts/redis-9.2.1.tgz differ diff --git a/helm/passbook/questions.yml b/helm/passbook/questions.yml deleted file mode 100644 index 834f63095..000000000 --- a/helm/passbook/questions.yml +++ /dev/null @@ -1,98 +0,0 @@ ---- -categories: - - Authentication - - SSO -questions: - - default: "true" - variable: config.error_reporting - type: boolean - description: "Enable error-reporting to sentry.services.beryju.org" - group: "passbook Configuration" - label: "Error Reporting" - #################################################################### - ### PostgreSQL - #################################################################### - - variable: postgresql.enabled - default: true - description: "Deploy a database server as part of this deployment, or set to false and configure an external database connection." - type: boolean - required: true - label: Install PostgreSQL - show_subquestion_if: true - group: "Database Settings" - subquestions: - - variable: postgresql.postgresqlDatabase - default: "passbook" - description: "Database name to create" - type: string - label: PostgreSQL Database - - variable: postgresql.postgresqlUsername - default: "passbook" - description: "Database user to create" - type: string - label: PostgreSQL User - - variable: postgresql.postgresqlPassword - default: "" - description: "password will be auto-generated if not specified" - type: password - label: PostgreSQL Password - - variable: externalDatabase.host - default: "" - description: "Host of the external database" - type: string - label: External Database Host - show_if: "postgresql.enabled=false" - group: "Database Settings" - - variable: externalDatabase.user - default: "" - description: "Existing username in the external DB" - type: string - label: External Database username - show_if: "postgresql.enabled=false" - group: "Database Settings" - - variable: externalDatabase.password - default: "" - description: "External database password" - type: password - label: External Database password - show_if: "postgresql.enabled=false" - group: "Database Settings" - - variable: externalDatabase.database - default: "" - description: "Name of the existing database" - type: string - label: External Database - show_if: "postgresql.enabled=false" - group: "Database Settings" - - variable: externalDatabase.port - default: "3306" - description: "External database port number" - type: string - label: External Database Port - show_if: "postgresql.enabled=false" - group: "Database Settings" - - variable: postgresql.persistence.enabled - default: false - description: "Enable persistent volume for PostgreSQL" - type: boolean - required: true - label: PostgreSQL Persistent Volume Enabled - show_if: "postgresql.enabled=true" - show_subquestion_if: true - group: "Database Settings" - subquestions: - - variable: postgresql.master.persistence.size - default: "8Gi" - description: "PostgreSQL Persistent Volume Size" - type: string - label: PostgreSQL Volume Size - - variable: postgresql.master.persistence.storageClass - default: "" - description: "If undefined or null, uses the default StorageClass. Default to null" - type: storageclass - label: Default StorageClass for PostgreSQL - - variable: postgresql.master.persistence.existingClaim - default: "" - description: "If not empty, uses the specified existing PVC instead of creating new one" - type: string - label: Existing Persistent Volume Claim for PostgreSQL diff --git a/helm/passbook/requirements.yaml b/helm/passbook/requirements.yaml index 0f2e1f356..23363fb9d 100644 --- a/helm/passbook/requirements.yaml +++ b/helm/passbook/requirements.yaml @@ -1,10 +1,7 @@ dependencies: -- name: rabbitmq - version: 4.3.2 - repository: https://kubernetes-charts.storage.googleapis.com/ - name: postgresql - version: 3.10.1 + version: 6.3.10 repository: https://kubernetes-charts.storage.googleapis.com/ - name: redis - version: 5.1.0 + version: 9.2.1 repository: https://kubernetes-charts.storage.googleapis.com/ diff --git a/helm/passbook/templates/configmap.yaml b/helm/passbook/templates/configmap.yaml index 5f36a9efd..b3ccc011f 100644 --- a/helm/passbook/templates/configmap.yaml +++ b/helm/passbook/templates/configmap.yaml @@ -4,41 +4,18 @@ metadata: name: {{ include "passbook.fullname" . }}-config data: config.yml: | - # Env for Docker images - databases: - default: - engine: django.db.backends.postgresql - name: {{ .Values.postgresql.postgresqlDatabase }} - user: postgres - password: {{ .Values.postgresql.postgresqlPassword }} - host: {{ .Release.Name }}-postgresql - port: '' - log: - level: - console: WARNING - file: WARNING - file: /dev/null - syslog: - host: 127.0.0.1 - port: 514 - email: - host: {{ .Values.config.email.host }} - port: 25 - user: '' - password: '' - use_tls: false - use_ssl: false - from: passbook - web: - listen: 0.0.0.0 - port: 8000 - threads: 30 - debug: false - secure_proxy_header: - HTTP_X_FORWARDED_PROTO: https - rabbitmq: "user:{{ .Values.rabbitmq.rabbitmq.password }}@{{ .Release.Name }}-rabbitmq" - redis: ":{{ .Values.redis.password }}@{{ .Release.Name }}-redis-master/0" - # Error reporting, sends stacktrace to sentry.services.beryju.org + postgresql: + host: "{{ .Release.Name }}-postgresql" + name: "{{ .Values.postgresql.postgresqlDatabase }}" + user: postgres + password: "{{ .Values.postgresql.postgresqlPassword }}" + redis: + host: "{{ .Release.Name }}-redis-master" + password: "{{ .Values.redis.password }}" + cache_db: 0 + message_queue_db: 1 + + # Error reporting, sends stacktrace to sentry.beryju.org error_report_enabled: {{ .Values.config.error_reporting }} {{- if .Values.config.secret_key }} @@ -49,10 +26,10 @@ data: primary_domain: {{ .Values.primary_domain }} domains: - {{- range .Values.ingress.hosts }} - - {{ . | quote }} - {{- end }} - - kubernetes-healthcheck-host + {{- range .Values.ingress.hosts }} + - {{ . | quote }} + {{- end }} + - kubernetes-healthcheck-host passbook: sign_up: diff --git a/passbook/lib/config.py b/passbook/lib/config.py index 8edffaab8..fb4a3a7b7 100644 --- a/passbook/lib/config.py +++ b/passbook/lib/config.py @@ -1,6 +1,6 @@ """passbook core config loader""" import os -from collections import Mapping +from collections.abc import Mapping from contextlib import contextmanager from glob import glob from typing import Any diff --git a/passbook/lib/default.yml b/passbook/lib/default.yml index 47dcd09eb..30e2cf0c8 100644 --- a/passbook/lib/default.yml +++ b/passbook/lib/default.yml @@ -17,7 +17,7 @@ debug: false error_report_enabled: true domains: - - passbook.local + - passbook.local primary_domain: 'localhost' passbook: