From dabb3878232da19c476e1680809af24143cf7d5c Mon Sep 17 00:00:00 2001 From: Oscar Beaumont Date: Mon, 2 Aug 2021 15:01:55 +0800 Subject: [PATCH] fix: converted Plausible config to secret This was done as the Plausible configuration file contains the secret key base which is used to encrypt the cookies. --- kubernetes/README.md | 2 +- kubernetes/plausible.yaml | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/kubernetes/README.md b/kubernetes/README.md index 8af4ffc..a1844f9 100644 --- a/kubernetes/README.md +++ b/kubernetes/README.md @@ -21,7 +21,7 @@ Once you've entered your secret key base, base url and admin credentials, you're ```bash kubectl create namespace plausible # Create a new namespace for all resources -kubectl -n plausible create configmap plausible-config --from-env-file=plausible-conf.env # Create a configmap from the plausible-conf.env file +kubectl -n plausible create secret generic plausible-config --from-env-file=plausible-conf.env # Create a configmap from the plausible-conf.env file # Please change the Postgres and Clickhouse passwords to something more secure here! kubectl -n plausible create secret generic plausible-db-user --from-literal='username=postgres' --from-literal='password=postgres' # Create the Postgres user kubectl -n plausible create secret generic plausible-events-db-user --from-literal='username=clickhouse' --from-literal='password=clickhouse' # Create the Clickhouse user diff --git a/kubernetes/plausible.yaml b/kubernetes/plausible.yaml index 952cb6d..ee64722 100644 --- a/kubernetes/plausible.yaml +++ b/kubernetes/plausible.yaml @@ -50,7 +50,7 @@ spec: args: - sleep 30 && /entrypoint.sh db createdb && /entrypoint.sh db migrate && /entrypoint.sh db init-admin envFrom: - - configMapRef: + - secretRef: name: plausible-config env: - name: POSTGRES_USER @@ -95,7 +95,7 @@ spec: ports: - containerPort: 8000 envFrom: - - configMapRef: + - secretRef: name: plausible-config env: - name: POSTGRES_USER