From 765bcaa5c27c2a4b280a4c0d4030907e95bbbbb8 Mon Sep 17 00:00:00 2001 From: Jared Watts Date: Thu, 20 Aug 2026 12:45:46 -0700 Subject: [PATCH 1/2] chore: docs updates for v2.4 release Fixes all checklist items from #1135 Signed-off-by: Jared Watts --- config.yaml | 2 +- content/cli/v2.1/_index.md | 74 -- content/cli/v2.1/command-reference.md | 1101 ----------------- ...plane.io_compositeresourcedefinitions.yaml | 2 +- ...ns.crossplane.io_compositionrevisions.yaml | 2 +- ...extensions.crossplane.io_compositions.yaml | 2 +- ...ions.crossplane.io_environmentconfigs.yaml | 2 +- ....io_managedresourceactivationpolicies.yaml | 2 +- ...ssplane.io_managedresourcedefinitions.yaml | 2 +- .../apiextensions.crossplane.io_usages.yaml | 2 +- .../ops.crossplane.io_cronoperations.yaml | 2 +- .../crds/ops.crossplane.io_operations.yaml | 2 +- .../ops.crossplane.io_watchoperations.yaml | 2 +- ....crossplane.io_configurationrevisions.yaml | 2 +- .../pkg.crossplane.io_configurations.yaml | 2 +- ...rossplane.io_deploymentruntimeconfigs.yaml | 2 +- .../pkg.crossplane.io_functionrevisions.yaml | 12 +- .../api/crds/pkg.crossplane.io_functions.yaml | 2 +- .../crds/pkg.crossplane.io_imageconfigs.yaml | 2 +- .../api/crds/pkg.crossplane.io_locks.yaml | 2 +- .../pkg.crossplane.io_providerrevisions.yaml | 7 +- .../api/crds/pkg.crossplane.io_providers.yaml | 2 +- ...rotection.crossplane.io_clusterusages.yaml | 2 +- .../crds/protection.crossplane.io_usages.yaml | 2 +- content/v2.1/guides/install-from-source.md | 182 --- content/{v2.1 => v2.4}/_index.md | 7 +- content/{v2.1 => v2.4}/api/_index.md | 0 ...plane.io_compositeresourcedefinitions.yaml | 180 ++- ...ns.crossplane.io_compositionrevisions.yaml | 38 +- ...extensions.crossplane.io_compositions.yaml | 38 +- ...ions.crossplane.io_environmentconfigs.yaml | 2 +- ....io_managedresourceactivationpolicies.yaml | 2 +- ...ssplane.io_managedresourcedefinitions.yaml | 2 +- .../apiextensions.crossplane.io_usages.yaml | 2 +- .../ops.crossplane.io_cronoperations.yaml | 39 +- .../crds/ops.crossplane.io_operations.yaml | 39 +- .../ops.crossplane.io_watchoperations.yaml | 39 +- ....crossplane.io_configurationrevisions.yaml | 9 +- .../pkg.crossplane.io_configurations.yaml | 11 +- ...rossplane.io_deploymentruntimeconfigs.yaml | 75 +- .../pkg.crossplane.io_functionrevisions.yaml | 26 +- .../api/crds/pkg.crossplane.io_functions.yaml | 16 +- .../crds/pkg.crossplane.io_imageconfigs.yaml | 26 +- .../api/crds/pkg.crossplane.io_locks.yaml | 4 +- .../pkg.crossplane.io_providerrevisions.yaml | 14 +- .../api/crds/pkg.crossplane.io_providers.yaml | 9 +- ...rotection.crossplane.io_clusterusages.yaml | 2 +- .../crds/protection.crossplane.io_usages.yaml | 2 +- content/{v2.1 => v2.4}/composition/_index.md | 0 .../composite-resource-definitions.md | 12 +- .../composition/composite-resources.md | 41 + .../composition/composition-revisions.md | 0 .../composition/compositions.md | 155 ++- .../composition/environment-configs.md | 0 content/{v2.1 => v2.4}/get-started/_index.md | 0 .../get-started-with-composition.md | 60 +- ...get-started-with-control-plane-projects.md | 10 + .../get-started-with-managed-resources.md | 0 .../get-started-with-operations.md | 0 content/{v2.1 => v2.4}/get-started/install.md | 26 +- content/{v2.1 => v2.4}/guides/_index.md | 0 content/{v2.1 => v2.4}/guides/change-logs.md | 0 .../guides/connection-details-composition.md | 4 +- .../guides/crossplane-with-argo-cd.md | 0 .../crossplane-with-workload-identity.md | 0 .../disabling-unused-managed-resources.md | 0 .../guides/extensions-release-process.md | 0 .../guides/function-patch-and-transform.md | 0 .../guides/implementing-safe-start.md | 0 .../guides/import-existing-resources.md | 0 content/v2.4/guides/install-from-source.md | 247 ++++ content/{v2.1 => v2.4}/guides/metrics.md | 4 +- content/{v2.1 => v2.4}/guides/pods.md | 9 + content/v2.4/guides/scalable-composition.md | 174 +++ .../guides/troubleshoot-crossplane.md | 0 .../guides/uninstall-crossplane.md | 0 .../guides/upgrade-crossplane.md | 0 .../guides/upgrade-to-crossplane-v2.md | 0 .../write-a-composition-function-in-go.md | 26 +- .../write-a-composition-function-in-python.md | 29 +- content/{v2.1 => v2.4}/learn/_index.md | 0 .../learn/community-extension-projects.md | 27 +- .../{v2.1 => v2.4}/learn/feature-lifecycle.md | 0 content/{v2.1 => v2.4}/learn/release-cycle.md | 0 .../managed-resources/_index.md | 0 .../managed-resource-activation-policies.md | 0 .../managed-resource-definitions.md | 0 .../managed-resources/managed-resources.md | 77 ++ .../managed-resources/usages.md | 28 +- .../get-started/composition/app.yaml | 0 .../composition/composition-kcl.yaml | 0 .../composition/composition-python.yaml | 0 .../composition/composition-pythonic.yaml | 0 .../composition-templated-yaml.yaml | 0 .../composition/composition-yaml-cel.yaml | 60 + .../composition/composition-yaml.yaml | 0 .../composition/fn-go-templating.yaml | 0 .../get-started/composition/fn-kcl.yaml | 0 .../get-started/composition/fn-kro.yaml | 6 + .../composition/fn-patch-and-transform.yaml | 0 .../get-started/composition/fn-python.yaml | 0 .../get-started/composition/fn-pythonic.yaml | 0 .../get-started/composition/xrd.yaml | 0 .../get-started/managed-resources/bucket.yaml | 0 .../managed-resources/provider.yaml | 0 .../managed-resources/providerconfig.yaml | 0 .../get-started/operations/function.yaml | 0 .../get-started/operations/ingress-rbac.yaml | 0 .../get-started/operations/ingress.yaml | 0 .../get-started/operations/operation.yaml | 0 ...oymentruntimeconfig-enable-changelogs.yaml | 0 .../object-configmap-for-changelogs.yaml | 0 .../change-logs/provider-kubernetes.yaml | 0 .../manifests/guides/change-logs/rbac.yaml | 0 .../composition-go-templating.yaml | 0 .../composition-kcl.yaml | 0 .../composition-patch-and-transform.yaml | 0 .../composition-python.yaml | 1 - .../composition-pythonic.yaml | 3 - .../fn-auto-ready.yaml | 0 .../fn-go-templating.yaml | 0 .../fn-kcl.yaml | 0 .../fn-patch-and-transform.yaml | 0 .../fn-python.yaml | 0 .../fn-pythonic.yaml | 0 .../my-keys.yaml | 0 .../connection-details-composition/xrd.yaml | 0 .../activation-policy.yaml | 0 .../provider.yaml | 0 .../composition-scale.yaml | 46 + .../scalable-composition/fn-auto-ready.yaml | 6 + .../guides/scalable-composition/fn-pat.yaml | 6 + .../scalable-composition/xrd-scale.yaml | 39 + content/{v2.1 => v2.4}/operations/_index.md | 0 .../operations/cronoperation.md | 0 .../{v2.1 => v2.4}/operations/operation.md | 24 +- .../operations/watchoperation.md | 0 content/{v2.1 => v2.4}/packages/_index.md | 0 .../{v2.1 => v2.4}/packages/configurations.md | 3 +- content/{v2.1 => v2.4}/packages/functions.md | 0 .../{v2.1 => v2.4}/packages/image-configs.md | 80 ++ content/{v2.1 => v2.4}/packages/providers.md | 98 +- .../{v2.1 => v2.4}/whats-crossplane/_index.md | 0 content/{v2.1 => v2.4}/whats-new/_index.md | 0 netlify_build.sh | 4 +- 145 files changed, 1756 insertions(+), 1547 deletions(-) delete mode 100644 content/cli/v2.1/_index.md delete mode 100644 content/cli/v2.1/command-reference.md delete mode 100644 content/v2.1/guides/install-from-source.md rename content/{v2.1 => v2.4}/_index.md (87%) rename content/{v2.1 => v2.4}/api/_index.md (100%) rename content/{v2.1 => v2.4}/api/crds/apiextensions.crossplane.io_compositeresourcedefinitions.yaml (84%) rename content/{v2.1 => v2.4}/api/crds/apiextensions.crossplane.io_compositionrevisions.yaml (87%) rename content/{v2.1 => v2.4}/api/crds/apiextensions.crossplane.io_compositions.yaml (85%) rename content/{v2.1 => v2.4}/api/crds/apiextensions.crossplane.io_environmentconfigs.yaml (97%) rename content/{v2.1 => v2.4}/api/crds/apiextensions.crossplane.io_managedresourceactivationpolicies.yaml (99%) rename content/{v2.1 => v2.4}/api/crds/apiextensions.crossplane.io_managedresourcedefinitions.yaml (99%) rename content/{v2.1 => v2.4}/api/crds/apiextensions.crossplane.io_usages.yaml (99%) rename content/{v2.1 => v2.4}/api/crds/ops.crossplane.io_cronoperations.yaml (87%) rename content/{v2.1 => v2.4}/api/crds/ops.crossplane.io_operations.yaml (87%) rename content/{v2.1 => v2.4}/api/crds/ops.crossplane.io_watchoperations.yaml (88%) rename content/{v2.1 => v2.4}/api/crds/pkg.crossplane.io_configurationrevisions.yaml (96%) rename content/{v2.1 => v2.4}/api/crds/pkg.crossplane.io_configurations.yaml (95%) rename content/{v2.1 => v2.4}/api/crds/pkg.crossplane.io_deploymentruntimeconfigs.yaml (99%) rename content/{v2.1 => v2.4}/api/crds/pkg.crossplane.io_functionrevisions.yaml (96%) rename content/{v2.1 => v2.4}/api/crds/pkg.crossplane.io_functions.yaml (96%) rename content/{v2.1 => v2.4}/api/crds/pkg.crossplane.io_imageconfigs.yaml (91%) rename content/{v2.1 => v2.4}/api/crds/pkg.crossplane.io_locks.yaml (99%) rename content/{v2.1 => v2.4}/api/crds/pkg.crossplane.io_providerrevisions.yaml (96%) rename content/{v2.1 => v2.4}/api/crds/pkg.crossplane.io_providers.yaml (96%) rename content/{v2.1 => v2.4}/api/crds/protection.crossplane.io_clusterusages.yaml (99%) rename content/{v2.1 => v2.4}/api/crds/protection.crossplane.io_usages.yaml (99%) rename content/{v2.1 => v2.4}/composition/_index.md (100%) rename content/{v2.1 => v2.4}/composition/composite-resource-definitions.md (97%) rename content/{v2.1 => v2.4}/composition/composite-resources.md (87%) rename content/{v2.1 => v2.4}/composition/composition-revisions.md (100%) rename content/{v2.1 => v2.4}/composition/compositions.md (84%) rename content/{v2.1 => v2.4}/composition/environment-configs.md (100%) rename content/{v2.1 => v2.4}/get-started/_index.md (100%) rename content/{v2.1 => v2.4}/get-started/get-started-with-composition.md (89%) create mode 100644 content/v2.4/get-started/get-started-with-control-plane-projects.md rename content/{v2.1 => v2.4}/get-started/get-started-with-managed-resources.md (100%) rename content/{v2.1 => v2.4}/get-started/get-started-with-operations.md (100%) rename content/{v2.1 => v2.4}/get-started/install.md (85%) rename content/{v2.1 => v2.4}/guides/_index.md (100%) rename content/{v2.1 => v2.4}/guides/change-logs.md (100%) rename content/{v2.1 => v2.4}/guides/connection-details-composition.md (99%) rename content/{v2.1 => v2.4}/guides/crossplane-with-argo-cd.md (100%) rename content/{v2.1 => v2.4}/guides/crossplane-with-workload-identity.md (100%) rename content/{v2.1 => v2.4}/guides/disabling-unused-managed-resources.md (100%) rename content/{v2.1 => v2.4}/guides/extensions-release-process.md (100%) rename content/{v2.1 => v2.4}/guides/function-patch-and-transform.md (100%) rename content/{v2.1 => v2.4}/guides/implementing-safe-start.md (100%) rename content/{v2.1 => v2.4}/guides/import-existing-resources.md (100%) create mode 100644 content/v2.4/guides/install-from-source.md rename content/{v2.1 => v2.4}/guides/metrics.md (99%) rename content/{v2.1 => v2.4}/guides/pods.md (97%) create mode 100644 content/v2.4/guides/scalable-composition.md rename content/{v2.1 => v2.4}/guides/troubleshoot-crossplane.md (100%) rename content/{v2.1 => v2.4}/guides/uninstall-crossplane.md (100%) rename content/{v2.1 => v2.4}/guides/upgrade-crossplane.md (100%) rename content/{v2.1 => v2.4}/guides/upgrade-to-crossplane-v2.md (100%) rename content/{v2.1 => v2.4}/guides/write-a-composition-function-in-go.md (97%) rename content/{v2.1 => v2.4}/guides/write-a-composition-function-in-python.md (97%) rename content/{v2.1 => v2.4}/learn/_index.md (100%) rename content/{v2.1 => v2.4}/learn/community-extension-projects.md (87%) rename content/{v2.1 => v2.4}/learn/feature-lifecycle.md (100%) rename content/{v2.1 => v2.4}/learn/release-cycle.md (100%) rename content/{v2.1 => v2.4}/managed-resources/_index.md (100%) rename content/{v2.1 => v2.4}/managed-resources/managed-resource-activation-policies.md (100%) rename content/{v2.1 => v2.4}/managed-resources/managed-resource-definitions.md (100%) rename content/{v2.1 => v2.4}/managed-resources/managed-resources.md (92%) rename content/{v2.1 => v2.4}/managed-resources/usages.md (92%) rename content/{v2.1 => v2.4}/manifests/get-started/composition/app.yaml (100%) rename content/{v2.1 => v2.4}/manifests/get-started/composition/composition-kcl.yaml (100%) rename content/{v2.1 => v2.4}/manifests/get-started/composition/composition-python.yaml (100%) rename content/{v2.1 => v2.4}/manifests/get-started/composition/composition-pythonic.yaml (100%) rename content/{v2.1 => v2.4}/manifests/get-started/composition/composition-templated-yaml.yaml (100%) create mode 100644 content/v2.4/manifests/get-started/composition/composition-yaml-cel.yaml rename content/{v2.1 => v2.4}/manifests/get-started/composition/composition-yaml.yaml (100%) rename content/{v2.1 => v2.4}/manifests/get-started/composition/fn-go-templating.yaml (100%) rename content/{v2.1 => v2.4}/manifests/get-started/composition/fn-kcl.yaml (100%) create mode 100644 content/v2.4/manifests/get-started/composition/fn-kro.yaml rename content/{v2.1 => v2.4}/manifests/get-started/composition/fn-patch-and-transform.yaml (100%) rename content/{v2.1 => v2.4}/manifests/get-started/composition/fn-python.yaml (100%) rename content/{v2.1 => v2.4}/manifests/get-started/composition/fn-pythonic.yaml (100%) rename content/{v2.1 => v2.4}/manifests/get-started/composition/xrd.yaml (100%) rename content/{v2.1 => v2.4}/manifests/get-started/managed-resources/bucket.yaml (100%) rename content/{v2.1 => v2.4}/manifests/get-started/managed-resources/provider.yaml (100%) rename content/{v2.1 => v2.4}/manifests/get-started/managed-resources/providerconfig.yaml (100%) rename content/{v2.1 => v2.4}/manifests/get-started/operations/function.yaml (100%) rename content/{v2.1 => v2.4}/manifests/get-started/operations/ingress-rbac.yaml (100%) rename content/{v2.1 => v2.4}/manifests/get-started/operations/ingress.yaml (100%) rename content/{v2.1 => v2.4}/manifests/get-started/operations/operation.yaml (100%) rename content/{v2.1 => v2.4}/manifests/guides/change-logs/deploymentruntimeconfig-enable-changelogs.yaml (100%) rename content/{v2.1 => v2.4}/manifests/guides/change-logs/object-configmap-for-changelogs.yaml (100%) rename content/{v2.1 => v2.4}/manifests/guides/change-logs/provider-kubernetes.yaml (100%) rename content/{v2.1 => v2.4}/manifests/guides/change-logs/rbac.yaml (100%) rename content/{v2.1 => v2.4}/manifests/guides/connection-details-composition/composition-go-templating.yaml (100%) rename content/{v2.1 => v2.4}/manifests/guides/connection-details-composition/composition-kcl.yaml (100%) rename content/{v2.1 => v2.4}/manifests/guides/connection-details-composition/composition-patch-and-transform.yaml (100%) rename content/{v2.1 => v2.4}/manifests/guides/connection-details-composition/composition-python.yaml (99%) rename content/{v2.1 => v2.4}/manifests/guides/connection-details-composition/composition-pythonic.yaml (94%) rename content/{v2.1 => v2.4}/manifests/guides/connection-details-composition/fn-auto-ready.yaml (100%) rename content/{v2.1 => v2.4}/manifests/guides/connection-details-composition/fn-go-templating.yaml (100%) rename content/{v2.1 => v2.4}/manifests/guides/connection-details-composition/fn-kcl.yaml (100%) rename content/{v2.1 => v2.4}/manifests/guides/connection-details-composition/fn-patch-and-transform.yaml (100%) rename content/{v2.1 => v2.4}/manifests/guides/connection-details-composition/fn-python.yaml (100%) rename content/{v2.1 => v2.4}/manifests/guides/connection-details-composition/fn-pythonic.yaml (100%) rename content/{v2.1 => v2.4}/manifests/guides/connection-details-composition/my-keys.yaml (100%) rename content/{v2.1 => v2.4}/manifests/guides/connection-details-composition/xrd.yaml (100%) rename content/{v2.1 => v2.4}/manifests/guides/disabling-unused-managed-resources/activation-policy.yaml (100%) rename content/{v2.1 => v2.4}/manifests/guides/disabling-unused-managed-resources/provider.yaml (100%) create mode 100644 content/v2.4/manifests/guides/scalable-composition/composition-scale.yaml create mode 100644 content/v2.4/manifests/guides/scalable-composition/fn-auto-ready.yaml create mode 100644 content/v2.4/manifests/guides/scalable-composition/fn-pat.yaml create mode 100644 content/v2.4/manifests/guides/scalable-composition/xrd-scale.yaml rename content/{v2.1 => v2.4}/operations/_index.md (100%) rename content/{v2.1 => v2.4}/operations/cronoperation.md (100%) rename content/{v2.1 => v2.4}/operations/operation.md (95%) rename content/{v2.1 => v2.4}/operations/watchoperation.md (100%) rename content/{v2.1 => v2.4}/packages/_index.md (100%) rename content/{v2.1 => v2.4}/packages/configurations.md (99%) rename content/{v2.1 => v2.4}/packages/functions.md (100%) rename content/{v2.1 => v2.4}/packages/image-configs.md (83%) rename content/{v2.1 => v2.4}/packages/providers.md (88%) rename content/{v2.1 => v2.4}/whats-crossplane/_index.md (100%) rename content/{v2.1 => v2.4}/whats-new/_index.md (100%) diff --git a/config.yaml b/config.yaml index 7484a7429..17bf050ae 100644 --- a/config.yaml +++ b/config.yaml @@ -94,7 +94,7 @@ security: # Global parameters accessible by any Page params: # The current "latest" version. Used in the version dropdown - latest: "2.3" + latest: "2.4" # The current "latest" version of the CLI docs. Used in the CLI version # dropdown. cliLatest: "2.4" diff --git a/content/cli/v2.1/_index.md b/content/cli/v2.1/_index.md deleted file mode 100644 index 6be6e03fb..000000000 --- a/content/cli/v2.1/_index.md +++ /dev/null @@ -1,74 +0,0 @@ ---- -weight: 50 -title: CLI Overview -description: "Command-line tools for Crossplane development" -cascade: - version: "2.1" ---- - -The Crossplane CLI helps simplify some development and administration aspects of -Crossplane. - -The Crossplane CLI includes: -* tools to build, install, update and push Crossplane Packages -* standalone Composition Function testing and rendering without the need to access a Kubernetes cluster running Crossplane -* troubleshoot Crossplane Compositions, Composite Resources and Managed Resources - -## Installing the CLI - -The Crossplane CLI is a single standalone binary with no external dependencies. - -{{}} -Install the Crossplane CLI on a user's computer. - -Most Crossplane CLI commands are independent of Kubernetes and -don't require access to a Crossplane pod. -{{< /hint >}} - -To download the latest version for your CPU architecture with the Crossplane -install script. - -```shell -curl -sL "https://raw.githubusercontent.com/crossplane/crossplane/main/install.sh" | sh -``` - -[The script](https://raw.githubusercontent.com/crossplane/crossplane/main/install.sh) -detects your CPU architecture and downloads the latest stable release. - -{{}} - -If you don't want to run shell script you can manually download a binary from -the Crossplane releases repository at -https://releases.crossplane.io/stable/current/bin - -{{}} - -The release repository names the CLI `crank`. Download this file. - - -The `crossplane` binary is the Kubernetes Crossplane pod image. -{{< /hint >}} - -Move the binary to a location in your `$PATH`, for example `/usr/local/bin`. -{{< /expand >}} - -### Download other CLI versions - -Download different Crossplane CLI versions or different release branches with -the `XP_CHANNEL` and `XP_VERSION` environmental variables. - -By default the CLI installs from the `XP_CHANNEL` named `stable` and the -`XP_VERSION` of `current`, matching the most recent stable release. - -For example, to install CLI version `v1.20.0` add `XP_VERSION=v1.20.0` to the -download script curl command: - -```shell -curl -sL "https://raw.githubusercontent.com/crossplane/crossplane/main/install.sh" | XP_VERSION=v1.20.0 sh -``` - -To install the CLI from the `master` channel add `XP_CHANNEL=master`: - -```shell -curl -sL "https://raw.githubusercontent.com/crossplane/crossplane/main/install.sh" | XP_CHANNEL=master sh -``` diff --git a/content/cli/v2.1/command-reference.md b/content/cli/v2.1/command-reference.md deleted file mode 100644 index 88d83644c..000000000 --- a/content/cli/v2.1/command-reference.md +++ /dev/null @@ -1,1101 +0,0 @@ ---- -weight: 100 -title: Command Reference -description: "Command reference for the Crossplane CLI" ---- - - - -The `crossplane` CLI provides utilities to make using Crossplane easier. - -Read the [Crossplane CLI overview]({{}}) page for information on -installing `crossplane`. - -## Global flags - -The following flags are available for all commands. - -{{< table "table table-sm table-striped">}} - -| Short flag | Long flag | Description | -|------------|-------------|------------------------------| -| `-h` | `--help` | Show context sensitive help. | -| | `--verbose` | Print verbose output. | - -{{< /table >}} - - - -## version - - - -The `crossplane version` command returns the version of Crossplane CLI -and the control plane. - -```shell -crossplane version -Client Version: v1.17.0 -Server Version: v1.17.0 -``` - - -## render - - -The `crossplane render` command previews the output of a -[composite resource]({{}}) after applying -any [composition functions]({{}}). - -{{< hint "important" >}} -The `crossplane render` command requires you to use composition functions. -{{< /hint >}} - -The `crossplane render` command connects to the locally running Docker -Engine to pull and run composition functions. - -{{}} -Running `crossplane render` requires [Docker](https://www.docker.com/). -{{< /hint >}} - -Provide a composite resource, composition and composition function YAML -definition with the command to render the output locally. - -For example, -`crossplane render xr.yaml composition.yaml function.yaml` - -The output includes the original composite resource followed by the generated -managed resources. - -{{}} - -```yaml ---- -apiVersion: nopexample.org/v1 -kind: XBucket -metadata: - name: test-xrender -status: - bucketRegion: us-east-2 ---- -apiVersion: s3.aws.m.upbound.io/v1beta1 -kind: Bucket -metadata: - annotations: - crossplane.io/composition-resource-name: my-bucket - generateName: test-xrender- - labels: - crossplane.io/composite: test-xrender - namespace: default - ownerReferences: - - apiVersion: nopexample.org/v1 - blockOwnerDeletion: true - controller: true - kind: XBucket - name: test-xrender - uid: "" -spec: - forProvider: - region: us-east-2 -``` - -{{< /expand >}} - -### Flags - -{{< table "table table-sm table-striped">}} - -| Short flag | Long flag | Description | -| ------------ | ------------- | ------------------------------ | -| | `--context-files==,=` | A comma separated list of files to load for function "contexts." | -| | `--context-values==,=` | A comma separated list of key-value pairs to load for function "contexts." | -| `-r` | `--include-function-results` | Include the "results" or events from the function. | -| `-o` | `--observed-resources=` | Provide artificial managed resource data to the function. | -| `-e` | `--extra-resources=PATH` | A YAML file or directory of YAML files specifying extra resources to pass to the Function pipeline. | -| `-c` | `--include-context` | Include the context in the rendered output as a resource of kind: Context. | -| `-x` | `--include-full-xr` | Include a copy of the input Composite Resource spec and metadata fields in the rendered output. | -| | `--timeout=` | Amount of time to wait for a function to finish. (Default 1 minute) | - -{{< /table >}} - -The `crossplane render` command relies on standard -[Docker environmental variables](https://docs.docker.com/engine/reference/commandline/cli/#environment-variables) -to connect to the local Docker Engine and run composition functions. - -### Provide function context - -The `--context-files` and `--context-values` flags can provide data -to a function's `context`. -The context is JSON formatted data. - -### Include function results - -If a function produces Kubernetes events with statuses use the -`--include-function-results` to print them along with the managed resource -outputs. - -### Include the composite resource - -Composition functions can only change the `status` field of a composite -resource. By default, the `crossplane render` command only prints the -`status` field with `metadata.name`. - -Use `--include-full-xr` to print the full composite resource, -including the `spec` and `metadata` fields. - -### Mock managed resources - -Provide mocked, or artificial data representing a managed resource with -`--observed-resources`. The `crossplane render` command treats the -provided inputs as if they were resources in a Crossplane cluster. - -A function can reference and manipulate the included resource as part of -running the function. - -The `observed-resources` may be a single YAML file with multiple resources or a -directory of YAML files representing multiple resources. - -Inside the YAML file include an -{{}}apiVersion{{}}, -{{}}kind{{}}, -{{}}metadata{{}} and -{{}}spec{{}}. - -```yaml {label="apiVersion"} -apiVersion: example.org/v1alpha1 -kind: ComposedResource -metadata: - name: test-render-b - annotations: - crossplane.io/composition-resource-name: resource-b -spec: - coolerField: "I'm cooler!" -``` - -The schema of the resource isn't validated and may contain any data. - -### Mock extra resources - -Extra Resources allow a Composition to request Crossplane Objects on the cluster that aren't -part of the Composition. The `--extra-resources` option points at a directory containing -YAML manifests of resources to mock. Use Extra Resources in combination with a function like -[function-extra-resources](https://github.com/crossplane-contrib/function-extra-resources) or the -built-in support in [function-go-templating](https://github.com/crossplane-contrib/function-go-templating?tab=readme-ov-file#extraresources). - - -## xpkg - - -The `crossplane xpkg` commands create, install and update Crossplane -[packages]({{}}) and enable authentication -and publishing of Crossplane packages to a Crossplane package registry. - - -### xpkg build - - -Using `crossplane xpkg build` provides automation and simplification to build -Crossplane packages. - -The Crossplane CLI combines a directory of YAML files and packages them as -an [OCI container image](https://opencontainers.org/). - -The CLI applies the required annotations and values to meet the -[Crossplane XPKG specification](https://github.com/crossplane/crossplane/blob/main/contributing/specifications/xpkg.md). - -The `crossplane` CLI supports building -[configuration]({{< ref "/v2.1/packages/configurations" >}}), -[function]({{}}) and -[provider]({{}}) package types. - -#### Flags - -{{< table "table table-sm table-striped">}} - -| Short flag | Long flag | Description | -| ------------ | ------------- | ------------------------------ | -| | `--embed-runtime-image=NAME` | The image name and tag of an image to include in the package. Only for provider and function packages. | -| | `--embed-runtime-image-tarball=PATH` | The filename of an image to include in the package. Only for provider and function packages. | -| `-e` | `--examples-root="./examples"` | The path to a directory of examples related to the package. | -| | `--ignore=PATH,...` | List of files and directories to ignore. | -| `-o` | `--package-file=PATH` | Directory and filename of the created package. | -| `-f` | `--package-root="."` | Directory to search for YAML files. | -{{< /table >}} - -The `crossplane xpkg build` command recursively looks in the directory set by -`--package-root` and attempts to combine any files ending in `.yml` or `.yaml` -into a package. - -All YAML files must be valid Kubernetes manifests with `apiVersion`, `kind`, -`metadata` and `spec` fields. - -#### Ignore files - -Use `--ignore` to provide a list of files and directories to ignore. - -For example, -`crossplane xpkg build --ignore="./test/*,kind-config.yaml"` - -#### Set the package name - -`crossplane` automatically names the new package a combination of the -`metadata.name` and a hash of the package contents and saves the contents -in the same location as `--package-root`. Define a specific location and -filename with `--package-file` or `-o`. - -For example, -`crossplane xpkg build -o /home/crossplane/example.xpkg`. - - -#### Include examples - -Include YAML files demonstrating how to use the package with `--examples-root`. - -#### Include a runtime image - -Functions and Providers require YAML files describing their dependencies and -settings and a container image for their runtime. - -Using `--embed-runtime-image` runs a specified image and -includes the image inside the function or provider package. - -{{}} -Images referenced with `--embed-runtime-image` must be in the local Docker -cache. - -Use `docker pull` to download a missing image. -{{< /hint >}} - -The `--embed-runtime-image-tarball` flag includes a local OCI image tarball -inside the function or provider package. - - -### xpkg init - - -The `crossplane xpkg init` command populates the current directory with -files to build a package. - -Provide a name to use for the package and the package template to start from -with the command -`crossplane xpkg init