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插件。
流程
运行以下命令,使用凭证登录到容器镜像 registry:
$ podman login registry.redhat.io运行以下命令,从
ztp-site-generate-rhel8容器镜像中提取内容:$ podman pull registry.redhat.io/openshift4/ztp-site-generate-rhel8:v4.20$ mkdir -p ./out$ podman run --log-driver=none --rm registry.redhat.io/openshift4/ztp-site-generate-rhel8:v4.20 extract /home/ztp --tar | tar x -C ./out运行以下命令,将集群的配置与引用配置进行比较:
$ oc cluster-compare -r out/reference/metadata.yaml输出示例
... ********************************** Cluster CR: config.openshift.io/v1_OperatorHub_cluster1 Reference File: required/other/operator-hub.yaml2 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 ********************************** Summary4 CRs with diffs: 11/125 CRs in reference missing from the cluster: 406 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 CRs8 Metadata Hash: 09650c31212be9a44b99315ec14d2e7715ee194a5d68fb6d24f65fd5ddbe3c3c9 No patched CRs10