Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cleanup spaces in composition-functions.md #794

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
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
46 changes: 23 additions & 23 deletions content/v1.14/concepts/composition-functions.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ alphaVersion: "1.11"
betaVersion: "1.14"
weight: 80
description: "Composition Functions allow you to template resources using general-purpose programming languages"
aliases:
aliases:
- /knowledge-base/guides/composition-functions
---

Expand Down Expand Up @@ -88,45 +88,45 @@ Crossplane has four core components that users commonly mix up:
* [Composition]({{<ref "./compositions">}}) - A template to define how to create
resources.
* [CompositeResourceDefinition]({{<ref "./composite-resource-definitions">}})
(`XRD`) - A custom API specification.
(`XRD`) - A custom API specification.
* [Composite Resource]({{<ref "./composite-resources">}}) (`XR`) - Created by
using the custom API defined in a CompositeResourceDefinition. XRs use the
Composition template to create new managed resources.
Composition template to create new managed resources.
* [Claim]({{<ref "./claims" >}}) (`XRC`) - Like a Composite Resource, but with
namespace scoping.
namespace scoping.
{{</expand >}}

To use composition functions set the Composition
To use composition functions set the Composition
{{<hover label="single" line="6">}}mode{{</hover>}} to
{{<hover label="single" line="6">}}Pipeline{{</hover>}}.

Define a {{<hover label="single" line="7">}}pipeline{{</hover>}} of
{{<hover label="single" line="8">}}steps{{</hover>}}. Each
{{<hover label="single" line="8">}}step{{</hover>}} calls a Function.
Define a {{<hover label="single" line="7">}}pipeline{{</hover>}} of
{{<hover label="single" line="8">}}steps{{</hover>}}. Each
{{<hover label="single" line="8">}}step{{</hover>}} calls a Function.

Each {{<hover label="single" line="8">}}step{{</hover>}} uses a
Each {{<hover label="single" line="8">}}step{{</hover>}} uses a
{{<hover label="single" line="9">}}functionRef{{</hover>}} to reference the
{{<hover label="single" line="10">}}name{{</hover>}} of the Function to call.
{{<hover label="single" line="10">}}name{{</hover>}} of the Function to call.

{{<hint "important" >}}
Compositions using {{<hover label="single" line="6">}}mode: Pipeline{{</hover>}}
can't specify resource templates with a `resources` field.
Compositions using {{<hover label="single" line="6">}}mode: Pipeline{{</hover>}}
can't specify resource templates with a `resources` field.

Use function "Patch and Transform" to create resource templates.
{{< /hint >}}


Some Functions also allow you to specify an
{{<hover label="single" line="11">}}input{{</hover>}}.
Some Functions also allow you to specify an
{{<hover label="single" line="11">}}input{{</hover>}}.
The function defines the
{{<hover label="single" line="13">}}kind{{</hover>}} of input.

