搜索

7.2. Service Registry CR spec

download PDF

specApicurioRegistry CR 的一部分,用于为 Operator 提供所需状态或配置。

ApicurioRegistry CR spec 内容

以下示例块包含可能 spec 配置选项的完整树。有些字段可能不是必需字段,或者不应同时定义。

spec:
  configuration:
    persistence: <string>
    sql:
      dataSource:
        url: <string>
        userName: <string>
        password: <string>
    kafkasql:
      bootstrapServers: <string>
      security:
        tls:
          truststoreSecretName: <string>
          keystoreSecretName: <string>
        scram:
          mechanism: <string>
          truststoreSecretName: <string>
          user: <string>
          passwordSecretName: <string>
    ui:
      readOnly: <string>
    logLevel: <string>
    registryLogLevel: <string>
    security:
      keycloak:
        url: <string>
        realm: <string>
        apiClientId: <string>
        uiClientId: <string>
      https:
        disableHttp: <bool>
        secretName: <string>
    env: <k8s.io/api/core/v1 []EnvVar>
  deployment:
    replicas: <int32>
    host: <string>
    affinity: <k8s.io/api/core/v1 Affinity>
    tolerations: <k8s.io/api/core/v1 []Toleration>
    imagePullSecrets: <k8s.io/api/core/v1 []LocalObjectReference>
    metadata:
      annotations: <map[string]string>
      labels: <map[string]string>
    managedResources:
      disableIngress: <bool>
      disableNetworkPolicy: <bool>
	  disablePodDisruptionBudget: <bool>
    podTemplateSpecPreview: <k8s.io/api/core/v1 PodTemplateSpec>

下表描述了每个配置选项:

表 7.1. ApicurioRegistry CR spec 配置选项
配置选项type默认值描述

配置

-

-

Service Registry 应用程序配置部分

configuration/persistence

字符串

required

存储后端。sql,kafkasql之一

configuration/sql

-

-

SQL 存储后端配置

configuration/sql/dataSource

-

-

SQL 存储后端的数据库连接配置

configuration/sql/dataSource/url

字符串

required

数据库连接 URL 字符串

configuration/sql/dataSource/userName

字符串

required

数据库连接用户

configuration/sql/dataSource/password

字符串

empty

数据库连接密码

configuration/kafkasql

-

-

Kafka 存储后端配置

configuration/kafkasql/bootstrapServers

字符串

required

Kafka bootstrap 服务器 URL,用于流存储后端

configuration/kafkasql/security/tls

-

-

为 Kafka 存储后端配置 TLS 身份验证的部分

configuration/kafkasql/security/tls/truststoreSecretName

字符串

required

包含 Kafka 的 TLS 信任存储的 secret 名称

configuration/kafkasql/security/tls/keystoreSecretName

字符串

required

包含用户 TLS 密钥存储的 secret 名称

configuration/kafkasql/security/scram/truststoreSecretName

字符串

required

包含 Kafka 的 TLS 信任存储的 secret 名称

configuration/kafkasql/security/scram/user

字符串

required

SCRAM 用户名

configuration/kafkasql/security/scram/passwordSecretName

字符串

required

包含 SCRAM 用户密码的 secret 名称

configuration/kafkasql/security/scram/mechanism

字符串

SCRAM-SHA-512

SASL 机制

configuration/ui

-

-

Service Registry web 控制台设置

configuration/ui/readOnly

字符串

false

将 Service Registry web 控制台设置为只读模式

configuration/logLevel

字符串

INFO

Service Registry 日志级别,用于非Apicurio 组件和库。INFO,DEBUG之一

configuration/registryLogLevel

字符串

INFO

Service Registry 日志级别,用于 Apicurio 应用程序组件(不包括非Apicurio 组件和库)。INFO,DEBUG之一

configuration/security

-

-

Service Registry web 控制台和 REST API 安全设置

configuration/security/keycloak

-

