@@ -69,7 +69,7 @@ For an example of configuring cloud resources, refer to [configuration-aws-netwo
6969
7070## Running the Example Package
7171
72- The configuration and function are published to the [ Upbound Marketplace ] ( https://marketplace.upbound.io ) ,
72+ The configuration and function packages are published to the [ Github package registry ] ( https://github.com/orgs/crossplane/packages?repo_name=function-template-typescript ) ,
7373and can be installed into a Crossplane environment.
7474
7575## Installing the Package
@@ -89,14 +89,13 @@ spec:
8989Once installed, confirm that the package and dependencies are installed:
9090
9191` ` ` shell
92- crossplane beta trace configuration.pkg crossplane-configuration-template-typescript
93- NAME VERSION INSTALLED HEALTHY STATE STATUS
94- Configuration/crossplane-configuration-template-typescript v0.2.0 True True - HealthyPackageRevision
95- ├─ ConfigurationRevision/crossplane-configuration-template-typescript-93b73b00eb21 v0.2.0 - - Active
96- ├─ Function/crossplane-contrib-function-auto-ready v0.6.0 True True - HealthyPackageRevision
97- │ └─ FunctionRevision/crossplane-contrib-function-auto-ready-59868730b9a9 v0.6.0 - - Active
98- └─ Function/crossplane-function-template-typescript v0.2.0 True True - HealthyPackageRevision
99- └─ FunctionRevision/crossplane-function-template-typescript-cd83fe939bc7 v0.2.0 -
92+ $ kubectl get pkg
93+ NAME INSTALLED HEALTHY PACKAGE AGE
94+ configuration.pkg.crossplane.io/crossplane-configuration-template-typescript True True ghcr.io/crossplane/configuration-template-typescript:v0.2.0 49m
95+
96+ NAME INSTALLED HEALTHY PACKAGE AGE
97+ function.pkg.crossplane.io/crossplane-contrib-function-auto-ready True True xpkg.upbound.io/crossplane-contrib/function-auto-ready:v0.6.0 48m
98+ function.pkg.crossplane.io/crossplane-function-template-typescript True True ghcr.io/crossplane/function-template-typescript:v0.2.0 49m
10099```
101100
102101### Deploy the Example Manifest
@@ -117,7 +116,7 @@ app.platform.upbound.io/hello-app created
117116Use ` crossplane beta trace ` to validate the Composition:
118117
119118``` shell
120- crossplane beta trace -n example app.platform.upbound.io/hello-app
119+ $ crossplane beta trace -n example app.platform.upbound.io/hello-app
121120NAME SYNCED READY STATUS
122121App/hello-app (example) True True Available
123122├─ Deployment/hello-app-7ff730da5be9 (example) - -
@@ -128,7 +127,7 @@ App/hello-app (example) True True Available
128127Next, examine the resources in the namespace:
129128
130129``` shell
131- kubectl get all,sa -n example -l app.kubernetes.io/instance=hello-app
130+ $ kubectl get all,sa -n example -l app.kubernetes.io/instance=hello-app
132131NAME READY STATUS RESTARTS AGE
133132pod/hello-app-7ff730da5be9-76975c8c4c-mth2n 1/1 Running 0 5m36s
134133
@@ -334,10 +333,10 @@ The images will be saved as `tar` files that can be
334333packed into a Function Package:
335334
336335``` shell
337- tree _build/docker_images
336+ $ tree _build/docker_images
338337_build/docker_images
339- ├── function-template-typescript-function- runtime-amd64-v0.2.0.tar
340- └── function-template-typescript-function- runtime-arm64-v0.2.0.tar
338+ ├── function-template-typescript-runtime-amd64-v0.2.0.tar
339+ └── function-template-typescript-runtime-arm64-v0.2.0.tar
341340```
342341
343342The Dockerfile uses a multi-stage build:
@@ -373,8 +372,8 @@ the `_build/xpkg` directory:
373372``` shell
374373$ tree _build/xpkg
375374_build/xpkg
376- ├── function-template-typescript-function- amd64-v0.2.0.xpkg
377- └── function-template-typescript-function- arm64-v0.2.0.xpkg
375+ ├── function-template-typescript-amd64-v0.2.0.xpkg
376+ └── function-template-typescript-arm64-v0.2.0.xpkg
378377```
379378
380379These packages can be pushed to any Docker Registry using ` crossplane xpkg push ` . Update the ` XPKG_REPO ` in the [ env] ( env )
@@ -412,7 +411,7 @@ spec:
412411 # Make this match your function
413412 - apiVersion : pkg.crossplane.io/v1
414413 kind : Function
415- package : xpkg.upbound. io/crossplane/function-template-typescript-function
414+ package : ghcr. io/crossplane/function-template-typescript
416415 version : ' >=v0.2.0'
417416` ` `
418417
@@ -426,14 +425,14 @@ Since the Kind in the template function is an `App`, we create a subdirectory `a
426425
427426Update the `composition.yaml` file to have the functionRef of the first pipeline step to refer to the name
428427of the function once it is installed. Crossplane creates a function name of `<docker repository>-<function-name>`,
429- so `xpkg.upbound. io/crossplane/function-template-typescript-function ` would have a `functionRef.name` of
430- ` crossplane-function-template-typescript-function ` .
428+ so `ghcr. io/crossplane/function-template-typescript` would have a `functionRef.name` of
429+ ` crossplane-function-template-typescript` .
431430
432431Update the value with the name that represents the Docker registry and image where the function was pushed.
433432
434433` ` ` yaml
435434- functionRef:
436- name: crossplane-function-template-typescript-function
435+ name: crossplane-function-template-typescript
437436 step: app
438437` ` `
439438
@@ -450,11 +449,11 @@ The `_build/xpkg` directory will contain the multi-platform function
450449images and the Configuration package image :
451450
452451` ` ` shell
453- tree _build/xpkg
452+ $ tree _build/xpkg
454453_build/xpkg
455- ├── function -template-typescript-function-amd64 -v0.2.0.xpkg
456- ├── function-template-typescript-function-arm64 -v0.2.0.xpkg
457- └── function-template-typescript-v0.2.0.xpkg
454+ ├── configuration -template-typescript-v0.2.0.xpkg
455+ ├── function-template-typescript-amd64 -v0.2.0.xpkg
456+ └── function-template-typescript-arm64- v0.2.0.xpkg
458457` ` `
459458
460459Push this package to a Docker registry :
0 commit comments