This example uses
[Function Patch and Transform](https://github.com/crossplane-contrib/function-patch-and-transform).
[Function Patch and Transform](https://github.com/crossplane-contrib/function-patch-and-transform).
Function Patch and Transform implements Crossplane resource
templates.
The input kind is {{<hover label="single" line="13">}}Resources{{</hover>}},
and it accepts [Patch and Transform]({{<ref "./patch-and-transform">}})
templates.
The input kind is {{<hover label="single" line="13">}}Resources{{</hover>}},
and it accepts [Patch and Transform]({{<ref "./patch-and-transform">}})
{{<hover label="single" line="14">}}resources{{</hover>}} as input.

```yaml {label="single",copy-lines="none"}
Expand Down Expand Up @@ -163,7 +163,7 @@ calls them all. It calls them in the order they appear in the pipeline.
Crossplane passes each Function in the pipeline the result of the previous
Function. This enables powerful combinations of Functions. In this example,
Crossplane calls {{<hover label="double" line="10">}}function-cue{{</hover>}} to
create an S3 bucket. Crossplane then passes the bucket to
create an S3 bucket. Crossplane then passes the bucket to
{{<hover label="double" line="23">}}function-auto-ready{{</hover>}}, which marks the
composite resource as ready when the bucket becomes ready.

Expand Down Expand Up @@ -212,7 +212,7 @@ Running `crossplane beta render` requires [Docker](https://www.docker.com).
{{< /hint >}}

Provide a composite resource, composition and composition functions to render
the output locally.
the output locally.

```shell
crossplane beta render xr.yaml composition.yaml functions.yaml
Expand Down Expand Up @@ -454,8 +454,8 @@ $ crossplane xpkg push -f package/*.xpkg crossplane-contrib/function-example:v0.
```

{{<hint "tip">}}
Crossplane has a
[guide to writing a composition function in Go]({{<ref "../guides/write-a-composition-function-in-go">}}).
Crossplane has a
[guide to writing a composition function in Go]({{<ref "../guides/write-a-composition-function-in-go">}}).
{{</hint>}}

When you're writing a composition function it's useful to know how composition
Expand Down Expand Up @@ -514,7 +514,7 @@ which composed resources it should create or update.
A _composed_ resource is a resource created by a composite resource. Composed
resources are usually Crossplane managed resources (MRs), but they can be any
kind of Crossplane resource. For example a composite resource could also create
a ProviderConfig, or another kind of composite resource.
a ProviderConfig, or another kind of composite resource.
<!-- vale write-good.Weasel = YES -->
{{</hint>}}

Expand Down
44 changes: 22 additions & 22 deletions content/v1.15/concepts/composition-functions.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ alphaVersion: "1.11"
betaVersion: "1.14"
weight: 80
description: "Composition Functions allow you to template resources using general-purpose programming languages"
aliases:
aliases:
- /knowledge-base/guides/composition-functions
---

Expand Down Expand Up @@ -88,45 +88,45 @@ Crossplane has four core components that users commonly mix up:
* [Composition]({{<ref "./compositions">}}) - A template to define how to create
resources.
* [CompositeResourceDefinition]({{<ref "./composite-resource-definitions">}})
(`XRD`) - A custom API specification.
(`XRD`) - A custom API specification.
* [Composite Resource]({{<ref "./composite-resources">}}) (`XR`) - Created by
using the custom API defined in a CompositeResourceDefinition. XRs use the
Composition template to create new managed resources.
Composition template to create new managed resources.
* [Claim]({{<ref "./claims" >}}) (`XRC`) - Like a Composite Resource, but with
namespace scoping.
namespace scoping.
{{</expand >}}

To use composition functions set the Composition
To use composition functions set the Composition
{{<hover label="single" line="6">}}mode{{</hover>}} to
{{<hover label="single" line="6">}}Pipeline{{</hover>}}.

Define a {{<hover label="single" line="7">}}pipeline{{</hover>}} of
{{<hover label="single" line="8">}}steps{{</hover>}}. Each
{{<hover label="single" line="8">}}step{{</hover>}} calls a Function.
Define a {{<hover label="single" line="7">}}pipeline{{</hover>}} of
{{<hover label="single" line="8">}}steps{{</hover>}}. Each
{{<hover label="single" line="8">}}step{{</hover>}} calls a Function.

Each {{<hover label="single" line="8">}}step{{</hover>}} uses a
Each {{<hover label="single" line="8">}}step{{</hover>}} uses a
{{<hover label="single" line="9">}}functionRef{{</hover>}} to reference the
{{<hover label="single" line="10">}}name{{</hover>}} of the Function to call.
{{<hover label="single" line="10">}}name{{</hover>}} of the Function to call.

{{<hint "important" >}}
Compositions using {{<hover label="single" line="6">}}mode: Pipeline{{</hover>}}
can't specify resource templates with a `resources` field.
Compositions using {{<hover label="single" line="6">}}mode: Pipeline{{</hover>}}
can't specify resource templates with a `resources` field.

Use function "Patch and Transform" to create resource templates.
{{< /hint >}}


Some Functions also allow you to specify an
{{<hover label="single" line="11">}}input{{</hover>}}.
Some Functions also allow you to specify an
{{<hover label="single" line="11">}}input{{</hover>}}.
The function defines the
{{<hover label="single" line="13">}}kind{{</hover>}} of input.

This example uses
[Function Patch and Transform](https://github.com/crossplane-contrib/function-patch-and-transform).
[Function Patch and Transform](https://github.com/crossplane-contrib/function-patch-and-transform).
Function Patch and Transform implements Crossplane resource
templates.
The input kind is {{<hover label="single" line="13">}}Resources{{</hover>}},
and it accepts [Patch and Transform]({{<ref "./patch-and-transform">}})
templates.
The input kind is {{<hover label="single" line="13">}}Resources{{</hover>}},
and it accepts [Patch and Transform]({{<ref "./patch-and-transform">}})
{{<hover label="single" line="14">}}resources{{</hover>}} as input.

```yaml {label="single",copy-lines="none"}
Expand Down Expand Up @@ -163,7 +163,7 @@ calls them all. It calls them in the order they appear in the pipeline.
Crossplane passes each Function in the pipeline the result of the previous
Function. This enables powerful combinations of Functions. In this example,
Crossplane calls {{<hover label="double" line="10">}}function-cue{{</hover>}} to
create an S3 bucket. Crossplane then passes the bucket to
create an S3 bucket. Crossplane then passes the bucket to
{{<hover label="double" line="23">}}function-auto-ready{{</hover>}}, which marks the
composite resource as ready when the bucket becomes ready.

Expand Down Expand Up @@ -212,7 +212,7 @@ Running `crossplane beta render` requires [Docker](https://www.docker.com).
{{< /hint >}}

Provide a composite resource, composition and composition functions to render
the output locally.
the output locally.

```shell
crossplane beta render xr.yaml composition.yaml functions.yaml
Expand Down Expand Up @@ -533,7 +533,7 @@ Crossplane errors if stability isn't reached after 5 iterations.
A _composed_ resource is a resource created by a composite resource. Composed
resources are usually Crossplane managed resources (MRs), but they can be any
kind of Crossplane resource. For example a composite resource could also create
a ProviderConfig, or another kind of composite resource.
a ProviderConfig, or another kind of composite resource.
<!-- vale write-good.Weasel = YES -->
{{</hint>}}

Expand Down Expand Up @@ -742,4 +742,4 @@ looking for a log line:

If you don't see the log line emitted when Crossplane starts, you have disabled
__extra resources__ for composition functions, which means requests by functions for __extra
resources__ are just ignored.
resources__ are just ignored.
44 changes: 22 additions & 22 deletions content/v1.16/concepts/composition-functions.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ alphaVersion: "1.11"
betaVersion: "1.14"
weight: 80
description: "Composition Functions allow you to template resources using general-purpose programming languages"
aliases:
aliases:
- /knowledge-base/guides/composition-functions
---

Expand Down Expand Up @@ -88,45 +88,45 @@ Crossplane has four core components that users commonly mix up:
* [Composition]({{<ref "./compositions">}}) - A template to define how to create
resources.
* [CompositeResourceDefinition]({{<ref "./composite-resource-definitions">}})
(`XRD`) - A custom API specification.
(`XRD`) - A custom API specification.
* [Composite Resource]({{<ref "./composite-resources">}}) (`XR`) - Created by
using the custom API defined in a CompositeResourceDefinition. XRs use the
Composition template to create new managed resources.
Composition template to create new managed resources.
* [Claim]({{<ref "./claims" >}}) (`XRC`) - Like a Composite Resource, but with
namespace scoping.
namespace scoping.
{{</expand >}}

To use composition functions set the Composition
To use composition functions set the Composition
{{<hover label="single" line="6">}}mode{{</hover>}} to
{{<hover label="single" line="6">}}Pipeline{{</hover>}}.

Define a {{<hover label="single" line="7">}}pipeline{{</hover>}} of
{{<hover label="single" line="8">}}steps{{</hover>}}. Each
{{<hover label="single" line="8">}}step{{</hover>}} calls a Function.
Define a {{<hover label="single" line="7">}}pipeline{{</hover>}} of
{{<hover label="single" line="8">}}steps{{</hover>}}. Each
{{<hover label="single" line="8">}}step{{</hover>}} calls a Function.

Each {{<hover label="single" line="8">}}step{{</hover>}} uses a
Each {{<hover label="single" line="8">}}step{{</hover>}} uses a
{{<hover label="single" line="9">}}functionRef{{</hover>}} to reference the
{{<hover label="single" line="10">}}name{{</hover>}} of the Function to call.
{{<hover label="single" line="10">}}name{{</hover>}} of the Function to call.

{{<hint "important" >}}
Compositions using {{<hover label="single" line="6">}}mode: Pipeline{{</hover>}}
can't specify resource templates with a `resources` field.
Compositions using {{<hover label="single" line="6">}}mode: Pipeline{{</hover>}}
can't specify resource templates with a `resources` field.

Use function "Patch and Transform" to create resource templates.
{{< /hint >}}


Some Functions also allow you to specify an
{{<hover label="single" line="11">}}input{{</hover>}}.
Some Functions also allow you to specify an
{{<hover label="single" line="11">}}input{{</hover>}}.
The function defines the
{{<hover label="single" line="13">}}kind{{</hover>}} of input.

This example uses
[Function Patch and Transform](https://github.com/crossplane-contrib/function-patch-and-transform).
[Function Patch and Transform](https://github.com/crossplane-contrib/function-patch-and-transform).
Function Patch and Transform implements Crossplane resource
templates.
The input kind is {{<hover label="single" line="13">}}Resources{{</hover>}},
and it accepts [Patch and Transform]({{<ref "./patch-and-transform">}})
templates.
The input kind is {{<hover label="single" line="13">}}Resources{{</hover>}},
and it accepts [Patch and Transform]({{<ref "./patch-and-transform">}})
{{<hover label="single" line="14">}}resources{{</hover>}} as input.

```yaml {label="single",copy-lines="none"}
Expand Down Expand Up @@ -163,7 +163,7 @@ calls them all. It calls them in the order they appear in the pipeline.
Crossplane passes each Function in the pipeline the result of the previous
Function. This enables powerful combinations of Functions. In this example,
Crossplane calls {{<hover label="double" line="10">}}function-cue{{</hover>}} to
create an S3 bucket. Crossplane then passes the bucket to
create an S3 bucket. Crossplane then passes the bucket to
{{<hover label="double" line="23">}}function-auto-ready{{</hover>}}, which marks the
composite resource as ready when the bucket becomes ready.

Expand Down Expand Up @@ -212,7 +212,7 @@ Running `crossplane beta render` requires [Docker](https://www.docker.com).
{{< /hint >}}

Provide a composite resource, composition and composition functions to render
the output locally.
the output locally.

```shell
crossplane beta render xr.yaml composition.yaml functions.yaml
Expand Down Expand Up @@ -533,7 +533,7 @@ Crossplane errors if stability isn't reached after 5 iterations.
A _composed_ resource is a resource created by a composite resource. Composed
resources are usually Crossplane managed resources (MRs), but they can be any
kind of Crossplane resource. For example a composite resource could also create
a ProviderConfig, or another kind of composite resource.
a ProviderConfig, or another kind of composite resource.
<!-- vale write-good.Weasel = YES -->
{{</hint>}}

Expand Down Expand Up @@ -742,4 +742,4 @@ looking for a log line:

If you don't see the log line emitted when Crossplane starts, you have disabled
__extra resources__ for composition functions, which means requests by functions for __extra
resources__ are just ignored.
resources__ are just ignored.
Loading