1
0
mirror of https://github.com/openshift/openshift-docs.git synced 2026-02-05 12:46:18 +01:00

OCPBUGS-53243: Fixing manual matching wrong delimiter

This commit is contained in:
Ronan Hennessy
2025-03-18 17:17:29 +00:00
committed by openshift-cherrypick-robot
parent bbbbdfefac
commit 69af3ba937
6 changed files with 298 additions and 149 deletions

View File

@@ -0,0 +1,158 @@
// Module included in the following assemblies:
//
// * scalability_and_performance/telco_ref_design_specs/core/telco-core-ref-crs.adoc
:_mod-docs-content-type: PROCEDURE
[id="using-cluster-compare-telco_core_{context}"]
= Comparing a cluster with the {rds} reference configuration
After you deploy a {rds} cluster, you can use the `cluster-compare` plugin to assess the cluster's compliance with the {rds} reference design specifications (RDS). The `cluster-compare` plugin is an OpenShift CLI (`oc`) plugin. The plugin uses a {rds} reference configuration to validate the cluster with the {rds} custom resources (CRs).
The plugin-specific reference configuration for {rds} is packaged in a container image with the {rds} CRs.
For further information about the `cluster-compare` plugin, see "Understanding the cluster-compare plugin".
.Prerequisites
* You have access to the cluster as a user with the `cluster-admin` role.
* You have credentials to access the `registry.redhat.io` container image registry.
* You installed the `cluster-compare` plugin.
.Procedure
. Log on to the container image registry with your credentials by running the following command:
+
[source,terminal]
----
$ podman login registry.redhat.io
----
. Extract the content from the `telco-core-rds-rhel9` container image by running the following commands:
+
[source,terminal]
----
$ mkdir -p ./out
----
+
[source,terminal]
----
$ podman run -it registry.redhat.io/openshift4/openshift-telco-core-rds-rhel9:v4.18 | base64 -d | tar xv -C out
----
+
You can view the reference configuration in the `reference-crs-kube-compare/` directory.
+
[source,text]
----
out/telco-core-rds/configuration/reference-crs-kube-compare/
├── metadata.yaml <1>
├── optional <2>
│ ├── logging
│ ├── networking
│ ├── other
│ └── tuning
└── required <3>
├── networking
├── other
├── performance
├── scheduling
└── storage
----
<1> Configuration file for the reference configuration.
<2> Directory for optional templates.
<3> Directory for required templates.
. Compare the configuration for your cluster to the telco core reference configuration by running the following command:
+
[source,terminal]
----
$ oc cluster-compare -r out/telco-core-rds/configuration/reference-crs-kube-compare/metadata.yaml
----
+
.Example output
[source,terminal]
----
W1212 14:13:06.281590 36629 compare.go:425] Reference Contains Templates With Types (kind) Not Supported By Cluster: BFDProfile, BGPAdvertisement, BGPPeer, ClusterLogForwarder, Community, IPAddressPool, MetalLB, MultiNetworkPolicy, NMState, NUMAResourcesOperator, NUMAResourcesScheduler, NodeNetworkConfigurationPolicy, SriovNetwork, SriovNetworkNodePolicy, SriovOperatorConfig, StorageCluster
...
**********************************
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: 3/4 <5>
CRs in reference missing from the cluster: 22 <6>
other:
other:
Missing CRs: <7>
- optional/other/control-plane-load-kernel-modules.yaml
- optional/other/worker-load-kernel-modules.yaml
required-networking:
networking-root:
Missing CRs:
- required/networking/nodeNetworkConfigurationPolicy.yaml
networking-sriov:
Missing CRs:
- required/networking/sriov/sriovNetwork.yaml
- required/networking/sriov/sriovNetworkNodePolicy.yaml
- required/networking/sriov/SriovOperatorConfig.yaml
- required/networking/sriov/SriovSubscription.yaml
- required/networking/sriov/SriovSubscriptionNS.yaml
- required/networking/sriov/SriovSubscriptionOperGroup.yaml
required-other:
scheduling:
Missing CRs:
- required/other/catalog-source.yaml
- required/other/icsp.yaml
required-performance:
performance:
Missing CRs:
- required/performance/PerformanceProfile.yaml
required-scheduling:
scheduling:
Missing CRs:
- required/scheduling/nrop.yaml
- required/scheduling/NROPSubscription.yaml
- required/scheduling/NROPSubscriptionNS.yaml
- required/scheduling/NROPSubscriptionOperGroup.yaml
- required/scheduling/sched.yaml
required-storage:
storage-odf:
Missing CRs:
- required/storage/odf-external/01-rook-ceph-external-cluster-details.secret.yaml
- required/storage/odf-external/02-ocs-external-storagecluster.yaml
- required/storage/odf-external/odfNS.yaml
- required/storage/odf-external/odfOperGroup.yaml
- required/storage/odf-external/odfSubscription.yaml
No CRs are unmatched to reference CRs <8>
Metadata Hash: fe41066bac56517be02053d436c815661c9fa35eec5922af25a1be359818f297 <9>
No patched CRs <10>
----
<1> The CR under comparison. The plugin displays each CR with a difference from the corresponding template.
<2> The template matching with the CR for comparison.
<3> The output in Linux diff format shows the difference between the template and the cluster CR.
<4> After the plugin reports the line diffs for each CR, the summary of differences are reported.
<5> The number of CRs in the comparison with differences from the corresponding templates.
<6> The number of CRs represented in the reference configuration, but missing from the live cluster.
<7> The list of CRs represented in the reference configuration, but missing from the live cluster.
<8> The CRs that did not match to a corresponding template in the reference configuration.
<9> The metadata hash identifies the reference configuration.
<10> The list of patched CRs.

