Add readiness and liveliness probes such that the simapp can start sending data only when webui is ready#112
Conversation
…nding data only when webui is ready Signed-off-by: Arrobo, Gabriel <gabriel.arrobo@intel.com>
There was a problem hiding this comment.
Pull request overview
This PR adds readiness and liveness probes to the webui deployment and updates the simapp init container to wait for the webui HTTP endpoint before starting, ensuring that simapp only sends data when webui is ready to receive it.
Changes:
- Added HTTP-based readiness and liveness probes to the webui container
- Modified simapp init container to perform both DNS resolution and HTTP endpoint checks before proceeding
- Bumped chart versions for affected components
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| sdcore-helm-charts/Chart.yaml | Updated parent chart version and dependency versions to reflect changes |
| omec-sub-provision/templates/deployment-simapp.yaml | Replaced simple DNS lookup with comprehensive webui readiness check including HTTP endpoint verification |
| omec-sub-provision/Chart.yaml | Bumped chart version to reflect the init container changes |
| 5g-control-plane/templates/deployment-webui.yaml | Added readiness and liveness probes for the webui container using HTTP health checks |
| 5g-control-plane/Chart.yaml | Bumped chart version to reflect the probe additions |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Signed-off-by: Arrobo, Gabriel <gabriel.arrobo@intel.com>
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 5 out of 5 changed files in this pull request and generated 1 comment.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Signed-off-by: Arrobo, Gabriel <gabriel.arrobo@intel.com>
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 5 out of 5 changed files in this pull request and generated 2 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| sleep 2 | ||
| done | ||
| echo "${WEBUI_ADDR} DNS resolved, checking HTTP endpoint readiness..." | ||
| until RESPONSE=$(wget --spider --timeout=2 -S http://${WEBUI_ADDR}:${WEBUI_PORT}/config/v1/ 2>&1) && echo "$RESPONSE" | grep -q "HTTP/"; do |
There was a problem hiding this comment.
The grep pattern 'HTTP/' is fragile and will match any HTTP response including error responses (e.g., 404, 500). Consider checking for successful HTTP status codes (2xx or 3xx) by using grep -q 'HTTP/[0-9.]* [23][0-9][0-9]' to ensure the endpoint is truly ready.
| until RESPONSE=$(wget --spider --timeout=2 -S http://${WEBUI_ADDR}:${WEBUI_PORT}/config/v1/ 2>&1) && echo "$RESPONSE" | grep -q "HTTP/"; do | |
| until RESPONSE=$(wget --spider --timeout=2 -S http://${WEBUI_ADDR}:${WEBUI_PORT}/config/v1/ 2>&1) && echo "$RESPONSE" | grep -q 'HTTP/[0-9.]* [23][0-9][0-9]'; do |
This feature will be useful when the
simapp(orROC) sends its request in bulk/parallel. Note that currently, thesimappsends its request in sequence