Commit 0f82c344 authored by Kostas Chartsias's avatar Kostas Chartsias
Browse files

addition of healthchecks

parent ff8a5ae6
Loading
Loading
Loading
Loading
+10 −0
Original line number Diff line number Diff line
@@ -36,3 +36,13 @@ dist/
# Environment variables
.env
.env.*

# Proxy-specific Dockerfiles
Dockerfile.*.proxy
Dockerfile.proxy*
docker-compose.proxy*

# Ignore real certificates
*.crt
certs/*.crt
+7 −1
Original line number Diff line number Diff line
import io
import sys
import objgraph
from quart import Response
from quart import Response, jsonify

def register_debug_routes(app):

    @app.route("/health", methods=["GET"])
    async def health_check():
        """Health check endpoint for Kubernetes liveness/readiness probes"""
        return jsonify({"status": "healthy"}), 200


    @app.route("/debug/objgraph", methods=["GET"])
    async def debug_objgraph():
        buf = io.StringIO()
+1 −1
Original line number Diff line number Diff line
# Module deployment via docker compose
# Module deployment via Docker Compose

## Prerequisites
- Docker
+6 −0
Original line number Diff line number Diff line
def health_check() -> tuple:
    """
    GET /health
    Health check endpoint for Kubernetes liveness/readiness probes
    """
    return {"status": "healthy"}, 200
 No newline at end of file
+20 −0
Original line number Diff line number Diff line
@@ -6,6 +6,26 @@ servers:
  - url: http://localhost:8080
paths:

  /health:
    get:
      summary: Health check endpoint
      operationId: controllers.experimental.health_controller.health_check
      responses:
        "200":
          description: Service is healthy
          content:
            application/json:
              schema:
                type: object
                properties:
                  status:
                    type: string
                    example: "healthy"
              example:
                status: "healthy"



  /sessions:
    post:
      summary: Create a new QoS session
Loading