View File

@@ -0,0 +1,130 @@
// Module included in the following assemblies:
//
// * scalability_and_performance/cluster-compare/using-the-cluster-compare-plugin.adoc
// * scalability_and_performance/telco_ran_du_ref_design_specs/telco-ran-du-rds.adoc
// * scalability_and_performance/telco_ref_design_specs/core/telco-core-ref-crs.adoc
// *scalability_and_performance/telco_ref_design_specs/core/telco-core-ref-crs.adoc
// *scalability_and_performance/telco_ref_design_specs/ran/telco-ran-ref-du-crs.adoc
// *scalability_and_performance/cluster-compare/using-the-cluster-compare-plugin.adoc
:_mod-docs-content-type: PROCEDURE
[id="using-cluster-compare-telco-ran_{context}"]
= Comparing a cluster with the {rds} reference configuration
After you deploy a {rds} cluster, you can use the `cluster-compare` plugin to assess the cluster's compliance with the {rds} reference design specifications (RDS). The `cluster-compare` plugin is an OpenShift CLI (`oc`) plugin. The plugin uses a {rds} reference configuration to validate the cluster with the {rds} custom resources (CRs).
The plugin-specific reference configuration for {rds} is packaged in a container image with the {rds} CRs.
For further information about the `cluster-compare` plugin, see "Understanding the cluster-compare plugin".
.Prerequisites
* You have access to the cluster as a user with the `cluster-admin` role.
* You have credentials to access the `registry.redhat.io` container image registry.
* You installed the `cluster-compare` plugin.
.Procedure
. Log on to the container image registry with your credentials by running the following command:
+
[source,terminal]
----
$ podman login registry.redhat.io
----
. Extract the content from the `ztp-site-generate-rhel8` container image by running the following commands::
+
[source,terminal,subs="attributes+"]
----
$ podman pull registry.redhat.io/openshift4/ztp-site-generate-rhel8:v{product-version}
----
+
[source,terminal]
----
$ mkdir -p ./out
----
+
[source,terminal,subs="attributes+"]
----
$ podman run --log-driver=none --rm registry.redhat.io/openshift4/ztp-site-generate-rhel8:v{product-version} extract /home/ztp --tar | tar x -C ./out
----
. Compare the configuration for your cluster to the reference configuration by running the following command:
+
[source,terminal]
----
$ oc cluster-compare -r out/reference/metadata.yaml
----
+
.Example output
[source,terminal]
----
...
**********************************
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>
----
<1> The CR under comparison. The plugin displays each CR with a difference from the corresponding template.
<2> The template matching with the CR for comparison.
<3> The output in Linux diff format shows the difference between the template and the cluster CR.
<4> After the plugin reports the line diffs for each CR, the summary of differences are reported.
<5> The number of CRs in the comparison with differences from the corresponding templates.
<6> The number of CRs represented in the reference configuration, but missing from the live cluster.
<7> The list of CRs represented in the reference configuration, but missing from the live cluster.
<8> The CRs that did not match to a corresponding template in the reference configuration.
<9> The metadata hash identifies the reference configuration.
<10> The list of patched CRs.

