From 7dcad9f7233db6ad2d036866a94550e32011fbf6 Mon Sep 17 00:00:00 2001 From: Michael-Kruggel Date: Tue, 13 Feb 2024 19:21:36 +0000 Subject: [PATCH] feat: moved over to use uds-package-dependencies --- bundle/uds-bundle.yaml | 14 ++++++++--- release-please-config.json | 3 ++- .../artifactory/join-master-key-secret.yaml | 0 {test => src}/artifactory/zarf.yaml | 2 +- src/dev-secrets/postgres-secret.yaml | 10 ++++++++ src/dev-secrets/zarf.yaml | 25 +++++++++++++++++++ tasks/create.yaml | 8 ++---- 7 files changed, 50 insertions(+), 12 deletions(-) rename {test => src}/artifactory/join-master-key-secret.yaml (100%) rename {test => src}/artifactory/zarf.yaml (94%) create mode 100644 src/dev-secrets/postgres-secret.yaml create mode 100644 src/dev-secrets/zarf.yaml diff --git a/bundle/uds-bundle.yaml b/bundle/uds-bundle.yaml index 611a517..0664289 100644 --- a/bundle/uds-bundle.yaml +++ b/bundle/uds-bundle.yaml @@ -7,13 +7,19 @@ metadata: # x-release-please-end packages: - - name: artifactory-postgres - path: ../ - ref: 12.6.6-0 + - name: dev-postgres + repository: ghcr.io/defenseunicorns/packages/uds/dev-postgres + ref: 0.0.2 - name: artifactory-secrets path: ../ - ref: 107.63.9-uds.0 + # x-release-please-start-version + ref: 107.63.9-uds.1 + # x-release-please-end + + - name: dev-secrets + path: ../ + ref: 0.1.0 - name: artifactory path: ../ diff --git a/release-please-config.json b/release-please-config.json index 1064e8f..42d84c9 100644 --- a/release-please-config.json +++ b/release-please-config.json @@ -16,7 +16,8 @@ "extra-files": [ "bundle/uds-bundle.yaml", "tasks/publish.yaml", - "zarf.yaml" + "zarf.yaml", + "src/artifactory/zarf.yaml" ] } }, diff --git a/test/artifactory/join-master-key-secret.yaml b/src/artifactory/join-master-key-secret.yaml similarity index 100% rename from test/artifactory/join-master-key-secret.yaml rename to src/artifactory/join-master-key-secret.yaml diff --git a/test/artifactory/zarf.yaml b/src/artifactory/zarf.yaml similarity index 94% rename from test/artifactory/zarf.yaml rename to src/artifactory/zarf.yaml index 6b0bc29..295e2a0 100644 --- a/test/artifactory/zarf.yaml +++ b/src/artifactory/zarf.yaml @@ -3,7 +3,7 @@ kind: ZarfPackageConfig metadata: name: artifactory-secrets # x-release-please-start-version - version: "107.63.9-uds.0" + version: "107.63.9-uds.1" # x-release-please-end architecture: amd64 diff --git a/src/dev-secrets/postgres-secret.yaml b/src/dev-secrets/postgres-secret.yaml new file mode 100644 index 0000000..365d7a3 --- /dev/null +++ b/src/dev-secrets/postgres-secret.yaml @@ -0,0 +1,10 @@ +apiVersion: v1 +kind: Secret +metadata: + name: artifactory-postgres + namespace: artifactory +type: kubernetes.io/opaque +stringData: + password: "###ZARF_VAR_DB_PASSWORD###" + url: jdbc:postgresql://postgresql.artifactory-db.svc.cluster.local:5432/artifactorydb + user: artifactory diff --git a/src/dev-secrets/zarf.yaml b/src/dev-secrets/zarf.yaml new file mode 100644 index 0000000..6e8e30c --- /dev/null +++ b/src/dev-secrets/zarf.yaml @@ -0,0 +1,25 @@ +# yaml-language-server: $schema=https://raw.githubusercontent.com/defenseunicorns/zarf/main/zarf.schema.json +kind: ZarfPackageConfig +metadata: + name: dev-secrets + version: "0.1.0" + architecture: amd64 + +components: + - name: postgres-password + required: true + actions: + onDeploy: + before: + - cmd: kubectl get secret -n dev-postgres postgresql --template={{.data.password}} | base64 -d + mute: true + setVariables: + - name: DB_PASSWORD + sensitive: true + - name: artifactory-postgres + required: true + manifests: + - name: artifactory-postgres + namespace: artifactory + files: + - postgres-secret.yaml diff --git a/tasks/create.yaml b/tasks/create.yaml index a683efe..b968c90 100644 --- a/tasks/create.yaml +++ b/tasks/create.yaml @@ -19,9 +19,5 @@ tasks: description: Create the Dependency Zarf Package(s) actions: - cmd: | - for dependency in artifactory; do - zarf package create test/${dependency}/ --confirm --no-progress --architecture=${UDS_ARCH} --skip-sbom - done - for dependency in postgres; do - zarf package create test/${dependency}/ --confirm --no-progress --architecture=${UDS_ARCH} --skip-sbom - done + zarf package create src/artifactory/ --confirm --no-progress --architecture=${UDS_ARCH} --skip-sbom + zarf package create src/dev-secrets/ --confirm --no-progress --architecture=${UDS_ARCH} --skip-sbom