Skip to content

Commit b1e5b87

Browse files
committed
Redo via values.yaml
1 parent 2f08f8b commit b1e5b87

File tree

3 files changed

+8
-3
lines changed

3 files changed

+8
-3
lines changed

.github/workflows/pre-merge.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,8 @@ jobs:
8585
- name: Deploy Umbrella Charts
8686
run: |
8787
set -x
88+
# Generate a random password for CI testing
89+
ORCH_DEFAULT_PASSWORD=$(openssl rand -base64 32 | tr -d "=+/" | cut -c1-25)
8890
PUBLIC_RS="registry-rs.edgeorchestration.intel.com/edge-orch/"
8991
DEV_VALUES="-f tools/latest-dev-components.yaml"
9092
CORE_DEV_VALUES=""
@@ -120,7 +122,8 @@ jobs:
120122
--set import.credentials.enabled=false \
121123
--set import.tenant-controller.enabled=false \
122124
--set tenant-controller.managerArgs.disableCredentialsManagement=true \
123-
--set inventory.postgresql.pod.enabled=true ${CORE_DEV_VALUES} \
125+
--set inventory.postgresql.pod.enabled=true \
126+
--set inventory.postgresql.auth.password="${ORCH_DEFAULT_PASSWORD}" ${CORE_DEV_VALUES} \
124127
infra-core ./infra-core
125128
126129
helm install -n orch-infra --set global.registry.name="${PUBLIC_RS}" \

inventory/templates/postgresql-secrets.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,13 @@
33
---
44
# NOTE this is used only in the dev environment
55
{{- if .Values.postgresql.pod.enabled }}
6-
{{- $pgPassword := derivePassword 1 "long" .Chart.AppVersion "postgresql" "" }}
76
apiVersion: v1
87
kind: Secret
98
metadata:
109
name: {{ .Values.postgresql.secrets }}
1110
stringData:
1211
PGUSER: "admin"
13-
PGPASSWORD: {{ $pgPassword | quote }}
12+
PGPASSWORD: {{ required "PostgreSQL password" .Values.postgresql.auth.password | quote }}
1413
PGDATABASE: "postgres"
1514
PGPORT: "5432"
1615
PGHOST: "inventory-postgresql-0.inventory-postgresql"

inventory/values.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -137,6 +137,9 @@ postgresql:
137137
mountPath: "/var/lib/postgresql/data"
138138
# secrets with PGHOST, PGUSER, PGPASSWORD, PGDATABASE, PGPORT
139139
secrets: inventory-postgresql-config
140+
# Authentication configuration
141+
auth:
142+
password: ""
140143
# Configuration for read-only replicas
141144
readOnlyReplicasEnabled: false
142145
# secrets for read-only replicas with PGHOST, PGUSER, PGPASSWORD, PGDATABASE, PGPORT

0 commit comments

Comments
 (0)