第 12 章 Red Hat OpenShift Container Platform 上的 Red Hat build of Kogito 探测
Red Hat OpenShift Container Platform 中的探测验证应用程序是否正常工作或需要重启。对于在红帽构建的 Quarkus 和 Spring Boot 上的红帽构建 Kogito 微服务构建,探测通过 HTTP 请求与应用程序交互,默认与扩展所公开的端点交互。因此,若要在 Red Hat OpenShift Container Platform 上运行 Red Hat build of Kogito 微服务,您必须导入扩展,以便为 存活度、就绪度和启动探测 提供应用程序可用性信息。
您可以为基于 Red Hat OpenShift Container Platform 上的 Quarkus 应用程序的 Kogito 服务添加健康检查扩展。
流程
在命令终端中,导航到项目的 pom.xml 文件,并为 quarkus-smallrye-health 扩展添加以下依赖项:
用于 Red Hat OpenShift Container Platform 上红帽构建的 Quarkus 应用程序的 SmallRye Health 依赖项