-
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 #16 from Avarei/add-minimal-example
Add minimal example
- Loading branch information
Showing
8 changed files
with
156 additions
and
22 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 |
---|---|---|
@@ -0,0 +1,20 @@ | ||
apiVersion: apiextensions.crossplane.io/v1 | ||
kind: Composition | ||
metadata: | ||
name: function-pkl | ||
spec: | ||
compositeTypeRef: | ||
apiVersion: example.crossplane.io/v1 | ||
kind: XR | ||
mode: Pipeline | ||
pipeline: | ||
- step: run-the-template | ||
functionRef: | ||
name: function-pkl | ||
input: | ||
apiVersion: template.fn.crossplane.io/v1beta1 | ||
kind: Pkl | ||
spec: | ||
type: uri | ||
# This pkl file is at `pkl/crossplane-example/minimal.pkl` in this repo | ||
uri: "package://pkg.pkl-lang.org/github.com/crossplane-contrib/function-pkl/[email protected]#/minimal.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,11 @@ | ||
--- | ||
apiVersion: pkg.crossplane.io/v1beta1 | ||
kind: Function | ||
metadata: | ||
name: function-pkl | ||
annotations: | ||
# This tells crossplane beta render to connect to the function locally. | ||
render.crossplane.io/runtime: Development | ||
spec: | ||
# This is ignored when using the Development runtime. | ||
package: function-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,6 @@ | ||
# Replace this with your XR! | ||
apiVersion: example.crossplane.io/v1 | ||
kind: XR | ||
metadata: | ||
name: example-xr | ||
spec: {} |
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
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
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
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
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,28 @@ | ||
amends "@crossplane.contrib/CompositionResponse.pkl" | ||
import "crds/Object.pkl" | ||
import "@k8s/api/core/v1/ConfigMap.pkl" | ||
|
||
desired { | ||
resources { | ||
["cm-minimal"] = new { | ||
resource = new Object { | ||
metadata { | ||
name = "cm-one" | ||
} | ||
spec { | ||
forProvider { | ||
manifest = new ConfigMap { | ||
metadata { | ||
name = "cm-minimal" | ||
namespace = "crossplane-system" | ||
} | ||
data { | ||
["foo"] = "bar" | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} |