mirror of https://github.com/crossplane/docs.git
Link to latest docs
This seems like the most future-proof option for this guide, which lives outside of any version. Signed-off-by: Nic Cope <nicc@rk0n.org>
This commit is contained in:
parent
acf6be56d4
commit
5cda5e3e2a
|
@ -11,7 +11,7 @@ Composition functions (or just functions, for short) are custom programs that
|
||||||
template Crossplane resources. Crossplane calls composition functions to
|
template Crossplane resources. Crossplane calls composition functions to
|
||||||
determine what resources it should create when you create a composite resource
|
determine what resources it should create when you create a composite resource
|
||||||
(XR). Read the
|
(XR). Read the
|
||||||
[concepts]({{<ref "../../master/concepts/composition-functions">}})
|
[concepts](https://docs.crossplane.io/latest/concepts/composition-functions)
|
||||||
page to learn more about composition functions.
|
page to learn more about composition functions.
|
||||||
|
|
||||||
You can write a function to template resources using a general purpose
|
You can write a function to template resources using a general purpose
|
||||||
|
@ -22,7 +22,7 @@ conditionals. This guide explains how to write a composition function in
|
||||||
|
|
||||||
{{< hint "important" >}}
|
{{< hint "important" >}}
|
||||||
It helps to be familiar with
|
It helps to be familiar with
|
||||||
[how composition functions work]({{<ref "../../master/concepts/composition-functions#how-composition-functions-work">}})
|
[how composition functions work](https://docs.crossplane.io/latest/concepts/composition-functions#how-composition-functions-work)
|
||||||
before following this guide.
|
before following this guide.
|
||||||
{{< /hint >}}
|
{{< /hint >}}
|
||||||
|
|
||||||
|
@ -69,8 +69,8 @@ To write a function in Go you need:
|
||||||
|
|
||||||
* [Go](https://go.dev/dl/) 1.21 or newer. The guide uses Go 1.21.
|
* [Go](https://go.dev/dl/) 1.21 or newer. The guide uses Go 1.21.
|
||||||
* [Docker Engine](https://docs.docker.com/engine/). This guide uses Engine v24.
|
* [Docker Engine](https://docs.docker.com/engine/). This guide uses Engine v24.
|
||||||
* The [Crossplane CLI](https://github.com/crossplane/docs/pull/584) v1.14 or
|
* The [Crossplane CLI](https://docs.crossplane.io/latest/cli) v1.14 or newer. This guide uses Crossplane
|
||||||
newer. This guide uses Crossplane CLI v1.14.
|
CLI v1.14.
|
||||||
|
|
||||||
You don't need access to a Kubernetes cluster or a Crossplane control plane to
|
You don't need access to a Kubernetes cluster or a Crossplane control plane to
|
||||||
build or test a composition function.
|
build or test a composition function.
|
||||||
|
@ -132,7 +132,7 @@ should delete the `input` and `package/input` directories.
|
||||||
|
|
||||||
The `input` directory defines a Go struct that a function can use to take input,
|
The `input` directory defines a Go struct that a function can use to take input,
|
||||||
using the `input` field from a Composition. The
|
using the `input` field from a Composition. The
|
||||||
[composition functions]({{<ref "../../master/concepts/composition-functions">}})
|
[composition functions](https://docs.crossplane.io/latest/concepts/composition-functions)
|
||||||
documentation explains how to pass an input to a composition function.
|
documentation explains how to pass an input to a composition function.
|
||||||
|
|
||||||
The `package/input` directory contains an OpenAPI schema generated from the
|
The `package/input` directory contains an OpenAPI schema generated from the
|
||||||
|
@ -732,7 +732,7 @@ spec:
|
||||||
|
|
||||||
{{<hint "tip">}}
|
{{<hint "tip">}}
|
||||||
Read the composition functions documentation to learn more about
|
Read the composition functions documentation to learn more about
|
||||||
[testing composition functions]({{<ref "../../master/concepts/composition-functions#test-a-composition-that-uses-functions">}}).
|
[testing composition functions](https://docs.crossplane.io/latest/composition-functions#test-a-composition-that-uses-functions).
|
||||||
{{</hint>}}
|
{{</hint>}}
|
||||||
|
|
||||||
## Build and push the function to a package registry
|
## Build and push the function to a package registry
|
||||||
|
@ -749,7 +749,7 @@ then pushing all the packages to a single tag in the registry.
|
||||||
|
|
||||||
Pushing your function to a registry allows you to use your function in a
|
Pushing your function to a registry allows you to use your function in a
|
||||||
Crossplane control plane. See the
|
Crossplane control plane. See the
|
||||||
[composition functions documentation]({{<ref "../../master/concepts/composition-functions">}}).
|
[composition functions documentation](https://docs.crossplane.io/latest/concepts/composition-functions).
|
||||||
to learn how to use a function in a control plane.
|
to learn how to use a function in a control plane.
|
||||||
|
|
||||||
Use Docker to build a runtime for each platform.
|
Use Docker to build a runtime for each platform.
|
||||||
|
@ -800,7 +800,7 @@ crossplane xpkg build \
|
||||||
|
|
||||||
{{<hint "tip">}}
|
{{<hint "tip">}}
|
||||||
Crossplane packages are special OCI images. Read more about packages in the
|
Crossplane packages are special OCI images. Read more about packages in the
|
||||||
[packages documentation]({{<ref "../../master/concepts/packages">}}).
|
[packages documentation](https://docs.crossplane.io/latest/concepts/packages).
|
||||||
{{</hint>}}
|
{{</hint>}}
|
||||||
|
|
||||||
Push both package files to a registry. Pushing both files to one tag in the
|
Push both package files to a registry. Pushing both files to one tag in the
|
||||||
|
|
|
@ -8,3 +8,4 @@ IgnoreURLs:
|
||||||
- "www.googletagmanager.com/*" # Ignore google tag manager
|
- "www.googletagmanager.com/*" # Ignore google tag manager
|
||||||
- "twitter.com/*" # Ignore twitter links since they send to login page
|
- "twitter.com/*" # Ignore twitter links since they send to login page
|
||||||
- "https://releases.crossplane.io/stable/current/bin" # S3 bucket listing always returns 404 status even with directory listing
|
- "https://releases.crossplane.io/stable/current/bin" # S3 bucket listing always returns 404 status even with directory listing
|
||||||
|
- "docs.crossplane.io/latest/*" # Allow links to the latest release (e.g. from knowledge-base)
|
||||||
|
|
Loading…
Reference in New Issue