-
Notifications
You must be signed in to change notification settings - Fork 0
/
wadm.yaml
120 lines (112 loc) · 3.75 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
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
apiVersion: core.oam.dev/v1beta1
kind: Application
metadata:
name: workflows-executor
annotations:
version: v0.0.1
description: 'workflows-executor demo in Rust, using the WebAssembly Component Model and WebAssembly Interfaces Types (WIT)'
wasmcloud.dev/authors: Giovanni98
wasmcloud.dev/categories: |
http,http-server,rust,workflows-executor,example
spec:
components:
# Composant add.wasm
- name: add-component
type: component
properties:
image: file://./wasmFile/add.wasm
traits:
- type: spreadscaler
properties:
instances: 1
# # Composant print.wasm
- name: print-component
type: component
properties:
image: file://./wasmFile/print.wasm
traits:
- type: spreadscaler
properties:
instances: 1
# # Composant wait.wasm
- name: wait-component
type: component
properties:
image: file://./wasmFile/wait.wasm
traits:
- type: spreadscaler
properties:
instances: 1
- name: http-component
type: component
properties:
image: file://./build/workflows_executor_s.wasm
# To use the a precompiled version of this component, use the line below instead:
# image: ghcr.io/wasmcloud/components/http-hello-world-rust:0.1.0
traits:
# Govern the spread/scheduling of the component
- type: spreadscaler
properties:
instances: 1
- type: link
properties:
target: add-component
namespace: example
package: add
interfaces: [adder]
- type: link
properties:
target: print-component
namespace: example
package: print
interfaces: [printer]
- type: link
properties:
target: wait-component
namespace: example
package: wait
interfaces: [waiter]
# The new key-value link configuration
- type: link
properties:
target: kvredis
namespace: wasi
package: keyvalue
interfaces: [atomics, store]
target_config:
- name: redis-url
properties:
url: redis://127.0.0.1:6379
# The new capability provider
- name: kvredis
type: capability
properties:
image: ghcr.io/wasmcloud/keyvalue-redis:0.28.1
# Add a capability provider that enables HTTP access
- name: httpserver
type: capability
properties:
image: ghcr.io/wasmcloud/http-server:0.23.2
## To configure OTEL integration for this provider specifically, uncomment the lines below
# config:
# - name: otel
# properties:
# otel_exporter_otlp_endpoint: "http://all-in-one:4318"
# otel_exporter_otlp_traces_endpoint: "http://traces-backend/v1/traces"
# otel_exporter_otlp_metrics_endpoint: "http://metrics-backend/v1/metrics"
# otel_exporter_otlp_logs_endpoint: "http://logs-backend/v1/logs"
traits:
# Establish a unidirectional link from this http server provider (the "source")
# to the `http-component` component (the "target") so the component can handle incoming HTTP requests,
#
# The source (this provider) is configured such that the HTTP server listens on 0.0.0.0:8000
- type: link
properties:
target: http-component
namespace: wasi
package: http
interfaces: [incoming-handler]
source_config:
- name: default-http
properties:
address: 0.0.0.0:8000