-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #13 from Avarei/main
Improve docs
- Loading branch information
Showing
6 changed files
with
42 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -34,15 +34,15 @@ spec: | |
kind: Pkl | ||
spec: | ||
type: uri | ||
# This pkl file is at `pkl/crossplane-example/full.pkl` in this repo | ||
uri: "package://pkg.pkl-lang.org/github.com/crossplane-contrib/function-pkl/crossplane-[email protected]#/full.pkl" | ||
# This pkl file is at `pkl/crossplane.contrib.example/full.pkl` in this repo | ||
uri: "package://pkg.pkl-lang.org/github.com/crossplane-contrib/function-pkl/crossplane.contrib.[email protected]#/full.pkl" | ||
``` | ||
### Example | ||
see [examples](./example/) | ||
and see [pkl/crossplane.contrib.example/DEPLOY.md](pkl/crossplane.contrib.example/DEPLOY.md) on instructions how to deploy it. | ||
## Creating a new Composition Function | ||
see [pkl/crossplane.contrib.example/README.md](pkl/crossplane.contrib.example/README.md) | ||
see [pkl/crossplane.contrib.example/DEVELOP.md](pkl/crossplane.contrib.example/DEVELOP.md) | ||
## Development | ||
This function uses [Go][go], [Docker][docker], the [Crossplane CLI][cli], and the [Pkl CLI][pkl cli] to build functions | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -16,5 +16,5 @@ spec: | |
kind: Pkl | ||
spec: | ||
type: uri | ||
# This pkl file is at `pkl/crossplane-example/full.pkl` in this repo | ||
uri: "package://pkg.pkl-lang.org/github.com/crossplane-contrib/function-pkl/crossplane-[email protected]#/full.pkl" | ||
# This pkl file is at `pkl/crossplane.contrib.example/full.pkl` in this repo | ||
uri: "package://pkg.pkl-lang.org/github.com/crossplane-contrib/function-pkl/crossplane.contrib.[email protected]#/full.pkl" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -16,14 +16,14 @@ spec: | |
kind: Pkl | ||
spec: | ||
type: inline | ||
# This pkl file is at `pkl/crossplane-example/full.pkl` in this repo | ||
# This pkl file is at `pkl/crossplane.contrib.example/full.pkl` in this repo | ||
inline: | | ||
amends "package://pkg.pkl-lang.org/github.com/crossplane-contrib/function-pkl/[email protected]#/CompositionResponse.pkl" | ||
import "package://pkg.pkl-lang.org/github.com/crossplane-contrib/function-pkl/[email protected]#/Resource.pkl" | ||
import "package://pkg.pkl-lang.org/github.com/crossplane-contrib/function-pkl/[email protected]#/Crossplane.pkl" | ||
amends "package://pkg.pkl-lang.org/github.com/crossplane-contrib/function-pkl/crossplane.contrib@1.0.0#/CompositionResponse.pkl" | ||
import "package://pkg.pkl-lang.org/github.com/crossplane-contrib/function-pkl/crossplane.contrib@1.0.0#/Resource.pkl" | ||
import "package://pkg.pkl-lang.org/github.com/crossplane-contrib/function-pkl/crossplane.contrib@1.0.0#/Crossplane.pkl" | ||
import "package://pkg.pkl-lang.org/github.com/crossplane-contrib/function-pkl/crossplane-[email protected]#/crds/XR.pkl" | ||
import "package://pkg.pkl-lang.org/github.com/crossplane-contrib/function-pkl/crossplane-[email protected]#/crds/Object.pkl" | ||
import "package://pkg.pkl-lang.org/github.com/crossplane-contrib/function-pkl/crossplane.contrib.[email protected]#/crds/XR.pkl" | ||
import "package://pkg.pkl-lang.org/github.com/crossplane-contrib/function-pkl/crossplane.contrib.[email protected]#/crds/Object.pkl" | ||
import "package://pkg.pkl-lang.org/pkl-k8s/[email protected]#/api/core/v1/ConfigMap.pkl" | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
# Deploying this Example | ||
|
||
## Prerequirements | ||
* pkl cli | ||
* crossplane in a cluster | ||
* function-pkl deployed (see [here](../../README.md)) | ||
* provider-kubernetes deployed | ||
* provider config for kubernetes provider called "default" | ||
|
||
## Deploy XRD | ||
```shell | ||
cd pkl/pkl/crossplane.contrib.example | ||
pkl eval xrds/ExampleXR.pkl | kubectl apply -f - | ||
``` | ||
## Deploy Composition | ||
```shell | ||
kubectl apply -f ../../example/full/composition.yaml | ||
``` | ||
## Deploy XR | ||
```shell | ||
kubectl apply -f ../../example/full/xr.yaml | ||
``` | ||
|
||
## Check the Resource | ||
```shell | ||
kubectl get xrs.example.crossplane.io example-xr -oyaml | ||
|
||
crossplane beta trace xrs example-xr | ||
``` |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters