timescale / helm-charts

Configuration and Documentation to run TimescaleDB in your Kubernetes cluster
Apache License 2.0
264 stars 223 forks source link

Fixed yaml parse when additional credentials are provided for patroni #350

Closed joschiwald closed 2 years ago

joschiwald commented 2 years ago

Fixes #323

When providing additional credentials for patroni invalid yaml will be generation during helm template processing.

values.yaml

secrets:
  credentials:
    PATRONI_test_PASSWORD: "test"
    PATRONI_test2_PASSWORD: "test2"

secret-patroni without fix:

apiVersion: v1
kind: Secret
metadata:
  name: "RELEASE-NAME-credentials"
  labels:
    app: RELEASE-NAME-timescaledb
    cluster-name: RELEASE-NAME
type: Opaque
stringData:
  PATRONI_SUPERUSER_PASSWORD: "Rlmv6dfg51cIPepM"
  PATRONI_REPLICATION_PASSWORD: "8PeHhYkViGbJmysg"
  PATRONI_admin_PASSWORD: "B6oaJhGNYp4mDTBA"  PATRONI_test2_PASSWORD: test2  PATRONI_test_PASSWORD: test

secret-patroni with fix:

apiVersion: v1
kind: Secret
metadata:
  name: "RELEASE-NAME-credentials"
  labels:
    app: RELEASE-NAME-timescaledb
    cluster-name: RELEASE-NAME
type: Opaque
stringData:
  PATRONI_SUPERUSER_PASSWORD: "RcuwuNFYRmRFzndC"
  PATRONI_REPLICATION_PASSWORD: "CoBPAeD3eaIIYEFd"
  PATRONI_admin_PASSWORD: "swXzbwl5xNeDKALh"
  PATRONI_test2_PASSWORD: test2
  PATRONI_test_PASSWORD: test