第 7 章 Service Registry Operator 配置参考
本章提供了用于配置 Service Registry Operator 来部署 Service Registry Operator 的自定义资源的详细信息:
7.1. Service Registry 自定义资源 复制链接链接已复制到粘贴板!
复制链接链接已复制到粘贴板!
Service Registry Operator 定义了一个 ApicurioRegistry 自定义资源(CR),代表 OpenShift 上的单一 Service Registry 部署。
用户创建并维护这些资源对象,以指示 Service Registry Operator 如何部署和配置 Service Registry。
ApicurioRegistry CR 示例
以下命令显示 ApicurioRegistry 资源:
oc get apicurioregistry
oc edit apicurioregistry example-apicurioregistry
apiVersion: registry.apicur.io/v1
kind: ApicurioRegistry
metadata:
name: example-apicurioregistry
namespace: demo-kafka
# ...
spec:
configuration:
persistence: kafkasql
kafkasql:
bootstrapServers: 'my-cluster-kafka-bootstrap.demo-kafka.svc:9092'
deployment:
host: >-
example-apicurioregistry.demo-kafka.example.com
status:
conditions:
- lastTransitionTime: "2021-05-03T10:47:11Z"
message: ""
reason: Reconciled
status: "True"
type: Ready
info:
host: example-apicurioregistry.demo-kafka.example.com
managedResources:
- kind: Deployment
name: example-apicurioregistry-deployment
namespace: demo-kafka
- kind: Service
name: example-apicurioregistry-service
namespace: demo-kafka
- kind: Ingress
name: example-apicurioregistry-ingress
namespace: demo-kafka
重要
默认情况下,Service Registry Operator 只监视自己的项目命名空间。因此,如果您手动部署 Operator,则必须在同一命名空间中创建 ApicurioRegistry CR。您可以通过在 Operator Deployment 资源中更新 WATCH_NAMESPACE 环境变量来修改此行为。