Skip to content

Commit

Permalink
Merge pull request crossplane#4633 from negz/spectacular
Browse files Browse the repository at this point in the history
  • Loading branch information
phisco authored Sep 18, 2023
2 parents decb053 + 66aa5ca commit 75e3902
Showing 1 changed file with 30 additions and 10 deletions.
40 changes: 30 additions & 10 deletions contributing/specifications/xpkg.md
Original file line number Diff line number Diff line change
@@ -1,15 +1,20 @@
# xpkg Specification

Crossplane supports two types of [packages]: Providers and Configurations. These
packages are distributed as generic [OCI images], which contain [YAML] content
informing the Crossplane package manager how to alter the state of a cluster by
installing objects that configure new resource types, and starting controllers
to reconcile them. An OCI image that contains valid Crossplane package content
is commonly referred to as an `xpkg` ("ex-package"). This document provides the
specification for a valid `xpkg`, which can be considered a superset of the
requirements detailed in the [OCI image specification]. It is divided into two
broad sections: requirements related to OCI image format and requirements
related to Crossplane `package.yaml` contents.
Crossplane supports the following types of [packages]:

- Providers
- Configurations
- Functions

These packages are distributed as generic [OCI images], which contain [YAML]
content informing the Crossplane package manager how to alter the state of a
cluster by installing objects that configure new resource types, and starting
controllers to reconcile them. An OCI image that contains valid Crossplane
package content is commonly referred to as an `xpkg` ("ex-package"). This
document provides the specification for a valid `xpkg`, which can be considered
a superset of the requirements detailed in the [OCI image specification]. It is
divided into two broad sections: requirements related to OCI image format and
requirements related to Crossplane `package.yaml` contents.

- [OCI Image Format](#oci-image-format)
- [Indexes](#indexes)
Expand Down Expand Up @@ -166,6 +171,21 @@ requirements:
objects MAY be defined in the YAML stream.
- Zero (0) other object types may be defined in the YAML stream.

### Function Package Requirements

The `package.yaml` for Function packages must adhere to the following
requirements:

- One (1) and only one `Function.meta.pkg.crossplane.io` object MUST be defined
in the YAML stream.
- Zero (0) or more `CustomResourceDefinition.apiextensions.k8s.io` objects MAY
be defined in the YAML stream.
- Zero (0) other object types may be defined in the YAML stream.

Note that Function packages use CustomResourceDefinitions (CRD) only to deliver
schema for their input type(s). The package manager will not actually create the
supplied CRDs in the API server.

### Object Annotations

Though not used directly by Crossplane, the following object metadata
Expand Down

0 comments on commit 75e3902

Please sign in to comment.