Skip to content

Commit

Permalink
WIP: Merge functions guide into Composition guide
Browse files Browse the repository at this point in the history
Everything P&T specific is moving out into a guide on
function-patch-and-transform.

Signed-off-by: Nic Cope <nicc@rk0n.org>
  • Loading branch information
negz committed Aug 20, 2024
1 parent a04bc4e commit c0851d2
Show file tree
Hide file tree
Showing 11 changed files with 1,712 additions and 1,935 deletions.
13 changes: 6 additions & 7 deletions content/master/cli/command-reference.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ Server Version: v1.16.0

The `crossplane render` command previews the output of a
[composite resource]({{<ref "../concepts/composite-resources">}}) after applying
any [composition functions]({{<ref "../concepts/composition-functions">}}).
any [composition functions]({{<ref "../concepts/compositions">}}).

{{< hint "important" >}}
The `crossplane render` requires you to use composition functions.
Expand Down Expand Up @@ -180,7 +180,7 @@ The CLI applies the required annotations and values to meet the

The `crossplane` CLI supports building
[configuration]({{< ref "../concepts/packages" >}}),
[function]({{<ref "../concepts/composition-functions">}}) and
[function]({{<ref "../concepts/compositions">}}) and
[provider]({{<ref "../concepts/providers" >}}) package types.


Expand Down Expand Up @@ -259,8 +259,8 @@ The `<name>` input isn't used. Crossplane reserves the `<name>` for future relea

The `<template>` value may be one of four well known templates:
* `configuration-template` - A template to build a Crossplane [Configuration]({{<ref "../concepts/packages">}}) from the [crossplane/configuration-template](https://github.com/crossplane/configuration-template) repository.
* `function-template-go` - A template to build Crossplane Go [composition functions]({{<ref "../concepts/composition-functions">}}) from the [crossplane/function-template-go](https://github.com/crossplane/function-template-go) repository.
* `function-template-python` - A template to build Crossplane Python [composition functions]({{<ref "../concepts/composition-functions">}}) from the [crossplane/function-template-python](https://github.com/crossplane/function-template-go) repository.
* `function-template-go` - A template to build Crossplane Go [composition functions]({{<ref "../concepts/compositions">}}) from the [crossplane/function-template-go](https://github.com/crossplane/function-template-go) repository.
* `function-template-python` - A template to build Crossplane Python [composition functions]({{<ref "../concepts/compositions">}}) from the [crossplane/function-template-python](https://github.com/crossplane/function-template-go) repository.
* `provider-template` - A template to build a basic Crossplane provider from the [Crossplane/provider-template](https://github.com/crossplane/provider-template) repository.
* `provider-template-upjet` - A template for building [Upjet](https://github.com/crossplane/upjet) based Crossplane providers from existing Terraform providers. Copies from the [upbound/upjet-provider-template](https://github.com/upbound/upjet-provider-template) repository.

Expand Down Expand Up @@ -516,9 +516,8 @@ converts a Crossplane resource to a new version or kind.
Use the `crossplane beta convert` command to convert an existing
[ControllerConfig]({{<ref "../concepts/providers#controller-configuration">}})
to a [DeploymentRuntimeConfig]({{<ref "../concepts/providers#runtime-configuration">}})
or a Composition using [patch and transforms]({{<ref "../concepts/patch-and-transform">}})
to a
[Composition pipeline function]({{< ref "../concepts/compositions#use-composition-functions" >}}).
or a legacy Composition using `mode: Resources` to a
[Composition pipeline function]({{< ref "../concepts/compositions" >}}).

Provide the `crossplane beta convert` command the conversion type, the input
file and optionally, an output file. By default the command writes the output to
Expand Down
10 changes: 0 additions & 10 deletions content/master/concepts/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,16 +55,6 @@ building and managing external resources through Kubernetes.
Composite Resource. Platform users create Claims in their unique namespace,
isolating their resources from other teams in other namespaces.

* [**Composition Functions**]({{<ref "./composition-functions">}}) are custom
programs, written your programming language of choice, to apply logic and
loops before or after Crossplane creates resources.

* [**Patches and Transforms**]({{<ref "./patch-and-transform">}}) allow platform
engineers to use user inputs to their custom API and change how Crossplane
creates resources. Patches and transforms allow for flexible and
abstract inputs like `big` or `encrypted` to have specific meanings when
creating the actual managed resources.

* [**EnvironmentConfigs**]({{<ref "./environment-configs">}}) are an in-memory
data store, like a Kubernetes ConfigMap. EnvironmentConfigs are useful for
custom resource mapping or storing and retrieving data across Claims and
Expand Down
5 changes: 4 additions & 1 deletion content/master/concepts/composite-resources.md
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,10 @@ spec:
toFieldPath: metadata.annotations
```
For more information on patching resources refer to the [Patch and Transform]({{<ref "./patch-and-transform">}}) documentation.
For more information on using `function-patch-and-transform` to patch
resources refer to the
[Function Patch and Transform]({{<ref "../guides/function-patch-and-transform">}})
documentation.

### Composition selection

Expand Down
Loading

0 comments on commit c0851d2

Please sign in to comment.