Skip to content

Commit

Permalink
Merge pull request #27 from ksctl/patch/ksctl-application
Browse files Browse the repository at this point in the history
Updated the wasm support as application stack
  • Loading branch information
dipankardas011 authored Sep 8, 2024
2 parents dc4d82a + a25abaa commit d84c163
Showing 1 changed file with 34 additions and 5 deletions.
39 changes: 34 additions & 5 deletions content/en/docs/develop/Ksctl Operators/application.md
Original file line number Diff line number Diff line change
Expand Up @@ -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" %}}
Expand Down Expand Up @@ -319,22 +319,22 @@ spec:
```


#### **WasmEdge**
#### **Kwasm**

**How to use it (Basic Usage)**

```yaml
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
Expand Down Expand Up @@ -369,14 +369,43 @@ 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

# then you can curl the service
curl localhost:8080
```

```shell
#### For wasmtime
# just check the logs
```

**Overrides available**
```yaml
apiVersion: application.ksctl.com/v1alpha1
Expand Down

0 comments on commit d84c163

Please sign in to comment.