Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
Michael-Kruggel committed May 9, 2024
1 parent 41e4da4 commit 1504508
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 7 deletions.
20 changes: 17 additions & 3 deletions bundle/uds-config.yaml
Original file line number Diff line number Diff line change
@@ -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
6 changes: 3 additions & 3 deletions src/dev-secrets/postgres-secret.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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###"
9 changes: 8 additions & 1 deletion src/dev-secrets/zarf.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,21 @@ 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
required: true
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
Expand Down

0 comments on commit 1504508

Please sign in to comment.