第 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
环境变量来修改此行为。