-

使用红帽单点登录的 Web 控制台和 REST API 安全配置

configuration/security/keycloak/url

字符串

required

Red Hat Single Sign-On URL

configuration/security/keycloak/realm

字符串

required

Red Hat Single Sign-On 域

configuration/security/keycloak/apiClientId

字符串

registry-client-api

用于 REST API 的 Red Hat Single Sign-On 客户端

configuration/security/keycloak/uiClientId

字符串

registry-client-ui

Red Hat Single Sign-On 客户端用于 Web 控制台

configuration/security/https

-

-

配置 HTTPS。如需了解更多详细信息,请参阅从 OpenShift 集群内配置到 Service Registry 的 HTTPS 连接

configuration/security/https/sercretName

字符串

empty

包含 HTTPS 证书和密钥的 Kubernetes Secret 名称,必须分别命名为 tls.crttls.key。设置此字段可启用 HTTPS,反之亦然。

configuration/security/https/disableHttp

bool

false

禁用 HTTP 端口和 Ingress。HTTPS 必须启用为前提条件。

configuration/env

k8s.io/api/core/v1 []EnvVar

empty

配置要提供给 Service Registry pod 的环境变量列表。如需了解更多详细信息,请参阅管理 Service Registry 环境变量

部署

-

-

Service Registry 部署设置部分

deployment/replicas

正整数

1

要部署的 Service Registry pod 数量

deployment/host

字符串

自动生成的

提供 Service Registry 控制台和 API 的主机/URL。如果可能,Service Registry Operator 会尝试根据集群路由器的设置来确定正确的值。该值仅自动生成一次,因此用户之后可以覆盖它。

deployment/affinity

k8s.io/api/core/v1 Affinity

empty

Service Registry 部署关联性配置

deployment/tolerations

k8s.io/api/core/v1 []Toleration

empty

Service Registry 部署容限配置

deployment/imagePullSecrets

k8s.io/api/core/v1 []LocalObjectReference

empty

为 Service Registry 部署配置镜像 pull secret

deployment/metadata

-

-

为 Service Registry pod 配置一组标签或注解。

deployment/metadata/labels

map[string]string

empty

为 Service Registry pod 配置一组标签

deployment/metadata/annotations

map[string]string

empty

为 Service Registry pod 配置一组注解

deployment/managedResources

-

-

配置 Service Registry Operator 如何管理 Kubernetes 资源的部分。如需了解更多详细信息,请参阅 Service Registry 受管资源

deployment/managedResources/disableIngress

bool

false

如果设置,Operator 将不会为 Service Registry 部署创建和管理 Ingress 资源。

deployment/managedResources/disableNetworkPolicy

bool

false

如果设置,Operator 将不会为 Service Registry 部署创建和管理 NetworkPolicy 资源。

deployment/managedResources/disablePodDisruptionBudget

bool

false

如果设置,Operator 将不会为 Service Registry 部署创建和管理 PodDisruptionBudget 资源。

deployment/podTemplateSpecPreview

k8s.io/api/core/v1 PodTemplateSpec

empty

配置 Service Registry 部署资源的部分。如需了解更多详细信息,请参阅使用 PodTemplate 配置 Service Registry 部署

注意

如果将某个选项标记为 必需的,则可能对正在启用的其他配置选项具有条件。可以接受空值,但 Operator 不执行指定的操作。

Red Hat logoGithubRedditYoutubeTwitter

学习

尝试、购买和销售

社区

关于红帽文档

通过我们的产品和服务,以及可以信赖的内容,帮助红帽用户创新并实现他们的目标。

让开源更具包容性

红帽致力于替换我们的代码、文档和 Web 属性中存在问题的语言。欲了解更多详情,请参阅红帽博客.

關於紅帽

我们提供强化的解决方案,使企业能够更轻松地跨平台和环境(从核心数据中心到网络边缘)工作。

© 2024 Red Hat, Inc.