forked from wasmCloud/wasmCloud
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathwadm.yaml
62 lines (61 loc) · 2.57 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
---
apiVersion: core.oam.dev/v1beta1
kind: Application
metadata:
name: rust-http-jsonify
annotations:
version: v0.0.1
description: |
A component that turns incoming HTTP requests into a JSON representation
wasmcloud.dev/authors: wasmCloud team
wasmcloud.dev/source-url: https://github.com/wasmCloud/wasmCloud/blob/main/examples/rust/components/http-jsonify/wadm.yaml
wasmcloud.dev/readme-md-url: https://github.com/wasmCloud/wasmCloud/blob/main/examples/rust/components/http-jsonify/README.md
wasmcloud.dev/homepage: https://github.com/wasmCloud/wasmCloud/tree/main/examples/rust/components/http-jsonify
wasmcloud.dev/categories: |
http,http-server,rust,example
spec:
components:
- name: http-component
type: component
properties:
# To use the locally compiled code in this folder, use the line below instead after running `wash build`:
# image: file://./build/http_jsonify_s.wasm
image: ghcr.io/wasmcloud/components/http-jsonify-rust:0.1.2
traits:
# Govern the spread/scheduling of the component
- type: spreadscaler
properties:
instances: 1
# Add a capability provider that enables HTTP access
- name: httpserver
type: capability
properties:
image: ghcr.io/wasmcloud/http-server:0.25.0
## 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:
# 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 `http-component` component, we establish
# a unidirectional link from this `httpserver` provider (the "source")
# to the `http-component` component (the "target"), so the server can invoke
# the component to handle a request.
- type: link
properties:
target:
name: http-component
namespace: wasi
package: http
interfaces: [incoming-handler]
source:
config:
- name: default-http
properties:
address: 0.0.0.0:8000