8.2.8. 升级主题 Operator 以支持 v1beta2

先决条件

  • 支持 v1beta2 API 版本的一个 Cluster Operator 已启动且正在运行。

流程

对部署中的每个 Kafka 自定义资源执行以下步骤。

  1. 更新编辑器中的 Kafka 自定义资源。

    oc edit kafka KAFKA-CLUSTER
  2. 如果使用 Kafka.spec.topicOperator:

    1. 关联性.spec.topicOperator.affinity 移到 .spec.entityOperator.template.pod.affinity
    2. 容限.spec.topicOperator.tolerations 移到 .spec.entityOperator.template.pod.tolerations
    3. move .spec.topicOperator.tlsSidecar to .spec.entityOperator.tlsSidecar.
    4. 移动 关联性容限tlsSidecar 后,将剩余的配置 in .spec.topicOperator 移到 .spec.entityOperator.topicOperator
  3. 如果 type: 外部 日志记录配置了 in .spec.topicOperator.logging:

    替换包含日志配置的 ConfigMap 名称

    logging:
      type: external
      name: my-config-map

    使用 valueFrom.configMapKeyRef 字段,并指定将日志记录存储在的 ConfigMap 名称和

    logging:
      type: external
      valueFrom:
        configMapKeyRef:
          name: my-config-map
          key: log4j2.properties
    注意

    您还可以在 Entity Operator 升级 过程中完成这个步骤。

  4. 保存文件,退出编辑器并等待更新的自定义资源得到协调。