From 076c2395847f39d691d01dce2d9cf0c465da477b Mon Sep 17 00:00:00 2001 From: Tim <32556895+Avarei@users.noreply.github.com> Date: Sat, 29 Jun 2024 18:16:33 +0200 Subject: [PATCH] Add Deployment guide for the example. Renamed the README to DEVELOP.md. Signed-off-by: Tim <32556895+Avarei@users.noreply.github.com> --- README.md | 4 +-- pkl/crossplane.contrib.example/DEPLOY.md | 29 +++++++++++++++++++ .../{README.md => DEVELOP.md} | 0 3 files changed, 31 insertions(+), 2 deletions(-) create mode 100644 pkl/crossplane.contrib.example/DEPLOY.md rename pkl/crossplane.contrib.example/{README.md => DEVELOP.md} (100%) diff --git a/README.md b/README.md index acb9938..b944fa2 100644 --- a/README.md +++ b/README.md @@ -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 diff --git a/pkl/crossplane.contrib.example/DEPLOY.md b/pkl/crossplane.contrib.example/DEPLOY.md new file mode 100644 index 0000000..ba4431c --- /dev/null +++ b/pkl/crossplane.contrib.example/DEPLOY.md @@ -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 +``` diff --git a/pkl/crossplane.contrib.example/README.md b/pkl/crossplane.contrib.example/DEVELOP.md similarity index 100% rename from pkl/crossplane.contrib.example/README.md rename to pkl/crossplane.contrib.example/DEVELOP.md