Skip to content

Commit

Permalink
Merge pull request #29 from Avarei/fix/example
Browse files Browse the repository at this point in the history
Fix/example
  • Loading branch information
Avarei authored Jul 7, 2024
2 parents 350d7f2 + 5190972 commit c9f6362
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
7 changes: 3 additions & 4 deletions pkl/crossplane.contrib.example/DEPLOY.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,16 +9,15 @@

## Deploy XRD
```shell
cd pkl/pkl/crossplane.contrib.example
pkl eval xrds/ExampleXR.pkl | kubectl apply -f -
pkl eval package://pkg.pkl-lang.org/github.com/crossplane-contrib/function-pkl/[email protected]#/xrds/ExampleXR.pkl | kubectl apply -f -
```
## Deploy Composition
```shell
pkl eval compositions/uri.pkl | kubectl apply -f -
pkl eval package://pkg.pkl-lang.org/github.com/crossplane-contrib/function-pkl/[email protected]#/compositions/uri.pkl | kubectl apply -f -
```
## Deploy XR
```shell
pkl eval xrs/uri.pkl | kubectl apply -f -
pkl eval package://pkg.pkl-lang.org/github.com/crossplane-contrib/function-pkl/[email protected]#/xrs/uri.pkl | kubectl apply -f -
```

## Check the Resource
Expand Down
6 changes: 4 additions & 2 deletions pkl/crossplane.contrib.example/compositions/uri.pkl
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,9 @@ amends "@crossplane.contrib/Composition.pkl"
import "@crossplane.contrib/Pkl.pkl"

import "../crds/XR.pkl"
import ".../PklProject"
import "steps/full.pkl"

import "pkl:reflect"

metadata {
name = "pkl-uri-example"
Expand All @@ -22,7 +24,7 @@ spec {
input = new Pkl {
spec {
type = "uri"
uri = PklProject.package.baseUri + "@" + PklProject.package.version + "#/compositions/steps/full.pkl"
uri = reflect.Module(full).uri
}
}
}
Expand Down

0 comments on commit c9f6362

Please sign in to comment.