From 84503e592fb0726809d8ba6e7c99e9c27507ba76 Mon Sep 17 00:00:00 2001 From: Wayne Starr Date: Tue, 11 Jun 2024 21:54:36 -0600 Subject: [PATCH] feat: allow for Postgres password secret generation (#88) ## Description This allows for the Postgres password secret to be generated in the config chart directly ## Related Issue Fixes #86 ## Type of change - [ ] Bug fix (non-breaking change which fixes an issue) - [X] New feature (non-breaking change which adds functionality) - [ ] Other (security config, docs update, etc) ## Checklist before merging - [X] Test, docs, adr added or updated as needed - [X] [Contributor Guide Steps](https://github.com/defenseunicorns/uds-package-sonarqube/blob/main/CONTRIBUTING.md#developer-workflow) followed --- chart/templates/postgres-secret.yaml | 10 ++++++++++ chart/values.yaml | 2 ++ 2 files changed, 12 insertions(+) create mode 100644 chart/templates/postgres-secret.yaml diff --git a/chart/templates/postgres-secret.yaml b/chart/templates/postgres-secret.yaml new file mode 100644 index 00000000..03ac5abb --- /dev/null +++ b/chart/templates/postgres-secret.yaml @@ -0,0 +1,10 @@ +{{- if ne .Values.postgres.password "" }} +apiVersion: v1 +kind: Secret +metadata: + name: sonarqube-postgres + namespace: {{ .Release.Namespace }} +type: kubernetes.io/opaque +stringData: + password: {{ .Values.postgres.password }} +{{- end }} diff --git a/chart/values.yaml b/chart/values.yaml index a8809bb2..f9088d4e 100644 --- a/chart/values.yaml +++ b/chart/values.yaml @@ -5,6 +5,8 @@ sso: saml: providerName: Keycloak # This is displayed on the SonarQube landing screen ("Log in with ") postgres: + password: "" + internal: true selector: cluster-name: pg-cluster