From c1a9fb60d0b7dffae4fa47dd97e746d94f7cef35 Mon Sep 17 00:00:00 2001 From: "Benjamin A. Petersen" Date: Thu, 24 Aug 2023 14:51:23 -0400 Subject: [PATCH] build.yaml kbld config: pass in image_repo --- deploy_carvel/concierge/build.yaml | 10 ++++-- deploy_carvel/concierge/package-template.yml | 31 +++++++++++++++++++ deploy_carvel/supervisor/build.yaml | 10 ++++-- deploy_carvel/supervisor/package-template.yml | 31 +++++++++++++++++++ 4 files changed, 76 insertions(+), 6 deletions(-) create mode 100644 deploy_carvel/concierge/package-template.yml create mode 100644 deploy_carvel/supervisor/package-template.yml diff --git a/deploy_carvel/concierge/build.yaml b/deploy_carvel/concierge/build.yaml index ef3676fd..1d049bc3 100644 --- a/deploy_carvel/concierge/build.yaml +++ b/deploy_carvel/concierge/build.yaml @@ -1,11 +1,15 @@ +#@ load("@ytt:data", "data") +--- apiVersion: kbld.k14s.io/v1alpha1 kind: Config -minimumRequiredVersion: 0.31.0 # minimum version of kbld. We probably don't need to specify. +minimumRequiredVersion: 0.31.0 #! minimum version of kbld. We probably don't need to specify. overrides: #! TODO: in the pinniped yamls, this is provided by values.yaml, not declared in the deployment. #! we should assess if we want to leave it there or move it to this form of configuration. -- image: projects.registry.vmware.com/pinniped/pinniped-server:latest - newImage: "" +- image: projects.registry.vmware.com/pinniped/pinniped-server + newImage: #@ data.values.image_repo + + #! I don't think we need any of these (until we need them 😊). IE, don't use prematurely. diff --git a/deploy_carvel/concierge/package-template.yml b/deploy_carvel/concierge/package-template.yml new file mode 100644 index 00000000..cbfe0a9b --- /dev/null +++ b/deploy_carvel/concierge/package-template.yml @@ -0,0 +1,31 @@ +#@ 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/build.yaml b/deploy_carvel/supervisor/build.yaml index ef3676fd..1d049bc3 100644 --- a/deploy_carvel/supervisor/build.yaml +++ b/deploy_carvel/supervisor/build.yaml @@ -1,11 +1,15 @@ +#@ load("@ytt:data", "data") +--- apiVersion: kbld.k14s.io/v1alpha1 kind: Config -minimumRequiredVersion: 0.31.0 # minimum version of kbld. We probably don't need to specify. +minimumRequiredVersion: 0.31.0 #! minimum version of kbld. We probably don't need to specify. overrides: #! TODO: in the pinniped yamls, this is provided by values.yaml, not declared in the deployment. #! we should assess if we want to leave it there or move it to this form of configuration. -- image: projects.registry.vmware.com/pinniped/pinniped-server:latest - newImage: "" +- image: projects.registry.vmware.com/pinniped/pinniped-server + newImage: #@ data.values.image_repo + + #! I don't think we need any of these (until we need them 😊). IE, don't use prematurely. diff --git a/deploy_carvel/supervisor/package-template.yml b/deploy_carvel/supervisor/package-template.yml new file mode 100644 index 00000000..714d214d --- /dev/null +++ b/deploy_carvel/supervisor/package-template.yml @@ -0,0 +1,31 @@ +#@ 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: {}