4.9. 比较带有电信 RAN DU 参考配置的集群


在部署了电信 RAN DU 集群后,您可以使用 cluster-compare 插件来评估集群的电信 RAN DU 参考设计规格 (RDS) 的合规性。cluster-compare 插件是一个 OpenShift CLI (oc) 插件。该插件使用电信 RAN DU 参考配置来验证具有电信 RAN DU 自定义资源(CR)的集群。

电信 RAN DU 的特定于插件的引用配置打包在带有 Telco RAN DU CR 的容器镜像中。

有关 cluster-compare 插件的更多信息,请参阅"了解 cluster-compare 插件"。

先决条件

  • 您可以使用具有 cluster-admin 角色的用户访问集群。
  • 有访问 registry.redhat.io 容器镜像 registry 的凭证。
  • 已安装 cluster-compare 插件。

流程

  1. 运行以下命令,使用凭证登录到容器镜像 registry:

    $ podman login registry.redhat.io
    Copy to Clipboard Toggle word wrap
  2. 运行以下命令,从 ztp-site-generate-rhel8 容器镜像中提取内容:

    $ podman pull registry.redhat.io/openshift4/ztp-site-generate-rhel8:v4.19
    Copy to Clipboard Toggle word wrap
    $ mkdir -p ./out
    Copy to Clipboard Toggle word wrap
    $ podman run --log-driver=none --rm registry.redhat.io/openshift4/ztp-site-generate-rhel8:v4.19 extract /home/ztp --tar | tar x -C ./out
    Copy to Clipboard Toggle word wrap
  3. 运行以下命令,将集群的配置与引用配置进行比较:

    $ oc cluster-compare -r out/reference/metadata.yaml
    Copy to Clipboard Toggle word wrap

    输出示例

    ...
    
    **********************************
    
    Cluster CR: config.openshift.io/v1_OperatorHub_cluster 
    1
    
    Reference File: required/other/operator-hub.yaml 
    2
    
    Diff Output: diff -u -N /tmp/MERGED-2801470219/config-openshift-io-v1_operatorhub_cluster /tmp/LIVE-2569768241/config-openshift-io-v1_operatorhub_cluster
    --- /tmp/MERGED-2801470219/config-openshift-io-v1_operatorhub_cluster	2024-12-12 14:13:22.898756462 +0000
    +++ /tmp/LIVE-2569768241/config-openshift-io-v1_operatorhub_cluster	2024-12-12 14:13:22.898756462 +0000
    @@ -1,6 +1,6 @@
     apiVersion: config.openshift.io/v1
     kind: OperatorHub
     metadata:
    +  annotations: 
    3
    
    +    include.release.openshift.io/hypershift: "true"
       name: cluster
    -spec:
    -  disableAllDefaultSources: true
    
    **********************************
    
    Summary 
    4
    
    CRs with diffs: 11/12 
    5
    
    CRs in reference missing from the cluster: 40 
    6
    
    optional-image-registry:
      image-registry:
        Missing CRs: 
    7
    
        - optional/image-registry/ImageRegistryPV.yaml
    optional-ptp-config:
      ptp-config:
        One of the following is required:
        - optional/ptp-config/PtpConfigBoundary.yaml
        - optional/ptp-config/PtpConfigGmWpc.yaml
        - optional/ptp-config/PtpConfigDualCardGmWpc.yaml
        - optional/ptp-config/PtpConfigForHA.yaml
        - optional/ptp-config/PtpConfigMaster.yaml
        - optional/ptp-config/PtpConfigSlave.yaml
        - optional/ptp-config/PtpConfigSlaveForEvent.yaml
        - optional/ptp-config/PtpConfigForHAForEvent.yaml
        - optional/ptp-config/PtpConfigMasterForEvent.yaml
        - optional/ptp-config/PtpConfigBoundaryForEvent.yaml
      ptp-operator-config:
        One of the following is required:
        - optional/ptp-config/PtpOperatorConfig.yaml
        - optional/ptp-config/PtpOperatorConfigForEvent.yaml
    optional-storage:
      storage:
        Missing CRs:
        - optional/local-storage-operator/StorageLV.yaml
    
    ...
    
    No CRs are unmatched to reference CRs 
    8
    
    Metadata Hash: 09650c31212be9a44b99315ec14d2e7715ee194a5d68fb6d24f65fd5ddbe3c3c 
    9
    
    No patched CRs 
    10
    Copy to Clipboard Toggle word wrap

    1
    进行比较的 CR。该插件显示与对应模板不同的所有 CR。
    2
    与 CR 匹配的模板以进行比较。
    3
    Linux diff 格式的输出显示模板和集群 CR 之间的区别。
    4
    在插件报告了每个 CR 的 diffs 行后,还会报告不同内容的概述。
    5
    与相关模块不同的进行比较的 CR 数量。
    6
    在参考配置中存在但在实时集群中缺失的 CR 数量。
    7
    在参考配置中存在但在实时集群中缺失的 CR 列表。
    8
    与参考配置中对应的模板不匹配的 CR。
    9
    用于识别参考配置的元数据哈希。
    10
    进行了补丁的 CR 列表。
返回顶部
Red Hat logoGithubredditYoutubeTwitter

学习

尝试、购买和销售

社区

关于红帽文档

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

让开源更具包容性

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

關於紅帽

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

Theme

© 2025 Red Hat