View File

@@ -1,41 +1,12 @@
// Module included in the following assemblies:
//
// * scalability_and_performance/cluster-compare/using-the-cluster-compare-plugin.adoc
// * scalability_and_performance/telco_ran_du_ref_design_specs/telco-ran-du-rds.adoc
// * scalability_and_performance/telco_ref_design_specs/core/telco-core-ref-crs.adoc
// *scalability_and_performance/telco_ref_design_specs/core/telco-core-ref-crs.adoc
// *scalability_and_performance/telco_ref_design_specs/ran/telco-ran-ref-du-crs.adoc
// *scalability_and_performance/cluster-compare/using-the-cluster-compare-plugin.adoc
:_mod-docs-content-type: PROCEDURE
ifeval::["{context}" == "using-cluster-compare-plugin"]
:cluster-compare:
endif::[]
ifeval::["{context}" == "ran-core-ref-design-crs"]
:cluster-compare-core:
endif::[]
ifeval::["{context}" == "ran-ref-design-crs"]
:cluster-compare-ran:
endif::[]
[id="using-cluster-compare-telco_ref_{context}"]
ifdef::cluster-compare[= Example: Comparing a cluster with the telco core reference configuration]
ifdef::cluster-compare-core,cluster-compare-ran[= Comparing a cluster with the {rds} reference configuration]
= Example: Comparing a cluster with the telco core reference configuration
//Intro for procedure in telco core/RAN RDS assembly
ifdef::cluster-compare-core,cluster-compare-ran[]
After you deploy a {rds} cluster, you can use the `cluster-compare` plugin to assess the cluster's compliance with the {rds} reference design specifications (RDS). The `cluster-compare` plugin is an OpenShift CLI (`oc`) plugin. The plugin uses a {rds} reference configuration to validate the cluster with the {rds} custom resources (CRs).
The plugin-specific reference configuration for {rds} is packaged in a container image with the {rds} CRs.
For further information about the `cluster-compare` plugin, see "Understanding the cluster-compare plugin".
endif::cluster-compare-core,cluster-compare-ran[]
//Intro for procedure in cluster-compare assembly
ifdef::cluster-compare[]
You can use the `cluster-compare` plugin to compare a reference configuration with a configuration from a live cluster or `must-gather` data.
This example compares a configuration from a live cluster with the telco core reference configuration. The telco core reference configuration is derived from the telco core reference design specifications (RDS). The telco core RDS is designed for clusters to support large scale telco applications including control plane and some centralized data plane functions.
@@ -43,7 +14,6 @@ This example compares a configuration from a live cluster with the telco core re
The reference configuration is packaged in a container image with the telco core RDS.
For further examples of using the `cluster-compare` plugin with the telco core and telco RAN distributed unit (DU) profiles, see the "Additional resources" section.
endif::cluster-compare[]
.Prerequisites
@@ -55,14 +25,13 @@ endif::cluster-compare[]
.Procedure
. Login to the container image registry with your credentials by running the following command:
. Log on to the container image registry with your credentials by running the following command:
+
[source,terminal]
----
$ podman login registry.redhat.io
----
ifdef::cluster-compare-core,cluster-compare[]
. Extract the content from the `telco-core-rds-rhel9` container image by running the following commands:
+
[source,terminal]
@@ -189,111 +158,3 @@ No patched CRs <10>
<8> The CRs that did not match to a corresponding template in the reference configuration.
<9> The metadata hash identifies the reference configuration.
<10> The list of patched CRs.
endif::cluster-compare-core,cluster-compare[]
ifdef::cluster-compare-ran[]
. Extract the content from the `ztp-site-generate-rhel8` container image by running the following commands::
+
[source,terminal,subs="attributes+"]
----
$ podman pull registry.redhat.io/openshift4/ztp-site-generate-rhel8:v{product-version}
----
+
[source,terminal]
----
$ mkdir -p ./out
----
+
[source,terminal,subs="attributes+"]
----
$ podman run --log-driver=none --rm registry.redhat.io/openshift4/ztp-site-generate-rhel8:v{product-version} extract /home/ztp --tar | tar x -C ./out
----
. Compare the configuration for your cluster to the reference configuration by running the following command:
+
[source,terminal]
----
$ oc cluster-compare -r out/reference/metadata.yaml
----
+
.Example output
[source,terminal]
----
...
**********************************
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>
----
<1> The CR under comparison. The plugin displays each CR with a difference from the corresponding template.
<2> The template matching with the CR for comparison.
<3> The output in Linux diff format shows the difference between the template and the cluster CR.
<4> After the plugin reports the line diffs for each CR, the summary of differences are reported.
<5> The number of CRs in the comparison with differences from the corresponding templates.
<6> The number of CRs represented in the reference configuration, but missing from the live cluster.
<7> The list of CRs represented in the reference configuration, but missing from the live cluster.
<8> The CRs that did not match to a corresponding template in the reference configuration.
<9> The metadata hash identifies the reference configuration.
<10> The list of patched CRs.
endif::cluster-compare-ran[]
ifeval::["{context}" == "cluster-compare"]
:!cluster-compare:
endif::[]
ifeval::["{context}" == "cluster-compare-core"]
:!cluster-compare-core:
endif::[]
ifeval::["{context}" == "cluster-compare-ran"]
:!cluster-compare-ran:
endif::[]

