From 15045082928369f916d76d94c4db1dd2567c2b60 Mon Sep 17 00:00:00 2001 From: Michael-Kruggel Date: Thu, 9 May 2024 19:12:43 +0000 Subject: [PATCH] wip --- bundle/uds-config.yaml | 20 +++++++++++++++++--- src/dev-secrets/postgres-secret.yaml | 6 +++--- src/dev-secrets/zarf.yaml | 9 ++++++++- 3 files changed, 28 insertions(+), 7 deletions(-) diff --git a/bundle/uds-config.yaml b/bundle/uds-config.yaml index a3a7e50..56481a4 100644 --- a/bundle/uds-config.yaml +++ b/bundle/uds-config.yaml @@ -1,4 +1,18 @@ variables: - dev-postgres: - db_username: "artifactory" - db_name: "artifactorydb" + artifactory: + ARTIFACTORY_DB_ENDPOINT: "pg-cluster.postgres.svc.cluster.local" + ARTIFACTORY_DB_USERNAME: "artifactory.artifactory" + postgres-operator: + postgresql: + enabled: true # Set to false to not create the PostgreSQL resource + teamId: "uds" + volume: + size: "10Gi" + numberOfInstances: 2 + users: + artifactory.artifactory: [] # database owner + databases: + artifactorydb: artifactory.artifactory + version: "13" + ingress: + remoteGenerated: Anywhere diff --git a/src/dev-secrets/postgres-secret.yaml b/src/dev-secrets/postgres-secret.yaml index a1e9412..db30e42 100644 --- a/src/dev-secrets/postgres-secret.yaml +++ b/src/dev-secrets/postgres-secret.yaml @@ -5,6 +5,6 @@ metadata: namespace: artifactory type: kubernetes.io/opaque stringData: - password: "###ZARF_VAR_DB_PASSWORD###" - url: jdbc:postgresql://postgresql.dev-postgres.svc.cluster.local:5432/artifactorydb - user: artifactory + password: "###ZARF_VAR_POSTGRES_DB_PASSWORD###" + url: "jdbc:postgresql://###ZARF_VAR_ARTIFACTORY_DB_ENDPOINT###:5432/###ZARF_VAR_ARTIFACTORY_DB_NAME###" + user: "###ZARF_VAR_ARTIFACTORY_DB_USERNAME###" diff --git a/src/dev-secrets/zarf.yaml b/src/dev-secrets/zarf.yaml index 6011b4b..f4fadc1 100644 --- a/src/dev-secrets/zarf.yaml +++ b/src/dev-secrets/zarf.yaml @@ -3,6 +3,13 @@ kind: ZarfPackageConfig metadata: name: dev-secrets version: "0.1.0" +variables: + - name: ARTIFACTORY_DB_NAME + default: "artifactorydb" + - name: ARTIFACTORY_DB_USERNAME + default: "artifactory.artifactory" + - name: ARTIFACTORY_DB_ENDPOINT + default: "pg-cluster.postgres.svc.cluster.local" components: - name: postgres-password @@ -10,7 +17,7 @@ components: actions: onDeploy: before: - - cmd: kubectl get secret -n dev-postgres postgresql --template={{.data.password}} | base64 -d + - cmd: kubectl get secret -n artifactory artifactory.artifactory.pg-cluster.credentials.postgresql.acid.zalan.do --template={{.data.password}} | base64 -d mute: true setVariables: - name: POSTGRES_DB_PASSWORD