Skip to content

Commit

Permalink
Add Deployment guide for the example. Renamed the README to DEVELOP.md.
Browse files Browse the repository at this point in the history
Signed-off-by: Tim <[email protected]>
  • Loading branch information
Avarei committed Jun 29, 2024
1 parent 4c3f437 commit 076c239
Show file tree
Hide file tree
Showing 3 changed files with 31 additions and 2 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,9 @@ spec:
### 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
Expand Down
29 changes: 29 additions & 0 deletions pkl/crossplane.contrib.example/DEPLOY.md
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.

0 comments on commit 076c239

Please sign in to comment.