6.3. 管理 Apicurio Registry 环境变量


Apicurio Registry Operator 管理最常见的 Apicurio Registry 配置,但有一些选项尚不支持。如果 ApicurioRegistry CR 中没有高级别配置选项,您可以使用环境变量来调整它。您可以通过在 spec.configuration.env 字段中直接在 ApicurioRegistry CR 中设置环境变量来更新它们。然后,它们将转发到 Apicurio Registry 的 Deployment 资源。

流程

您可以使用 OpenShift Web 控制台或 CLI 管理 Apicurio Registry 环境变量。

OpenShift web 控制台
  1. 选择 Installed Operators 选项卡,然后选择 Red Hat Integration - Service Registry Operator。
  2. 在 Apicurio Registry 选项卡中,点 Apicurio Registry 部署的 ApicurioRegistry CR。
  3. 点 YAML 选项卡,然后根据需要编辑 spec.configuration.env 部分。以下示例演示了如何设置默认全局内容规则:

    apiVersion: registry.apicur.io/v1
    kind: ApicurioRegistry
    metadata:
      name: example-apicurioregistry
    spec:
      configuration:
        # ...
        env:
          - name: REGISTRY_RULES_GLOBAL_VALIDITY
            value: FULL # One of: NONE, SYNTAX_ONLY, FULL
          - name: REGISTRY_RULES_GLOBAL_COMPATIBILITY
            value: FULL # One of: NONE, BACKWARD, BACKWARD_TRANSITIVE, FORWARD, FORWARD_TRANSITIVE, FULL, FULL_TRANSITIVE
OpenShift CLI
  1. 选择安装 Apicurio Registry 的项目。
  2. 运行 oc get apicurioregistry 以获取 ApicurioRegistry CR 列表
  3. 在代表您要配置的 Apicurio Registry 实例的 CR 上运行 oc edit apicurioregistry。
  4. 在 spec.configuration.env 部分添加或修改环境变量。

    Apicurio Registry Operator 可能会尝试设置在 spec.configuration.env 字段中明确指定的环境变量。如果环境变量配置有冲突的值,则 Apicurio Registry Operator 设置的值会优先使用。

    您可以使用该功能的高级配置或使用显式指定的环境变量来避免这种冲突。以下是冲突配置示例:

    apiVersion: registry.apicur.io/v1
    kind: ApicurioRegistry
    metadata:
      name: example-apicurioregistry
    spec:
      configuration:
        # ...
        ui:
          readOnly: true
        env:
          - name: REGISTRY_UI_FEATURES_READONLY
            value: false

    此配置会导致 Apicurio Registry web 控制台处于只读模式。

Red Hat logoGithubRedditYoutubeTwitter

学习

尝试、购买和销售

社区

關於紅帽

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

让开源更具包容性

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

关于红帽文档

Legal Notice

Theme

© 2026 Red Hat
返回顶部