Skip to content

Commit 552f078

Browse files
authored
Split secrets into multiple files (#266)
1 parent cac7ac7 commit 552f078

File tree

2 files changed

+14
-1
lines changed

2 files changed

+14
-1
lines changed

charts/postgresql-secrets/Chart.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ type: application
1818
# This is the chart version. This version number should be incremented each time you make changes
1919
# to the chart and its templates, including the app version.
2020
# Versions are expected to follow Semantic Versioning (https://semver.org/)
21-
version: 25.2.0
21+
version: 25.2.1
2222
# This is the version number of the application being deployed. This version number should be
2323
# incremented each time you make changes to the application. Versions are not expected to
2424
# follow Semantic Versioning. They should reflect the version the application is using.

charts/postgresql-secrets/templates/secrets.yaml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
---
55

66
{{- $passwords := dict }}
7+
{{- $namespace := .Values.namespace }}
78
{{- range $k, $v := .Values.databases }}
89
{{- $currentPassword := randAlphaNum 16 | nospace }}
910
{{- $_ := set $passwords $v.name $currentPassword}}
@@ -40,6 +41,18 @@ stringData:
4041
PGDATABASE: "{{$v.namespace}}-{{ $v.name}}"
4142
PGHOST: "postgresql.orch-database"
4243
PGPORT: "5432"
44+
---
45+
apiVersion: v1
46+
kind: Secret
47+
metadata:
48+
name: "{{$v.namespace}}-{{ $v.name}}"
49+
namespace: {{ $namespace }}
50+
labels:
51+
managed-by: edge-manageability-framework
52+
type: kubernetes.io/basic-auth
53+
stringData:
54+
username: "{{$v.namespace}}-{{ $v.name }}_user"
55+
password: "{{ $currentPassword }}"
4356
{{- end }}
4457
---
4558
apiVersion: v1

0 commit comments

Comments
 (0)