From 13f5dff630ec6094cd1fa2e53125cfa369c314cf Mon Sep 17 00:00:00 2001 From: "S.Cavallo" Date: Fri, 12 Jun 2020 15:45:50 -0400 Subject: [PATCH] ability to self-manage db creds --- kubernetes/blackduck/templates/postgres-config.yaml | 2 ++ kubernetes/blackduck/values.yaml | 2 ++ 2 files changed, 4 insertions(+) diff --git a/kubernetes/blackduck/templates/postgres-config.yaml b/kubernetes/blackduck/templates/postgres-config.yaml index 06439b7..d725925 100644 --- a/kubernetes/blackduck/templates/postgres-config.yaml +++ b/kubernetes/blackduck/templates/postgres-config.yaml @@ -21,6 +21,7 @@ metadata: helm.sh/hook-delete-policy: before-hook-creation name: {{ .Release.Name }}-blackduck-db-config namespace: {{ .Release.Namespace }} +{{ if eq .Values.postgres.createSecret true}} --- apiVersion: v1 data: @@ -38,3 +39,4 @@ metadata: name: {{ .Release.Name }}-blackduck-db-creds namespace: {{ .Release.Namespace }} type: Opaque +{{ end }} \ No newline at end of file diff --git a/kubernetes/blackduck/values.yaml b/kubernetes/blackduck/values.yaml index 334b80e..6231c3b 100644 --- a/kubernetes/blackduck/values.yaml +++ b/kubernetes/blackduck/values.yaml @@ -84,6 +84,8 @@ postgres: registry: "docker.io/centos" # false for running Postgres as a container and true for using External Postgres database isExternal: true + # false for maintaining your own ${release_name}-blackduck-db-creds secret to keep your database passwords out of values.yaml + createSecret: true # required only for external postgres, for postgres as a container, it will point to -blackduck-postgres host: port: 5432