Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 29 additions & 2 deletions content/cli/master/command-reference.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ description: "Command reference for the Crossplane CLI"
<!-- vale Crossplane.Spelling = NO -->
<!-- vale cli-docs = YES -->

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`.


<!-- vale Google.Headings = NO -->
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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

```
Expand Down Expand Up @@ -525,7 +541,7 @@ crossplane composition render <composite-resource> <composition> [<functions>] [
| `-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 >}}
Expand Down Expand Up @@ -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:
Expand Down
Loading