12.3. 为 Red Hat OpenShift Container Platform 上的红帽构建 Kogito 微服务设置自定义探测
12.3. 为 Red Hat OpenShift Container Platform 上的红帽构建 Kogito 微服务设置自定义探测
您还可以为存活度、就绪度和启动探测配置自定义端点。
流程
在项目的 KogitoRuntime YAML 文件中定义探测,如下例所示:
使用自定义探测端点构建的 Kogito 微服务自定义资源示例
apiVersion: rhpam.kiegroup.org/v1 # Red Hat build of Kogito API for this service
kind: KogitoRuntime
metadata:
name: process-quarkus-example # Application name
spec:
replicas: 1
probes:
livenessProbe:
httpGet:
path: /probes/live # Liveness endpoint
port: 8080
readinessProbe:
httpGet:
path: /probes/ready # Readiness endpoint
port: 8080
startupProbe:
tcpSocket:
port: 8080
apiVersion: rhpam.kiegroup.org/v1 # Red Hat build of Kogito API for this servicekind: KogitoRuntime
metadata:name: process-quarkus-example # Application namespec:replicas:1probes:livenessProbe:httpGet:path: /probes/live # Liveness endpointport:8080readinessProbe:httpGet:path: /probes/ready # Readiness endpointport:8080startupProbe:tcpSocket:port:8080
Copy to ClipboardCopied!Toggle word wrapToggle overflow