File tree Expand file tree Collapse file tree 6 files changed +49
-21
lines changed Expand file tree Collapse file tree 6 files changed +49
-21
lines changed Original file line number Diff line number Diff line change @@ -13,9 +13,9 @@ Functions require Crossplane 1.14 or newer. Apply the following manifest to your
13
13
apiVersion : pkg.crossplane.io/v1beta1
14
14
kind : Function
15
15
metadata :
16
- name : function-unit-test
16
+ name : crossplane-contrib- function-unit-test
17
17
spec :
18
- package : index.docker .io/steve /function-unit-test:v0.1.0
18
+ package : xpkg.upbound .io/crossplane-contrib /function-unit-test:v0.1.0
19
19
` ` `
20
20
21
21
## Configuring Unit Tests
@@ -31,7 +31,7 @@ useful when running this function in CI pipelines via `crossplane beta render`.
31
31
` ` ` yaml
32
32
- step:
33
33
functionRef:
34
- name: function-unit-test
34
+ name: crossplane-contrib- function-unit-test
35
35
input:
36
36
apiVersion: unittest.fn.crossplane.io/v1beta1
37
37
kind: TestCases
@@ -70,9 +70,7 @@ $ docker build . --tag=function-unit-test-runtime
70
70
$ crossplane xpkg build -f package --embed-runtime-image=function-unit-test-runtime
71
71
` ` `
72
72
73
- [functions] : https://docs.crossplane.io/latest/concepts/composition-functions
74
- [go] : https://go.dev
75
- [function guide] : https://docs.crossplane.io/knowledge-base/guides/write-a-composition-function-in-go
76
- [package docs] : https://pkg.go.dev/github.com/crossplane/function-sdk-go
77
- [docker] : https://www.docker.com
78
- [cli] : https://docs.crossplane.io/latest/cli
73
+ # # Reference Links
74
+
75
+ - functions : <https://docs.crossplane.io/latest/concepts/composition-functions>
76
+ - function guide <https://docs.crossplane.io/knowledge-base/guides/write-a-composition-function-in-go>
Original file line number Diff line number Diff line change 9
9
kind : XNopResource
10
10
mode : Pipeline
11
11
pipeline :
12
- - step : conditional- patch-and-transform
12
+ - step : patch-and-transform
13
13
functionRef :
14
- name : function-patch-and-transform
14
+ name : crossplane-contrib- function-patch-and-transform
15
15
input :
16
16
apiVersion : pt.fn.crossplane.io/v1beta1
17
17
kind : Resources
70
70
value : verysecurepassword
71
71
- name : endpoint
72
72
value : 127.0.0.1
73
- - step :
73
+ - step : unit-test
74
74
functionRef :
75
- name : function-unit-test
75
+ name : crossplane-contrib- function-unit-test
76
76
input :
77
77
apiVersion : unittest.fn.crossplane.io/v1beta1
78
78
kind : TestCases
Original file line number Diff line number Diff line change
1
+ apiVersion : apiextensions.crossplane.io/v1
2
+ kind : CompositeResourceDefinition
3
+ metadata :
4
+ name : xnopresources.nop.example.org
5
+ spec :
6
+ group : nop.example.org
7
+ names :
8
+ kind : XNopResource
9
+ plural : xnopresources
10
+ versions :
11
+ - name : v1alpha1
12
+ referenceable : true
13
+ served : true
14
+ schema :
15
+ openAPIV3Schema :
16
+ type : object
17
+ properties :
18
+ spec :
19
+ type : object
20
+ properties :
21
+ env :
22
+ type : string
23
+ render :
24
+ type : boolean
Original file line number Diff line number Diff line change 1
1
apiVersion : pkg.crossplane.io/v1beta1
2
2
kind : Function
3
3
metadata :
4
- name : function-patch-and-transform
4
+ name : crossplane-contrib- function-patch-and-transform
5
5
spec :
6
- package : xpkg.upbound.io/crossplane-contrib/function-patch-and-transform:v0.2.0
7
- packagePullPolicy : Always
6
+ package : xpkg.upbound.io/crossplane-contrib/function-patch-and-transform:v0.5.0
8
7
---
9
8
apiVersion : pkg.crossplane.io/v1beta1
10
9
kind : Function
11
10
metadata :
12
- name : function-unit-test
13
- annotations :
14
- render.crossplane.io/runtime : Development
11
+ name : crossplane-contrib-function-unit-test
12
+ # Uncomment for local go development of function
13
+ # annotations:
14
+ # render.crossplane.io/runtime: Development
15
15
spec :
16
- package : index.docker.io/steve/function-unit-test:v0.1.0
17
- packagePullPolicy : Always
16
+ package : xpkg.upbound.io/crossplane-contrib/function-unit-test:v0.1.0
18
17
Original file line number Diff line number Diff line change
1
+ apiVersion : pkg.crossplane.io/v1
2
+ kind : Provider
3
+ metadata :
4
+ name : crossplane-contrib-provider-nop
5
+ spec :
6
+ package : xpkg.upbound.io/crossplane-contrib/provider-nop:v0.2.0
Original file line number Diff line number Diff line change
1
+ crossplane beta render -r xr.yaml composition.yaml function.yaml
You can’t perform that action at this time.
0 commit comments