From 5d48380e57b40a66aa8000059f5f5caa1c6e7558 Mon Sep 17 00:00:00 2001 From: Wayne Starr Date: Tue, 11 Jun 2024 21:09:53 -0600 Subject: [PATCH] feat: allow for Postgres password secret generation (#147) ## Description This allows for the Postgres password secret to be generated in the config chart directly ## Related Issue Fixes #145 ## 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-gitlab/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..4fea087b --- /dev/null +++ b/chart/templates/postgres-secret.yaml @@ -0,0 +1,10 @@ +{{- if ne .Values.postgres.password "" }} +apiVersion: v1 +kind: Secret +metadata: + name: gitlab-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 ba25da0c..f1cb57eb 100644 --- a/chart/values.yaml +++ b/chart/values.yaml @@ -19,6 +19,8 @@ redis: namespace: dev-redis port: 6379 postgres: + password: "" + # Set to false to use external postgres internal: true selector: