-
Notifications
You must be signed in to change notification settings - Fork 0
/
wadm.yaml
90 lines (87 loc) · 2.47 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
apiVersion: core.oam.dev/v1beta1
kind: Application
metadata:
name: resiliency-demo
annotations:
version: v0.3.0
description: "Demo on Fly.io demonstrating the resiliency features of wasmCloud"
experimental: "true"
spec:
components:
- name: cloud-hello
type: component
properties:
image: ghcr.io/cosmonic-labs/cloud-hello:0.6.0
traits:
# Govern the spread/scheduling of the actor
- type: daemonscaler
properties:
replicas: 50
spread:
- name: fly
requirements:
cloud: fly.io
- type: link
properties:
target: keyvalue
namespace: wrpc
package: keyvalue
interfaces: [store, atomics, batch, increment]
target_config:
- name: keyvalue
properties:
URL: "redis://valkey.default.svc.cluster.local:6379"
- type: link
properties:
target: fly-metadata
namespace: cosmonic-labs
package: cloud-metadata
interfaces: [service]
# Add a capability provider that mediates HTTP access
- name: httpserver
type: capability
properties:
image: ghcr.io/wasmcloud/http-server:0.20.1
traits:
- type: daemonscaler
properties:
instances: 1
spread:
- name: fly
requirements:
cloud: fly.io
- type: link
properties:
target: cloud-hello
namespace: wasi
package: http
interfaces: [incoming-handler]
source_config:
- name: http
properties:
address: 0.0.0.0:8080
- name: keyvalue
type: capability
properties:
image: ghcr.io/wasmcloud/keyvalue-redis:canary
traits:
- type: spreadscaler
properties:
instances: 1
spread:
- name: k8s
requirements:
kubernetes: "true"
# Capability provider to expose a Fly Machine's environment variables
- name: fly-metadata
type: capability
properties:
image: ghcr.io/cosmonic-labs/fly-io-metadata:0.4.0
traits:
- type: daemonscaler
properties:
instances: 1
spread:
- name: fly
requirements:
cloud: fly.io