Skip to content

Commit 97306df

Browse files
update for marketplace release
Signed-off-by: Steven Borrelli <steve@borrelli.org>
1 parent 0c44834 commit 97306df

File tree

6 files changed

+49
-21
lines changed

6 files changed

+49
-21
lines changed

README.md

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,9 @@ Functions require Crossplane 1.14 or newer. Apply the following manifest to your
1313
apiVersion: pkg.crossplane.io/v1beta1
1414
kind: Function
1515
metadata:
16-
name: function-unit-test
16+
name: crossplane-contrib-function-unit-test
1717
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
1919
```
2020
2121
## Configuring Unit Tests
@@ -31,7 +31,7 @@ useful when running this function in CI pipelines via `crossplane beta render`.
3131
```yaml
3232
- step:
3333
functionRef:
34-
name: function-unit-test
34+
name: crossplane-contrib-function-unit-test
3535
input:
3636
apiVersion: unittest.fn.crossplane.io/v1beta1
3737
kind: TestCases
@@ -70,9 +70,7 @@ $ docker build . --tag=function-unit-test-runtime
7070
$ crossplane xpkg build -f package --embed-runtime-image=function-unit-test-runtime
7171
```
7272

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>

examples/basic-tests/composition.yaml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,9 @@ spec:
99
kind: XNopResource
1010
mode: Pipeline
1111
pipeline:
12-
- step: conditional-patch-and-transform
12+
- step: patch-and-transform
1313
functionRef:
14-
name: function-patch-and-transform
14+
name: crossplane-contrib-function-patch-and-transform
1515
input:
1616
apiVersion: pt.fn.crossplane.io/v1beta1
1717
kind: Resources
@@ -70,9 +70,9 @@ spec:
7070
value: verysecurepassword
7171
- name: endpoint
7272
value: 127.0.0.1
73-
- step:
73+
- step: unit-test
7474
functionRef:
75-
name: function-unit-test
75+
name: crossplane-contrib-function-unit-test
7676
input:
7777
apiVersion: unittest.fn.crossplane.io/v1beta1
7878
kind: TestCases

examples/basic-tests/definition.yaml

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
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

examples/basic-tests/function.yaml

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,17 @@
11
apiVersion: pkg.crossplane.io/v1beta1
22
kind: Function
33
metadata:
4-
name: function-patch-and-transform
4+
name: crossplane-contrib-function-patch-and-transform
55
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
87
---
98
apiVersion: pkg.crossplane.io/v1beta1
109
kind: Function
1110
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
1515
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
1817

examples/basic-tests/provider.yaml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
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

examples/basic-tests/render.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
crossplane beta render -r xr.yaml composition.yaml function.yaml

0 commit comments

Comments
 (0)