diff --git a/content/cli/master/command-reference.md b/content/cli/master/command-reference.md index 1a04d76f7..d52441973 100644 --- a/content/cli/master/command-reference.md +++ b/content/cli/master/command-reference.md @@ -11,7 +11,7 @@ description: "Command reference for the Crossplane CLI" -This documentation is for the `crossplane` CLI `v2.6.0-rc.0.12.gba5d263`. +This documentation is for the `crossplane` CLI `v2.6.0-rc.0.148.g833d6e0`. @@ -373,6 +373,15 @@ When running `render` in a Crossplane Project (any directory containing a file argument in favor of using function dependencies defined in the project metadata and embedded functions from the project. +#### Configuration package support + +The `--project-file` (`-f`) flag also accepts a Configuration package metadata +file (`crossplane.yaml`). +`render` detects the file type automatically from `apiVersion` and `kind`. +When pointing to a Configuration, `render` extracts function dependencies from +`spec.dependsOn` and resolves their version constraints to concrete OCI +references. + #### Function context The `--context-files` and `--context-values` flags pass data to each Function's @@ -488,6 +497,13 @@ crossplane composition render xr.yaml composition.yaml functions.yaml \ -a render.crossplane.io/runtime-development-target=localhost:9444 ``` +Render using functions from a Configuration package metadata file: + +```shell +crossplane composition render xr.yaml composition.yaml \ + -f crossplane.yaml +``` + #### Usage ``` @@ -525,7 +541,7 @@ crossplane composition render [] [ | `-a` | `--function-annotations=KEY=VALUE,...` | Override function annotations for all functions. Provide multiple annotations by repeating the argument. | | | `--cache-dir=STRING` | Directory for cached xpkg package contents. | | | `--max-concurrency=8` | Maximum concurrency for building embedded functions. | -| `-f` | `--project-file="crossplane-project.yaml"` | Path to the project file. Optional. | +| `-f` | `--project-file=STRING` | Path to the project file or package metadata file (crossplane.yaml). Autodetects the file type. | | | `--timeout=1m` | How long to run before timing out. | | | `--xrd=PATH` | A YAML file specifying the CompositeResourceDefinition (XRD) that defines the XR's schema and properties. | {{< /table >}} @@ -1156,6 +1172,17 @@ The build reuses the dependency cache populated by `crossplane dependency add` and `crossplane dependency update-cache`. Override the cache location with `--cache-dir` or the `CROSSPLANE_XPKG_CACHE` environment variable. +The CLI builds embedded functions onto a runtime base image from a registry, and +caches those image layers on disk under `crossplane/base-images` in your user +cache directory. A build that needs a layer already in the cache reads it +locally rather than downloading it again, so a build takes longer the first time +it needs a given base image. Projects share the cache. + +Layer filenames are content digests, so a cached layer never goes stale and the +cache never needs invalidating. Nothing prunes it, though, so it grows as base +images change. Delete the directory to reclaim the space; the next build refills +what it needs. + #### Examples Build the project in the current directory: