forked from wasmCloud/wasmCloud
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathwadm.yaml
75 lines (73 loc) · 2.72 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
# This is a full example of how to run the blobby example.
# This requires you to have WADM running: https://github.com/wasmCloud/wadm/
# You can deploy this example with a simple command:
#
# `wash app deploy wadm.yaml`
apiVersion: core.oam.dev/v1beta1
kind: Application
metadata:
name: blobby
annotations:
version: v0.0.1
description: 'wasmCloud Blobby Example'
wasmcloud.dev/authors: wasmCloud team
wasmcloud.dev/source-url: https://github.com/wasmCloud/wasmCloud/blob/main/examples/rust/components/blobby/wadm.yaml
wasmcloud.dev/readme-md-url: https://github.com/wasmCloud/wasmCloud/blob/main/examples/rust/components/blobby/README.md
wasmcloud.dev/homepage: https://github.com/wasmCloud/wasmCloud/tree/main/examples/rust/components/blobby
wasmcloud.dev/categories: |
http,http-server,rust,object-storage,blobstore,example
spec:
components:
- name: blobby
type: component
properties:
# To use the locally compiled code in this folder, use the line below instead after running `wash build`:
# image: file://./build/blobby_s.wasm
image: ghcr.io/wasmcloud/components/blobby-rust:0.4.0
traits:
- type: spreadscaler
properties:
instances: 1
# Establish a unidirectional link to the blobstore,
# so the `blobby` component can make use of blobstore functionality
# (i.e. reading/writing data blobs)
- type: link
properties:
target:
name: blobstore
config:
- name: root-directory
properties:
root: '/tmp/blobstore'
namespace: wasi
package: blobstore
interfaces: [blobstore]
# Capability Providers
- name: http
type: capability
properties:
image: ghcr.io/wasmcloud/http-server:0.25.0
traits:
# Link the httpserver to the component, and configure the HTTP server
# to listen on port 8000 for incoming requests
#
# Since the HTTP server calls the `blobby` component, we establish
# a unidirectional link from this `httpserver` provider (the "source")
# to the `blobby` component (the "target"), so the server can invoke
# the component to handle a request.
- type: link
properties:
target:
name: blobby
namespace: wasi
package: http
interfaces: [incoming-handler]
source:
config:
- name: default-http
properties:
address: 0.0.0.0:8000
- name: blobstore
type: capability
properties:
image: ghcr.io/wasmcloud/blobstore-fs:0.10.2