From a25abaad40ee0382f9f1a586360e0248097cacce Mon Sep 17 00:00:00 2001 From: Dipankar Das <65275144+dipankardas011@users.noreply.github.com> Date: Sun, 8 Sep 2024 11:58:37 +0530 Subject: [PATCH] Updated the wasm support as application stack Signed-off-by: Dipankar Das <65275144+dipankardas011@users.noreply.github.com> --- .../develop/Ksctl Operators/application.md | 39 ++++++++++++++++--- 1 file changed, 34 insertions(+), 5 deletions(-) diff --git a/content/en/docs/develop/Ksctl Operators/application.md b/content/en/docs/develop/Ksctl Operators/application.md index be64d9d..811965c 100644 --- a/content/en/docs/develop/Ksctl Operators/application.md +++ b/content/en/docs/develop/Ksctl Operators/application.md @@ -38,7 +38,7 @@ once you have `kubectl apply` the stack it will start deploying the applications | Flannel | standard | - | flannel | [Link](#flannel) | | Kube-Prometheus | standard | Monitoring | standard-kubeprometheus | [Link](#kube-prometheus) | | SpinKube | production | Wasm | production-spinkube | [Link](#spinkube) | -| WasmEdge | production | Wasm | production-wasmedge-kwasm | [Link](#wasmedge) | +| WasmEdge and Wasmtime | production | Wasm | production-kwasm | [Link](#kwasm) | {{% alert title="Note on wasm category apps" color="info" %}} @@ -319,7 +319,7 @@ spec: ``` -#### **WasmEdge** +#### **Kwasm** **How to use it (Basic Usage)** @@ -327,14 +327,14 @@ spec: apiVersion: application.ksctl.com/v1alpha1 kind: Stack metadata: - name: wasm-wasmedge + name: wasm-kwasm spec: stacks: - - stackId: production-wasmedge-kwasm + - stackId: production-kwasm appType: app ``` -**Demo app** +**Demo app(wasmedge)** ```yaml --- apiVersion: v1 @@ -369,7 +369,31 @@ spec: targetPort: 8080 ``` +**Demo app(wasmtime)** +```yaml +apiVersion: batch/v1 +kind: Job +metadata: + name: nice + namespace: default + labels: + app: nice +spec: + template: + metadata: + name: nice + labels: + app: nice + spec: + runtimeClassName: wasmtime + containers: + - name: nice + image: "meteatamel/hello-wasm:0.1" + restartPolicy: OnFailure +``` + ```shell +#### For wasmedge # once up and running kubectl port-forward svc/nice 8080:8080 @@ -377,6 +401,11 @@ kubectl port-forward svc/nice 8080:8080 curl localhost:8080 ``` +```shell +#### For wasmtime +# just check the logs +``` + **Overrides available** ```yaml apiVersion: application.ksctl.com/v1alpha1