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