From 730b1bbe43cdbcb3b446b865da4f31cafa0379b5 Mon Sep 17 00:00:00 2001 From: "Benjamin A. Petersen" Date: Thu, 24 Aug 2023 14:53:19 -0400 Subject: [PATCH] use package-template.yml to generate packages --- deploy_carvel/concierge/package-template.yml | 9 +++--- deploy_carvel/concierge/package.yml | 31 ------------------- deploy_carvel/supervisor/package-template.yml | 13 ++++---- deploy_carvel/supervisor/package.yml | 31 ------------------- 4 files changed, 11 insertions(+), 73 deletions(-) delete mode 100644 deploy_carvel/concierge/package.yml delete mode 100644 deploy_carvel/supervisor/package.yml diff --git a/deploy_carvel/concierge/package-template.yml b/deploy_carvel/concierge/package-template.yml index cbfe0a9b..96cfd06e 100644 --- a/deploy_carvel/concierge/package-template.yml +++ b/deploy_carvel/concierge/package-template.yml @@ -4,10 +4,10 @@ apiVersion: data.packaging.carvel.dev/v1alpha1 kind: Package metadata: - name: #@ "concierge.pinniped.dev." + data.values.version + name: #@ "concierge.pinniped.dev." + data.values.package_version spec: refName: concierge.pinniped.dev - version: #@ data.values.version + version: #@ data.values.package_version releaseNotes: | Initial release of the pinniped concierge package, TODO: AUTOMATE THIS?? valuesSchema: @@ -16,9 +16,8 @@ spec: spec: fetch: - imgpkgBundle: -#! TODO: we will need a place to host this. -#! this package image needs to be built and deployed so it can then be installed. - image: #@ "${REPO_HOST}/packages/pinniped-concierge:" + data.values.version + #! image: #@ data.values.package_image_repo + "/packages/:" + data.values.package_version + image: #@ data.values.package_image_repo template: - ytt: paths: diff --git a/deploy_carvel/concierge/package.yml b/deploy_carvel/concierge/package.yml deleted file mode 100644 index cbfe0a9b..00000000 --- a/deploy_carvel/concierge/package.yml +++ /dev/null @@ -1,31 +0,0 @@ -#@ load("@ytt:data", "data") # for reading data values (generated via ytt's data-values-schema-inspect mode). -#@ load("@ytt:yaml", "yaml") # for dynamically decoding the output of ytt's data-values-schema-inspect ---- -apiVersion: data.packaging.carvel.dev/v1alpha1 -kind: Package -metadata: - name: #@ "concierge.pinniped.dev." + data.values.version -spec: - refName: concierge.pinniped.dev - version: #@ data.values.version - releaseNotes: | - Initial release of the pinniped concierge package, TODO: AUTOMATE THIS?? - valuesSchema: - openAPIv3: #@ yaml.decode(data.values.openapi)["components"]["schemas"]["dataValues"] - template: - spec: - fetch: - - imgpkgBundle: -#! TODO: we will need a place to host this. -#! this package image needs to be built and deployed so it can then be installed. - image: #@ "${REPO_HOST}/packages/pinniped-concierge:" + data.values.version - template: - - ytt: - paths: - - "config/" - - kbld: - paths: - - ".imgpkg/images.yml" - - "-" - deploy: - - kapp: {} diff --git a/deploy_carvel/supervisor/package-template.yml b/deploy_carvel/supervisor/package-template.yml index 714d214d..150c6419 100644 --- a/deploy_carvel/supervisor/package-template.yml +++ b/deploy_carvel/supervisor/package-template.yml @@ -4,21 +4,22 @@ apiVersion: data.packaging.carvel.dev/v1alpha1 kind: Package metadata: - name: #@ "supervisor.pinniped.dev." + data.values.version + name: #@ "supervisor.pinniped.dev." + data.values.package_version spec: refName: supervisor.pinniped.dev - version: #@ data.values.version + version: #@ data.values.package_version releaseNotes: | - Initial release of the pinniped supervisor package, TODO: AUTOMATE THIS?? + Initial release of the pinniped supervisor package + licenses: + - "Apache-2.0" valuesSchema: openAPIv3: #@ yaml.decode(data.values.openapi)["components"]["schemas"]["dataValues"] template: spec: fetch: - imgpkgBundle: -#! TODO: we will need a place to host this. -#! this package image needs to be built and deployed so it can then be installed. - image: #@ "${REPO_HOST}/packages/pinniped-supervisor:" + data.values.version + #! image: #@ data.values.package_image_repo + "/packages/:" + data.values.package_version + image: #@ data.values.package_image_repo template: - ytt: paths: diff --git a/deploy_carvel/supervisor/package.yml b/deploy_carvel/supervisor/package.yml deleted file mode 100644 index 714d214d..00000000 --- a/deploy_carvel/supervisor/package.yml +++ /dev/null @@ -1,31 +0,0 @@ -#@ load("@ytt:data", "data") # for reading data values (generated via ytt's data-values-schema-inspect mode). -#@ load("@ytt:yaml", "yaml") # for dynamically decoding the output of ytt's data-values-schema-inspect ---- -apiVersion: data.packaging.carvel.dev/v1alpha1 -kind: Package -metadata: - name: #@ "supervisor.pinniped.dev." + data.values.version -spec: - refName: supervisor.pinniped.dev - version: #@ data.values.version - releaseNotes: | - Initial release of the pinniped supervisor package, TODO: AUTOMATE THIS?? - valuesSchema: - openAPIv3: #@ yaml.decode(data.values.openapi)["components"]["schemas"]["dataValues"] - template: - spec: - fetch: - - imgpkgBundle: -#! TODO: we will need a place to host this. -#! this package image needs to be built and deployed so it can then be installed. - image: #@ "${REPO_HOST}/packages/pinniped-supervisor:" + data.values.version - template: - - ytt: - paths: - - "config/" - - kbld: - paths: - - ".imgpkg/images.yml" - - "-" - deploy: - - kapp: {}