Closed ulucinar closed 1 year ago
@turkenh, could you please take a look at the last commit that introduces the option to be able to selectively dump provider packages onto the filesystem? I had to introduce this option for the local-deploy
and uptest
make targets.
Description of your changes
This PR introduces an
xpkg batch
subcommand to batch process a family of provider packages. Thexpkg build
implementation dumps the built packages onto the file system forxpkg push
to load them from the filesystem and push them to a package registry. These two subcommands should stay as is with this PR and a newxpkg batch
command is added that does not need to store the built provider packages in the filesystem. The packages are instead directly pushed to the configured registry.xpkg batch
has batch processing capabilities to streamline the build process of a family of smaller provider packages. An example invocation for the command looks like:All smaller packages built by this command share a common base image and this common base is specified with the
--family-base-image
option. The providers to be built and pushed are specified via the--service
option.xpkg batch
adds thebase
and theupbound
layers as before, as well as a layer containing the provider binary. Thebase
andupbound
labeled layers are shared between all the architectures of a provider's package.xpkg batch
builds & pushes the provider packages in parallel with the configured (via the--concurrency
option) maximum concurrency.xpkg batch
also has a templating engine so that the family of providers being built can share a template provider metadata. The templating engine substitutes the{{ .Service }}
and{{ .Name }}
template variables with the service and package repo names, respectively, and further template variables can also be supplied via multiple--template-var
command-line options.The
--family-package-url-format
should specify the package URL format string and must contain a single string specifier, which will be substituted with the repo name of the provider being processed. The provider binaries should reside under--provider-bin-root
in their respective platform folders. The platforms for which the provider packages will be built can be specified via the--platform
option.I have:
make reviewable
to ensure this PR is ready for review.backport release-x.y
labels to auto-backport this PR, as appropriate.How has this code been tested
Tested both locally and in Github workflows against
upbound/provider-aws
packages.