-
Notifications
You must be signed in to change notification settings - Fork 0
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
https://github.com/second-state/wasmedge-containers-examples/pull/29 #3
Comments
Hello, I am a serverless review bot on flows.network. Here are my reviews of changed source code files in this PR. .github/workflows/containerd-server.ymlUpon reviewing the code snippet, I identified a few issues:
strategy:
fail-fast: false
matrix:
crun: ["1.8.4"]
wasmedge: ["0.11.0", "0.11.1", "0.11.2"]
tag: ["latest"]
latest: [false]
variant: ["compat-smart"]
include:
- name: "WasmEdge latest release, Crun master"
latest: true
tag: "latest"
wasmedge: "latest"
crun: "latest"
variant: "compat-smart"
- uses: actions/checkout@v2
with:
fetch-depth: 0 Aside from those issues, the overall logic seems to be working as intended. However, keep in mind that this review doesn't cover the actual shell scripts ( Here is a summary of the key changes in the patch:
paths-ignore:
- '**/README.md'
crun: ["1.8.4"]
- uses: actions/checkout@v3 .github/workflows/containerd.ymlHere is a summary of the key changes in the patch:
paths-ignore:
- '**/README.md'
crun: ["1.8.4"]
- uses: actions/checkout@v3 .github/workflows/crio-server.ymlHere is a summary of the key changes in the patch:
paths-ignore:
- '**/README.md'
crun: ["1.8.4"]
exclude: (Removed)
- uses: actions/checkout@v3 .github/workflows/crio.ymlHere is a summary of the key changes in the patch:
paths-ignore:
- '**/README.md'
crun: ["1.8.4"]
exclude: (Removed)
- uses: actions/checkout@v3 .github/workflows/kubernetes-containerd-server.ymlOverall, the provided code snippet seems to be a GitHub Actions workflow, which is used for building, testing, and deploying code in a CI/CD environment. Here are a few potential issues and suggestions:
- uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Install apt-get packages
run: |
sudo apt-get update
sudo apt-get upgrade
sudo apt-get install git wget
- name: Dump the log of execution
run: |
cat dump.log
- name: Check the result
run: |
if grep -q "echo: name=WasmEdge" dump.log; then
echo -e "Execution Success!"
else
echo -e "Execution Fail! Please check the above log for details"
exit 1
fi
Other than the above issues, the provided code snippet seems to be formatted well and follows good practices. This patch introduces several key changes to the original GitHub Actions workflow:
Overall, these changes help streamline the workflow configuration and avoid unnecessary triggers. .github/workflows/kubernetes-containerd.ymlThe code snippet provided appears to be a YAML configuration file for a GitHub Actions workflow. Overall, the workflow is well-structured, and I didn't find any major issues. However, there are a few minor improvements that can be made:
Apart from these minor changes, the code looks good for a workflow targeting Kubernetes, containerd, and WasmEdge testing. Note that since the code snippet is not complete, it's important to validate the entire YAML file for correctness and adherence to GitHub Actions workflow syntax. This patch introduces the following key changes to the GitHub Actions workflow configuration:
.github/workflows/kubernetes-crio-server.ymlThis patch introduces the following key changes to the GitHub Actions workflow configuration:
.github/workflows/kubernetes-crio.ymlThis patch introduces the following key changes to the GitHub Actions workflow configuration:
.github/workflows/kwasm-server.ymlThis patch introduces a new GitHub Actions workflow named "k8s kwasm http server". The key changes and additions in this configuration are:
.github/workflows/kwasm.ymlThis patch introduces a new GitHub Actions workflow called "k8s kwasm test". Key changes and features include:
kwasm/http-server/http_server_application.yamlThe code snippet appears to be a Kubernetes YAML configuration for a deployment and a service using a WebAssembly application. While there are no apparent syntax errors, there are some details worth pointing out:
Overall, the YAML configuration seems functional, but addressing the mentioned details can ensure better stability and compatibility. The patch introduces a Kubernetes YAML configuration with the following key components:
kwasm/simple_wasi_application.yamlHere are some potential issues in this Kubernetes configuration:
Other than these issues, the configuration appears to be correctly set up. The snippet is only a small part of a bigger configuration, so be sure to check other parts for any potential problems. This patch consists of a Kubernetes configuration that defines two resources: a Key changes made in this patch:
|
Flows review |
Hello, I am a serverless review bot on flows.network. Here are my reviews of changed source code files in this PR. .github/workflows/containerd-server.ymlOverall, the code snippet appears to be well-written and easy to understand. However, there are a few potential improvements and issues.
The key changes in the given patch are:
.github/workflows/containerd.ymlOverall, the code snippet appears to be well-organized and readable. However, there are a few potential issues or areas for improvement:
Addressing these issues should help improve the reliability and maintenance of your GitHub Actions workflow. This patch includes the following key changes:
.github/workflows/crio-server.ymlOverall, the code snippet looks fine. However, there are a few recommendations I would like to make for potential improvements:
That's it! Other than these recommendations, the code snippet looks good. The key changes in the patch are as follows:
.github/workflows/crio.ymlOverall, the source code snippet is well-structured and easy to understand, but there are a few potential issues and improvements that can be made.
Here is the revised version of the source code snippet with the mentioned improvements: name: CRI-O test
concurrency:
group: crio-${{ github.head_ref }}
cancel-in-progress: true
on:
workflow_dispatch:
inputs:
logLevel:
description: 'Log level'
required: true
default: 'info'
push:
branches: [ main ]
paths-ignore: &ignore-paths
- '**/README.md'
pull_request:
branches: [ main ]
paths-ignore: *ignore-paths
schedule:
- cron: ${{ env.SCHEDULE_INTERVAL }}
env:
SCHEDULE_INTERVAL: '0 0 */1 * *'
SUCCESS_MESSAGE: 'Printed from wasi: This is from a main function'
jobs:
crio:
strategy:
fail-fast: false
matrix:
crun: ['1.8.4']
wasmedge: ['0.11.0', '0.11.1', '0.11.2']
config: ['container_wasi.json']
tag: ['latest']
latest: [false]
include:
- name: 'WasmEdge latest release, Crun master'
latest: true
wasmedge: 'latest'
crun: 'latest'
tag: 'latest'
config: 'container_wasi.json'
runs-on: ubuntu-20.04
name: WasmEdge:${{ matrix.wasmedge }},crun:${{ matrix.crun }}
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Install apt-get packages
run: |
sudo ACCEPT_EULA=Y apt-get update -y
sudo ACCEPT_EULA=Y apt-get upgrade -y
sudo ACCEPT_EULA=Y apt-get install git wget -y
- name: Install CRI-O and crun (specified version)
if: ${{ ! matrix.latest }}
env:
WASMEDGE_VERSION: ${{ matrix.wasmedge }}
CRUN_VERSION: ${{ matrix.crun }}
run: |
bash crio/install.sh --wasmedge=$WASMEDGE_VERSION --crun=$CRUN_VERSION
- name: Install CRI-O and crun (latest version)
if: ${{ matrix.latest }}
run: |
bash crio/install.sh
- name: Run demo in CRI-O
env:
TAG: ${{ matrix.tag }}
CONFIG: ${{ matrix.config }}
run: |
bash crio/simple_wasi_application.sh --tag=$TAG --config=$CONFIG > dump.log 2>&1
- name: Display crun and wasmedge version
run: |
crun --version
wasmedge --version
- name: Dump the log of execution
run: |
cat dump.log
- name: Check the result
run: |
if grep -q "${{ env.SUCCESS_MESSAGE }}" dump.log; then
echo -e "Execution Success!"
else
echo -e "Execution Fail! Please check the above log for details"
exit 1
fi The key changes in this patch are:
.github/workflows/kubernetes-containerd-server.ymlThe source code snippet appears to be a GitHub Actions workflow YAML file designed for testing a container management application using WasmEdge and Crun with Kubernetes. Here are a few suggestions for improvements:
Make sure to use consistent and proper indentation for better readability. In the
The following lines might be unnecessary if you want to trigger the CI when any changes in README.md are pushed or during pull requests. paths-ignore:
- '**/README.md'
Update the environment variable names to uppercase for better readability and convention: if: ${{ ! matrix.LATEST }}
env:
WASMEDGE_VERSION: ${{ matrix.wasmedge }}
CRUN_VERSION: ${{ matrix.crun }}
The following step introduces an arbitrary 1200s (20-minute) delay in your workflow: - name: Sleep for 1200s
run: sleep 1200s
shell: bash Consider using more reliable and efficient ways to wait for resources to be ready for testing, such as Kubernetes readiness probes or using Kubernetes wait commands.
When dumping log files, it might be helpful to provide a clearer message in the console by adding echo statements before displaying the logs. For example: - name: Dump the log of k8s setup
run: |
echo "====== K8S LOGS ======="
cat k8s.log
- name: Dump the log of execution
run: |
echo "====== EXECUTION LOGS ======="
cat dump.log
Instead of just echoing "Execution Fail," consider providing specific feedback about what might have caused the failure.
Add relevant comments to the code to provide better understanding and maintainability. The key changes in the patch are as follows:
.github/workflows/kubernetes-containerd.yml
- name: Install apt-get packages
run: |
sudo apt-get update
sudo apt-get upgrade
sudo apt-get install git wget
matrix:
crun: ["1.8.4"]
wasmedge: ["0.11.0", "0.11.1", "0.11.2"]
tag: ["latest"]
latest: [false]
variant: ["compat-smart"]
include:
- name: "WasmEdge latest release, Crun master"
latest: true
wasmedge: "latest"
crun: "latest"
tag: "latest"
variant: "compat-smart"
- uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Upload k8s log if setup fails
if: ${{ failure() }}
uses: actions/upload-artifact@v2
with:
name: k8s-log
path: k8s.log
- name: Upload dump log if execution fails
if: ${{ failure() }}
uses: actions/upload-artifact@v2
with:
name: dump-log
path: dump.log These suggestions should improve the reliability and maintainability of your workflow. The key changes in this patch are:
push:
branches: [ main ]
paths-ignore:
- '**/README.md'
pull_request:
branches: [ main ]
paths-ignore:
- '**/README.md'
exclude:
- ...
.github/workflows/kubernetes-crio-server.ymlOverall, the snippet appears mostly correct. However, there are a few potential issues that may be improved upon:
It is recommended to keep consistency between the triggers if possible. Instead of having individual on:
workflow_dispatch:
...
push:
branches: [ main ]
paths-ignore:
- '**/README.md'
pull_request:
branches: [ main ]
paths-ignore:
- '**/README.md'
schedule:
- cron: "0 0 */1 * *"
Some of the installation and setup steps may fail without stopping the workflow execution (
Using a fixed
Using a fixed version number for the software used in the matrix (like "1.8.4" for crun) may not be ideal in the long run. When a new version is released, the workflow will need to be updated manually. You could consider automating the version-fetching task and providing an option to run with the latest stable version without having to modify the workflow file manually.
In some places, environment variable names are in uppercase (e.g., The key changes in the provided patch are:
push:
branches: [ main ]
paths-ignore:
- '**/README.md'
pull_request:
branches: [ main ]
paths-ignore:
- '**/README.md'
matrix:
- crun: ["1.6", "1.7", "1.7.1", "1.7.2"]
+ crun: ["1.8.4"]
wasmedge: ["0.11.0", "0.11.1", "0.11.2"]
steps:
- - uses: actions/checkout@v2
+ - uses: actions/checkout@v3 .github/workflows/kubernetes-crio.ymlThe source code snippet is a GitHub Actions workflow for testing Kubernetes with CRI-O and WasmEdge. Here are a few potential issues and recommendations:
The
For jobs with longer execution times, the
The
The success message "Printed from wasi: This is from a main function" is hardcoded in the
The current script ends with either a success or fail message. It would be helpful to handle errors more specifically for easier debugging. For example, you could:
The key changes in this patch are:
.github/workflows/kwasm-server.ymlI have reviewed the code snippet, and found some potential issues that might be worth addressing:
The code snippet does not have a name for the k8s_kwasm_server:
name: Kubernetes WasmEdge HTTP Server Deployment
runs-on: ubuntu-latest
The code snippet does not specify any timeout limit for the k8s_kwasm_server:
name: Kubernetes WasmEdge HTTP Server Deployment
runs-on: ubuntu-latest
timeout-minutes: 15
The shell commands in the - run: |
set -e
helm repo add kwasm http://kwasm.sh/kwasm-operator/
helm repo update
...
There are two - run: |
set -e
...
kubectl apply -f kwasm/http-server/http_server_application.yaml
until kubectl rollout status deployment/your_deployment_name; do sleep 5; done
kubectl port-forward service/demo-service 8080 &
sleep 10
curl -d "name=WasmEdge" -X POST http://localhost:8080
echo With these changes, the code snippet would be more robust and easier to handle in different environments. The given patch includes a YAML configuration for a GitHub Actions workflow that deploys a Kubernetes WasmEdge HTTP server. Key changes are as follows:
.github/workflows/kwasm.ymlThe source code snippet appears to define a GitHub Action workflow for Kubernetes k8s kwasm test. Here are a few suggestions:
steps:
- name: Checkout repository
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Set up KinD (Kubernetes in Docker)
uses: helm/kind-action@v1.4.0
- name: Install and run Kwasm on Kubernetes
run: |
...
- name: Install and run Kwasm on Kubernetes
run: |
set -e
helm repo add kwasm http://kwasm.sh/kwasm-operator/
... With these suggestions, your code should be more maintainable and reliable. Consider adding optional features such as caching to speed up the build process if necessary, and make sure to apply any specific project requirements to the workflow. The patch defines a new GitHub Action workflow named "k8s kwasm test". Key changes and features include:
kwasm/http-server/http_server_application.yamlOverall, the code snippet appears to be a Kubernetes deployment configuration for a
In conclusion, the snippet appears functional, but depending on your requirements and the application, you may want to consider some of the above recommendations. This patch introduces changes to Kubernetes configuration, including creating a RuntimeClass object called "crun", a Deployment object called "demo-deployment," and a Service object called "demo-service." The key changes are as follows:
kwasm/simple_wasi_application.yamlHere are some potential issues that I found in this code snippet:
To fix this, you can update the resources:
requests:
cpu: 100m
memory: 100Mi
limits:
cpu: 500m
memory: 500Mi
For example, instead of using
Apart from these issues, the code snippet looks fine. Note that the provided snippet is not a full Kubernetes configuration and may require additional context to ensure that it works correctly in your environment. Do ensure that all desired configurations are defined as needed. This patch introduces a Kubernetes configuration with the following key components:
Please note that there are a few potential issues with this patch, as mentioned in my previous response. You may want to consider addressing those issues when implementing the configuration in a production environment. |
flows review |
Hello, I am a serverless review bot on flows.network. Here are my reviews of changed source code files in this PR. .github/workflows/containerd-server.ymlOverall, the YAML script for the GitHub Actions workflow looks pretty decent. However, there are a few suggestions that could improve its quality:
Apart from these suggestions, the code looks good, and it's clear what it is trying to achieve. The key changes in the patch are:
paths-ignore:
- '**/README.md'
crun: ["1.8.4"]
- uses: actions/checkout@v3 .github/workflows/containerd.ymlThe given code is a GitHub Actions workflow for testing Containerd with different combinations of Crun and WasmEdge versions. Below, I provide some suggestions and potential problems in the code:
In the
The
In the steps for installing containerd and crun, the
It would be good practice to add error handling mechanisms in the script execution steps, like using Based on these observations, you can make changes to the given code to improve it further. This patch introduces the following key changes:
.github/workflows/crio-server.ymlHere are some potential issues and improvements in the presented workflow file:
The on:
workflow_dispatch:
inputs:
logLevel:
description: 'Log level'
required: true
default: 'info'
push:
paths-ignore:
- '**/README.md'
pull_request:
paths-ignore:
- '**/README.md'
schedule:
- cron: "0 0 */1 * *"
- uses: actions/checkout@v3 with: - uses: actions/checkout@v2
The name property is missing for jobs:
crio_server:
name: CRI-O HTTP server test
It is not necessary to set jobs:
crio_server:
...
env:
ACCEPT_EULA: Y
steps:
... Then, you can remove the redundant
Please use the if grep -iq "echo: name=WasmEdge" dump.log; then This ensures that the search will still match even if there's a change in the case of the text being searched. Otherwise, the provided GitHub Actions workflow appears to be correctly set up, and I see no other major issues or concerns with the code. The key changes in the provided patch are:
.github/workflows/crio.ymlOverall, the code appears to be formatted well and follows a good structure. However, some potential improvements and issues have been identified below.
Replace: - uses: actions/checkout@v3 With: - uses: actions/checkout@v2
You might consider removing Replace: run: |
sudo ACCEPT_EULA=Y apt-get update
sudo ACCEPT_EULA=Y apt-get upgrade
sudo ACCEPT_EULA=Y apt-get install git wget With: run: |
sudo apt-get update
sudo apt-get upgrade
sudo apt-get install git wget
Add the following line under the timeout-minutes: <number_of_minutes> This is an optional improvement, and you can choose an appropriate number of minutes as per your test requirements. Other than these minor improvements, the code is well-structured, and no serious issues were discovered during the review. Please make the suggested changes, and the code should work as expected. This patch introduces the following key changes to the source code:
paths-ignore:
- '**/README.md'
crun: ["1.8.4"]
Replace: - uses: actions/checkout@v3 With: - uses: actions/checkout@v2 .github/workflows/kubernetes-containerd-server.ymlOverall the code appears well-organized, and the job structure follows standard practices for GitHub Actions. However, there are a few potential issues and improvements that can be made.
It's recommended to use single quotes for string values in YAML files for consistency. description: 'Log level'
default: 'info' Should be changed to: description: "Log level"
default: "info"
The - name: Install apt-get packages
run: |
apt-get update
apt-get upgrade
apt-get install git wget
For the "Installing and starting k8s" step, you are redirecting both stdout and stderr to - name: Installing and starting k8s
run: |
bash kubernetes_containerd/install.sh You could similarly remove the output redirection in the "Run WasmEdge in k8s" step. This way, the error logs will be shown right in the workflow logs for easier debugging.
The
Instead of using matrix variables for WASMEDGE_VERSION and CRUN_VERSION, you can define them as environment variables inside the.env section of the "Install containerd and crun (specified version)" step, like this: - name: Install containerd and crun (specified version)
if: ${{ ! matrix.latest }}
env:
WASMEDGE_VERSION: ${{ matrix.wasmedge }}
CRUN_VERSION: ${{ matrix.crun }}
run: |
bash containerd/install.sh --wasmedge=$WASMEDGE_VERSION --crun=$CRUN_VERSION This will make the code more readable and less error-prone.
This is not related to the code itself but a general practice. Make sure to use proper commit messages when submitting the code, so it's clear what changes were made in each commit. Use understandable and meaningful messages that briefly explain the changes. Avoid using vague messages like "Update" or "Fix bugs". This patch includes the following key changes:
.github/workflows/kubernetes-containerd.ymlOverall, the YAML configuration for the GitHub Actions workflow seems to be well-written. However, I would like to point out a few suggestions and small issues that I noticed:
Overall, the presented workflow seems very interesting, and I didn't find any critical issues with it. If you address the suggestions mentioned above, it will improve the quality of your GitHub Actions workflow. As always, it is a good practice to thoroughly test your workflows with various inputs and scenarios to ensure it behaves as expected. The key changes in this patch are:
These changes have added file path ignoring for the .github/workflows/kubernetes-crio-server.ymlBelow are the potential issues observed in the source code:
In these lines: env:
WASMEDGE_VERSION: ${{ matrix.wasmedge }}
CRUN_VERSION: ${{ matrix.crun }} It's important to ensure that these variables do not contain sensitive information. If they do, it is advised to use GitHub Encrypted Secrets to store these values securely.
The job has a step that deliberately sleeps for 1200 seconds (20 minutes): - name: Sleep for 1200s
run: sleep 1200s
shell: bash This could lead to longer job running times if not done correctly. Consider adding the jobs:
k8s_crio_server:
timeout-minutes: 120
During the installation and starting of k8s, the output is redirected to a log file and not shown in real-time: - name: Installing and starting k8s
run: |
bash kubernetes_crio/install.sh > k8s.log 2>&1 This can make debugging difficult during the execution. Instead, consider using the - name: Installing and starting k8s
run: |
bash kubernetes_crio/install.sh 2>&1 | tee k8s.log
The workflow job has a step that sleeps for 1200 seconds: - name: Sleep for 1200s
run: sleep 1200s
shell: bash This might be necessary in some cases, but if possible, consider reducing the waiting time or use other mechanisms, such as checking if a condition is met or a service has started.
The scheduled cron job uses a hardcoded value: schedule:
- cron: "0 0 */1 * *" Consider parameterizing the cron schedule as an input variable, so it can be easily adjusted without modifying the code.
Some steps look like they can be combined, such as The key changes in the provided patch are as follows:
push:
branches: [ main ]
paths-ignore:
- '**/README.md'
pull_request:
branches: [ main ]
paths-ignore:
- '**/README.md'
matrix:
crun: ["1.8.4"]
exclude:
...
- crun: "1.7.1"
wasmedge: "0.11.0"
...
- crun: "1.7.2"
wasmedge: "0.11.2"
...
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0 .github/workflows/kubernetes-crio.ymlHere's a general code review for the provided GitHub Actions workflow:
Recommendations:
Overall, the workflow code looks well-structured and easy to read. The steps and annotations are clear and follow a logical sequence. The key changes in the patch are:
.github/workflows/kwasm-server.yml
- uses: actions/checkout@v2
env:
LOG_LEVEL: ${{ github.event.inputs.logLevel }} After this, you can modify your application code or container configuration to read the log level from the environment variable.
- run: |
result=$(curl -w "%{http_code}" -d "name=WasmEdge" -X POST http://localhost:8080)
echo $result
if [[ $result != *"200"* ]]; then
echo "Error: Failed Step"
exit 1
fi This will print the result of the curl command along with the HTTP status code. If the status code is not 200 (OK), the pipeline will fail and notify of the error.
- run: |
kubectl port-forward service/demo-service 8080 &
port_forward_pid=$!
sleep 10
# ... the rest of your commands ...
kill $port_forward_pid With these suggested improvements, the updated YAML script would look like: name: k8s kwasm http server
concurrency:
group: k8s-kwasm-server-${{ github.head_ref }}
cancel-in-progress: true
on:
workflow_dispatch:
inputs:
logLevel:
description: 'Log level'
required: true
default: 'info'
push:
branches: [ main ]
paths-ignore:
- '**/README.md'
pull_request:
branches: [ main ]
paths-ignore:
- '**/README.md'
schedule:
- cron: "0 0 */1 * *"
jobs:
k8s_kwasm_server:
runs-on: ubuntu-latest
env:
LOG_LEVEL: ${{ github.event.inputs.logLevel }}
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0
- uses: helm/kind-action@v1.4.0
- run: |
helm repo add kwasm http://kwasm.sh/kwasm-operator/
helm repo update
helm install -n kwasm --create-namespace kwasm kwasm/kwasm-operator
kubectl annotate node --all kwasm.sh/kwasm-node=true
kubectl apply -f kwasm/http-server/http_server_application.yaml
sleep 30
kubectl port-forward service/demo-service 8080 &
port_forward_pid=$!
sleep 10
result=$(curl -w "%{http_code}" -d "name=WasmEdge" -X POST http://localhost:8080)
echo $result
if [[ $result != *"200"* ]]; then
echo "Error: Failed Step"
exit 1
fi
kill $port_forward_pid
echo This patch introduces a GitHub Actions workflow called "k8s kwasm http server". Key changes and steps in the workflow are:
However, I recommend implementing the improvements suggested in my earlier response to make the workflow more robust and efficient. .github/workflows/kwasm.ymlOverall, this GitHub Actions workflow is well-structured and follows best practices. However, there are a few potential issues and improvements to consider:
The patch outlines a GitHub Actions workflow for a Kubernetes (k8s) WebAssembly (Wasm) test. Key changes and configurations in the workflow are:
kwasm/http-server/http_server_application.yamlOverall, the code looks good with a few recommendations for improvement. Here's a review of the key areas of the provided YAML file:
With these changes, a more optimized YAML configuration would look like: apiVersion: node.k8s.io/v1beta1
kind: RuntimeClass
metadata:
name: crun
handler: crun
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: demo-deployment
spec:
replicas: 2
selector:
matchLabels:
app: demo-app
template:
metadata:
labels:
app: demo-app
annotations:
module.wasm.image/variant: compat-smart
spec:
containers:
- name: demo-container
image: wasmedge/example-wasi-http:latest
ports:
- containerPort: 1234
resources:
limits:
cpu: "1"
memory: 256Mi
requests:
cpu: 100m
memory: 128Mi
livenessProbe:
httpGet:
path: /healthz
port: 1234
readinessProbe:
httpGet:
path: /ready
port: 1234
runtimeClassName: crun
---
apiVersion: v1
kind: Service
metadata:
name: demo-service
spec:
type: LoadBalancer
selector:
app: demo-app
ports:
- protocol: TCP
port: 8080
targetPort: 1234 The patch contains a Kubernetes configuration file, which sets up a
kwasm/simple_wasi_application.yaml
Other than these points, the source code appears to be well-formatted YAML and uses a consistent indentation of 2 spaces. This patch introduces the following key changes:
Additionally, the metadata section includes an annotation for the Wasm image variant ("compat-smart") and placeholder timestamps for creation. |
No description provided.
The text was updated successfully, but these errors were encountered: