From 2bf70c59241a96b9983ad91a76cf2b8c924457ad Mon Sep 17 00:00:00 2001 From: Jeremy Shimko Date: Thu, 26 Sep 2024 09:20:12 -0400 Subject: [PATCH] [stack-auth] postgrescluster chart dep rename --- charts/stack-auth/Chart.lock | 8 ++++---- charts/stack-auth/Chart.yaml | 10 +++++----- .../templates/backend/deployment.yaml | 14 +++++++------- charts/stack-auth/values.yaml | 18 +++++++++++------- 4 files changed, 27 insertions(+), 23 deletions(-) diff --git a/charts/stack-auth/Chart.lock b/charts/stack-auth/Chart.lock index 03f3690..dd90dff 100644 --- a/charts/stack-auth/Chart.lock +++ b/charts/stack-auth/Chart.lock @@ -1,9 +1,9 @@ dependencies: -- name: postgres +- name: postgrescluster repository: file://../postgrescluster - version: 5.6.0 + version: 5.6.1 - name: svix repository: https://jshimko.github.io/helm-charts version: 0.5.0 -digest: sha256:1124955d3659ed6af523885c38acd57699e75cd76caac686474b6c138a28663b -generated: "2024-09-25T17:41:22.792272-04:00" +digest: sha256:e343c854e588fa38795680b2bb1109336a71139e086b4426c8afafb3857264ba +generated: "2024-09-26T09:18:57.191565-04:00" diff --git a/charts/stack-auth/Chart.yaml b/charts/stack-auth/Chart.yaml index acd80c9..3ebdd5f 100644 --- a/charts/stack-auth/Chart.yaml +++ b/charts/stack-auth/Chart.yaml @@ -2,15 +2,15 @@ apiVersion: v2 name: stack-auth description: A Helm chart to deploy the Stack Auth platform. https://stack-auth.com type: application -version: 0.7.0 +version: 0.8.0 dependencies: # Postgres Operator - PostgresCluster - # https://access.crunchydata.com/documentation/postgres-operator/v5/ - - name: postgres - version: 5.6.0 + # https://access.crunchydata.com/documentation/postgres-operator/latest/ + - name: postgrescluster + version: 5.6.1 repository: file://../postgrescluster - condition: postgres.enabled + condition: postgrescluster.enabled # Svix webhooks # https://github.com/jshimko/helm-charts/tree/main/charts/svix diff --git a/charts/stack-auth/templates/backend/deployment.yaml b/charts/stack-auth/templates/backend/deployment.yaml index 22b2aee..6db83ff 100644 --- a/charts/stack-auth/templates/backend/deployment.yaml +++ b/charts/stack-auth/templates/backend/deployment.yaml @@ -49,14 +49,14 @@ spec: {{- end }} env: - {{- if or .Values.postgres.enabled .Values.backend.postgresSecret }} + {{- if or .Values.postgrescluster.enabled .Values.backend.postgresClusterSecret }} - name: PGO_PGBOUNCER_URI valueFrom: secretKeyRef: - {{- if .Values.backend.postgresSecret }} - name: "{{ .Values.backend.postgresSecret }}" + {{- if .Values.backend.postgresClusterSecret }} + name: "{{ .Values.backend.postgresClusterSecret }}" {{- else }} - name: "{{ .Values.postgres.name }}-pguser-stack" + name: "{{ .Values.postgrescluster.name }}-pguser-stack" {{- end }} key: "pgbouncer-uri" @@ -66,10 +66,10 @@ spec: - name: POSTGRES_DIRECT_URI valueFrom: secretKeyRef: - {{- if .Values.backend.postgresSecret }} - name: "{{ .Values.backend.postgresSecret }}" + {{- if .Values.backend.postgresClusterSecret }} + name: "{{ .Values.backend.postgresClusterSecret }}" {{- else }} - name: "{{ .Values.postgres.name }}-pguser-stack" + name: "{{ .Values.postgrescluster.name }}-pguser-stack" {{- end }} key: "uri" diff --git a/charts/stack-auth/values.yaml b/charts/stack-auth/values.yaml index 3a6e6df..7b69c46 100644 --- a/charts/stack-auth/values.yaml +++ b/charts/stack-auth/values.yaml @@ -146,11 +146,11 @@ backend: imagePullSecrets: [] - # -- optional Postgres Operator cluster secret name - postgresSecret: "" + # -- optional Postgres Operator cluster secret name. This is useful if you deploy a PostgresCluster instance outside of this chart. + postgresClusterSecret: "" + # Note that the schema option below must match the user name in the PostgresCluster users list or database permissions will be denied until manually granted. # -- PostgresCluster connection string options. e.g. schema=stack,connection_limit=10,connect_timeout=10,pool_timeout=10 - # Note that the schema option must match the user name in the PostgresCluster users list below or permissions will be denied. dbUrlOptions: "schema=stack&sslmode=require&application_name=stack-auth" # -- Backend environment variables - see available [.env](https://github.com/stack-auth/stack/blob/dev/apps/backend/.env) options @@ -291,14 +291,18 @@ extraTemplates: # https://github.com/CrunchyData/postgres-operator # # PostgresCluster Chart -# https://github.com/jshimko/helm-charts/tree/main/charts/postgres -postgres: +# https://github.com/jshimko/helm-charts/tree/main/charts/postgrescluster +postgrescluster: # -- disabled by default in case PostgresOperator is not installed in the cluster enabled: false # -- PostgresCluster name name: postgres-stack + # -- PostgresCluster annotations + annotations: {} + # postgres-operator.crunchydata.com/autoCreateUserSchema: "true" + # -- Postgres users to create and assign access to databases users: # -- db admin @@ -311,8 +315,8 @@ postgres: # -- Postgres instances instances: - - name: stack # - replicas: 2 + - name: stack + replicas: 1 # -- Postgres instance resources resources: {}