forked from wasmCloud/wasmCloud
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathwadm.yaml
58 lines (57 loc) · 2.39 KB
/
wadm.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
apiVersion: core.oam.dev/v1beta1
kind: Application
metadata:
name: custom-template-provider-golang
annotations:
version: v0.0.1
description: 'An application with a provider and component built for extending wasmCloud with custom capabilities'
wasmcloud.dev/authors: wasmCloud team
wasmcloud.dev/source-url: https://github.com/wasmCloud/wasmCloud/blob/main/examples/golang/providers/custom-template/wadm.yaml
wasmcloud.dev/readme-md-url: https://github.com/wasmCloud/wasmCloud/blob/main/examples/golang/providers/custom-template/README.md
wasmcloud.dev/homepage: https://github.com/wasmCloud/wasmCloud/tree/main/examples/golang/providers/custom-template
wasmcloud.dev/categories: |
capability-provider,provider,template,http-server,tinygo,golang,example
spec:
components:
- name: test-component
type: component
properties:
image: file://./component/build/custom_template_component_s.wasm
traits:
- type: spreadscaler
properties:
instances: 1
# Link the component to the provider on wasmcloud:example/system-info
#
# Establish a unidirectional link to the custom-template provider, over the
# WIT namespace wasmcloud:example/system-info, so the `test-component` component
# can make use of outgoing handler functionality (i.e. calling functions in the system-info interface)
- type: link
properties:
target:
name: custom-template
namespace: wasmcloud
package: example
interfaces: [system-info]
- name: custom-template
type: capability
properties:
image: file://./build/custom-template.par.gz
id: custom-template
config:
- name: provider-config
properties:
foo: bar
traits:
# Link the provider to the component on wasmcloud:example/process-data
#
# Create a uni-directional link from the custom-template provider (the "source") to
# the `test-component` component (the "target"), so that the provider can call functions in the
# wasmcloud:example/process-data interface on `test-component`.
- type: link
properties:
target:
name: test-component
namespace: wasmcloud
package: example
interfaces: [process-data]