Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add the missing lunatic workload to deployemnts/workloads #144

Merged
merged 1 commit into from
Sep 3, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion deployments/k3d/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ k3d cluster create wasm-cluster --image ghcr.io/deislabs/containerd-wasm-shims/e
kubectl apply -f https://github.com/deislabs/containerd-wasm-shims/raw/main/deployments/workloads/runtime.yaml
kubectl apply -f https://github.com/deislabs/containerd-wasm-shims/raw/main/deployments/workloads/workload.yaml
echo "waiting 5 seconds for workload to be ready"
sleep 5
sleep 15
curl -v http://127.0.0.1:8081/spin/hello
curl -v http://127.0.0.1:8081/slight/hello
curl -v http://127.0.0.1:8081/wws/hello
Expand Down
8 changes: 7 additions & 1 deletion deployments/workloads/runtime.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,10 @@ apiVersion: node.k8s.io/v1
kind: RuntimeClass
metadata:
name: wasmtime-wws
handler: wws
handler: wws
---
apiVersion: node.k8s.io/v1
kind: RuntimeClass
metadata:
name: wasmtime-lunatic
handler: lunatic
46 changes: 46 additions & 0 deletions deployments/workloads/workload.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,44 @@ spec:
selector:
app: wasm-wws
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: wasm-lunatic
spec:
replicas: 1
selector:
matchLabels:
app: wasm-lunatic
template:
metadata:
labels:
app: wasm-lunatic
spec:
runtimeClassName: wasmtime-lunatic
containers:
- name: lunatic
image: ghcr.io/deislabs/containerd-wasm-shims/examples/lunatic-submillisecond:v0.9.0
resources: # limit the resources to 128Mi of memory and 100m of CPU
limits:
cpu: 100m
memory: 128Mi
requests:
cpu: 100m
memory: 128Mi
---
apiVersion: v1
kind: Service
metadata:
name: wasm-lunatic
spec:
ports:
- protocol: TCP
port: 80
targetPort: 3000
selector:
app: wasm-lunatic
---
# Middleware
# Strip prefix /spin
apiVersion: traefik.containo.us/v1alpha1
Expand All @@ -128,6 +166,7 @@ spec:
- /spin
- /slight
- /wws
- /lunatic
---
apiVersion: networking.k8s.io/v1
kind: Ingress
Expand Down Expand Up @@ -160,5 +199,12 @@ spec:
backend:
service:
name: wasm-wws
port:
number: 80
- path: /lunatic
pathType: Prefix
backend:
service:
name: wasm-lunatic
port:
number: 80