View File

@@ -24,5 +24,5 @@ include::modules/using-cluster-compare-telco-ref.adoc[leveloffset=+1]
[role="_additional-resources"]
[id="additional-resources_{context}"]
== Additional resources
* xref:../../scalability_and_performance/telco-ran-du-rds.adoc#using-cluster-compare-telco_ref_ran-ref-design-crs[Comparing a cluster with the telco RAN DU reference configuration]
* xref:../../scalability_and_performance/telco-core-rds.adoc#using-cluster-compare-telco_ref_telco-core[Comparing a cluster with the telco core reference configuration]
* xref:../../scalability_and_performance/telco-ran-du-rds.adoc#using-cluster-compare-telco-ran_ran-ref-design-crs[Comparing a cluster with the telco RAN DU reference configuration]
* xref:../../scalability_and_performance/telco-core-rds.adoc#using-cluster-compare-telco_core_telco-core[Comparing a cluster with the telco core reference configuration]

View File

@@ -214,7 +214,7 @@ Use the CRs to form the common baseline used in all the specific use models unle
include::modules/telco-core-rds-container.adoc[leveloffset=+2]
include::modules/using-cluster-compare-telco-ref.adoc[leveloffset=+2]
include::modules/using-cluster-compare-telco-core.adoc[leveloffset=+2]
[role="_additional-resources"]
.Additional resources

View File

@@ -150,10 +150,6 @@ You can extract the complete set of RAN DU CRs from the `ztp-site-generate` cont
See xref:../edge_computing/ztp-preparing-the-hub-cluster.adoc#ztp-preparing-the-ztp-git-repository_ztp-preparing-the-hub-cluster[Preparing the {ztp} site configuration repository] for more information.
====
[role="_additional-resources"]
.Additional resources
* xref:../scalability_and_performance/cluster-compare/understanding-the-cluster-compare-plugin.adoc#understanding-the-cluster-compare-plugin[Understanding the cluster-compare plugin]
include::modules/telco-ran-crs-cluster-tuning.adoc[leveloffset=+2]
include::modules/telco-ran-crs-day-2-operators.adoc[leveloffset=+2]
@@ -161,9 +157,13 @@ include::modules/telco-ran-crs-day-2-operators.adoc[leveloffset=+2]
include::modules/telco-ran-crs-machine-configuration.adoc[leveloffset=+2]
:context: ran-ref-design-crs
include::modules/using-cluster-compare-telco-ref.adoc[leveloffset=+1]
include::modules/using-cluster-compare-telco-ran.adoc[leveloffset=+1]
:context: telco-ran-du
[role="_additional-resources"]
.Additional resources
* xref:../scalability_and_performance/cluster-compare/understanding-the-cluster-compare-plugin.adoc#understanding-the-cluster-compare-plugin[Understanding the cluster-compare plugin]
include::modules/ztp-telco-ran-software-versions.adoc[leveloffset=+1]
include::modules/ztp-telco-hub-cluster-software-versions.adoc[leveloffset=+1]