Skip to content

Commit

Permalink
Add Kubernetes health check route to REST server (#445)
Browse files Browse the repository at this point in the history
Co-authored-by: Logan Adams <[email protected]>
  • Loading branch information
richiejp and loadams authored Aug 21, 2024
1 parent 62c81b8 commit 7d80471
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions mii/grpc_related/restful_gateway.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,10 @@ def terminate():
threading.Thread(target=shutdown, args=(server_thread, )).start()
return "Shutting down RESTful API gateway server"

@app.route("/healthz", methods=["GET"])
def healthz():
return "ok"

api = Api(app)
path = "/{}/{}".format(RESTFUL_API_PATH, deployment_name)
api.add_resource(RestfulGatewayService, path)
Expand Down

0 comments on commit 7d80471

Please sign in to comment.