Package types
Crossplane supports these package types: Configurations
, Functions
and Providers
.
Configuration
packages combine Crossplane Composite Resource Definitions, Compositions and metadata.Function
packages include the compiled function code for single or multiple processor architectures.Provider
packages combine a Kubernetes controller container, associated Custom Resource Definitions (CRDs
) and metadata. The Crossplane open source AWS provider package is an example a provider’s metadata andCRDs
.
Prerequisites
- Building and pushing packages require the
up
command-line. - Pushing packages requires an Upbound account.
Build a package
Build a package using up xpkg build
.
The up xpkg build
command expects a crossplane.yaml
file to provide the metadata for the package file.
The default name is the metadata.name
value in the crossplane.yaml
file.
up xpkg build
xpkg saved to /home/vagrant/pkg/test-config-15ab02d92a30.xpkg
Provide a specific package name with up xpkg build --name <package name>
.
By default up xpkg build
saves the package to the current directory. Specify a specific location with up xpkg build -o <path>
.
The up xpkg build
command reference contains all available options.
Push a package
Before pushing a package you must login to the Upbound Marketplace using up login
.
Create a repository
Upbound hosts packages in an Upbound repository. Create a repository with the up repository create
command.
For example, to create a repository called my-repo
up repository create my-repo
upbound-docs/my-repo created
Repositories have either public
or private
visibility:
public
visibility means that any published versions of your package have a public listing page in the Marketplace and authorized credentials aren’t required to pull.private
visibility means that any published versions of your package have a listing page that only you and other collaborators in your organization can see. Packages require authorized credentials to pulled.
View any existing repositories with up repository list
.
up repo list
NAME TYPE PUBLIC UPDATED
my-repo configuration true 23h
Add annotations to your package
The Upbound Marketplace automatically renders specific metadata annotations into listing pages. Upbound recommends that all package maintainers add these annotations into their crossplane.yaml
. Adding annotations ensures listing have all the required information like licenses, links to source code, and contact information for maintainers.
Upbound supports all annotations specified in the xpkg specification.
Push a package to the repository
Push a package to the Upbound Marketplace using the up xpkg push
command.
The up xpkg push
command requires:
- The repository to push a package to.
- A package version tag. The package version tag is a semantic versioning number determining package upgrades and dependency requirements.
The push command syntax is
up xpkg push <repository>:<version tag> -f <xpkg file>
.
For example, to push a package with the following parameters:
- Repository
upbound-docs/my-repo
- Version
v0.2
- Package file named
my-package.xpkg
Use the following up xpkg push
command:
up xpkg push upbound-docs/my-repo:v0.2 -f my-package.xpkg
xpkg pushed to upbound-docs/my-repo:v0.2
The package is now available from the Upbound Marketplace. View the Marketplace listing at:
https://marketplace.upbound.io/<package_type>/<organization or user>/<repository>/
For example, the Upbound AWS Official Provider is a provider
package in the upbound
organization’s provider-aws
repository. The package address is https://marketplace.upbound.io/providers/upbound/provider-aws/
Publishing public packages
Upbound reviews all public packages, and new repositories have a default publishing policy of requiring a one-time manual approval. Contact the Upbound team via the #upbound
channel in the Crossplane Slack to request Upbound to review your package.
Upbound needs the following information before considering a package:
- Public Git repository of the package.
- The Upbound account to list as an owner and point of contact.
- The Upbound repository name.
Publish status indicates whether a package version appears in the Marketplace, while privacy indicates who can access it.
Published | Not Published | |
---|---|---|
Public | Pull: Anyone View: Anyone | Pull: Anonymous View: No one |
Private | Pull: Authorized View: Authorized | Pull: Authorized View: No one |