Skip to main content

Project API Reference

A Project defines an Upbound project, which can be built into a Crossplane Configuration package. The project file, upbound.yaml, is the entry point for every control plane project and configures metadata, dependencies, paths, and build options.

important

An upbound.yaml file is a superset of a Crossplane configuration crossplane.yaml file and replaces it.

API versions

The Project resource supports two API versions:

VersionStatusNotes
meta.dev.upbound.io/v1alpha1Storage versionStable, recommended for most projects
meta.dev.upbound.io/v2alpha1AlphaAdds operations path support

Example

A minimal upbound.yaml:

apiVersion: meta.dev.upbound.io/v1alpha1
kind: Project
metadata:
name: example-project-aws
spec:
repository: xpkg.upbound.io/upbound/example-project-aws

A project with dependencies and metadata:

apiVersion: meta.dev.upbound.io/v2alpha1
kind: Project
metadata:
name: my-project
spec:
description: A control plane project for managing cloud resources.
license: Apache-2.0
maintainer: Upbound User <user@example.com>
repository: xpkg.upbound.io/upbound/my-project
source: github.com/upbound/my-project
crossplane:
version: ">=v2.0.0-rc.0"
dependsOn:
- apiVersion: pkg.crossplane.io/v1
kind: Provider
package: xpkg.upbound.io/upbound/provider-aws-s3
version: ">=v2.0.0"
paths:
apis: apis
functions: functions
examples: examples
tests: tests

Spec fields

Required

FieldTypeDescription
repositorystringThe OCI repository to push built packages to. Must be a fully qualified image reference, for example xpkg.upbound.io/upbound/my-project.

Package metadata

These fields become package metadata when a project is built.

FieldTypeDescription
descriptionstringA short description of the project.
maintainerstringThe project maintainer, for example Upbound User <user@example.com>.
sourcestringThe source code repository URL, for example github.com/upbound/my-project.
licensestringThe project license, for example Apache-2.0.
readmestringA longer readme for the project. Supports multi-line strings.
additionalMetadatamap[string]stringArbitrary key-value metadata pairs. All keys must have the meta.upbound.io/ prefix.

Dependencies

FieldTypeDescription
crossplaneobjectCrossplane version constraints. Contains a version field with a semantic version constraint, for example ">=v2.0.0-rc.0".
dependsOn[]DependencyPackage dependencies. Each entry specifies an apiVersion, kind, package, and version.

A dependency entry:

dependsOn:
- apiVersion: pkg.crossplane.io/v1
kind: Provider
package: xpkg.upbound.io/upbound/provider-aws-s3
version: ">=v2.0.0"

Paths

The paths field configures the directories for each part of the project. All paths must be relative.

FieldTypeDefaultDescription
paths.apisstringapis/Directory holding the project's APIs (XRDs and compositions).
paths.functionsstringfunctions/Directory holding embedded composition functions.
paths.examplesstringexamples/Directory holding example composite resources.
paths.testsstringtests/Directory holding composition and end-to-end tests.
paths.operationsstringoperations/Directory holding operation definitions. Only available in v2alpha1.

Build options

FieldTypeDefaultDescription
architectures[]string["amd64", "arm64"]Target architectures for the built package.
imageConfig[]ImageConfigNoneRules for matching and rewriting container image references during build.

Image configuration

Use imageConfig to rewrite image references during build. Each entry contains:

  • matchImages: A list of prefix-based matching rules. Must have at least one element.
  • rewriteImage: The prefix to use when rewriting matched images.
imageConfig:
- matchImages:
- type: Prefix
prefix: "docker.io/library/"
rewriteImage:
prefix: "registry.example.com/mirror/"

API dependencies (experimental)

warning

This feature is experimental and subject to change.

The apiDependencies field declares external API schema dependencies for type checking and code generation. Each entry requires a type (k8s or crd) and exactly one source:

SourceFieldsDescription
gitrepository (required), ref, pathFetch from a Git repository.
httpurl (required)Fetch from an HTTP/HTTPS URL.
k8sversion (required)Use a specific Kubernetes API version, for example v1.33.0.
apiDependencies:
- type: k8s
k8s:
version: v1.33.0
- type: crd
git:
repository: https://github.com/example/crds
ref: main
path: deploy/crds

Defaults

When a project is loaded, the following defaults are applied if not specified:

  • paths.apis: apis
  • paths.functions: functions
  • paths.examples: examples
  • paths.tests: tests
  • paths.operations: operations (v2alpha1 only)
  • architectures: ["amd64", "arm64"]
  • crossplane.version: >=v2.0.0-rc.0 (v2alpha1 only)

Validation rules

  • metadata.name must not be empty.
  • spec must be present.
  • spec.repository must not be empty.
  • All paths must be relative, not absolute.
  • If architectures is specified, it must not be empty.
  • All additionalMetadata keys must have the meta.upbound.io/ prefix.
  • Each apiDependencies entry must specify exactly one source (git, http, or k8s).

Full CRD schema

Loading CRD documentation...