From 59c6b0f29b2a38809d55f77a85ddc14ef91c35b3 Mon Sep 17 00:00:00 2001 From: Alexander Olofsson Date: Tue, 5 Jul 2022 14:42:38 +0200 Subject: [PATCH] synatainer: Fix chart lint issues --- charts/synatainer/templates/config.yaml | 8 +------- charts/synatainer/templates/secret.yaml | 4 ++-- charts/synatainer/values.yaml | 10 +++++----- 3 files changed, 8 insertions(+), 14 deletions(-) diff --git a/charts/synatainer/templates/config.yaml b/charts/synatainer/templates/config.yaml index 4e756bd..c0d46b9 100644 --- a/charts/synatainer/templates/config.yaml +++ b/charts/synatainer/templates/config.yaml @@ -1,9 +1,3 @@ -{{- if (not (and .Values.postgresql.host .Values.postgresql.password)) -}} -{{ fail "You need to specify postgres connection details" }} -{{- end -}} -{{- if (not (and .Values.synapse.token)) -}} -{{ fail "You need to specify synapse connection details" }} -{{- end -}} --- apiVersion: v1 kind: ConfigMap @@ -12,7 +6,7 @@ metadata: labels: {{- include "synatainer.labels" . | nindent 4 }} data: - DB_HOST: {{ .Values.postgresql.host | quote }} + DB_HOST: {{ required "You need to specify a postgres host" .Values.postgresql.host | quote }} DB_NAME: {{ .Values.postgresql.database | default "synapse" | quote }} DB_USER: {{ .Values.postgresql.username | default "synapse" | quote }} SYNAPSE_HOST: {{ .Values.synapse.url | default "http://matrix-synapse:8008" | quote }} diff --git a/charts/synatainer/templates/secret.yaml b/charts/synatainer/templates/secret.yaml index 99bd7b8..e56ddc0 100644 --- a/charts/synatainer/templates/secret.yaml +++ b/charts/synatainer/templates/secret.yaml @@ -6,8 +6,8 @@ metadata: labels: {{- include "synatainer.labels" . | nindent 4 }} data: - PGPASSWORD: {{ .Values.postgresql.password | toString | b64enc }} - BEARER_TOKEN: {{ .Values.synapse.token | toString | b64enc }} + PGPASSWORD: {{ required "You need to specify a postgres password" .Values.postgresql.password | toString | b64enc }} + BEARER_TOKEN: {{ required "You need to specify a synapse token" .Values.synapse.token | toString | b64enc }} {{- range $key, $val := .Values.extraSecrets }} {{ $key }}: {{ $val | toString | b64enc }} diff --git a/charts/synatainer/values.yaml b/charts/synatainer/values.yaml index 08ad19c..1f6ac41 100644 --- a/charts/synatainer/values.yaml +++ b/charts/synatainer/values.yaml @@ -4,20 +4,20 @@ image: repository: registry.gitlab.com/mb-saces/synatainer pullPolicy: IfNotPresent ## Overrides the image tag, for running a different version than the charts. - # tag: latest + # tag: ## Connection details for the Synapse database postgresql: host: - database: - username: + # database: synapse + # username: synapse password: ## Connection details for the Synapse instance synapse: ## The URL to the Synapse instance, can either be a cluster-internal or external URL - ## E.g. http://matrix-synapse.matrix.svc:8008 or https://matrix.example.com - url: + ## E.g. http://matrix-synapse.other-matrix-namespace.svc:8008 or https://matrix.example.com + # url: http://matrix-synapse:8008 token: ## Extra environment variables for configuring synatainer