Skip to content

Commit 259e668

Browse files
authored
Merge pull request #90772 from rohennes/OCPBUGS-53394
OCPBUGS-53394: Fixing conditionalization
2 parents 107f5a2 + 35014ae commit 259e668

File tree

6 files changed

+298
-149
lines changed

6 files changed

+298
-149
lines changed
Lines changed: 158 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,158 @@
1+
// Module included in the following assemblies:
2+
//
3+
// * scalability_and_performance/telco_ref_design_specs/core/telco-core-ref-crs.adoc
4+
5+
:_mod-docs-content-type: PROCEDURE
6+
7+
[id="using-cluster-compare-telco_core_{context}"]
8+
= Comparing a cluster with the {rds} reference configuration
9+
10+
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).
11+
12+
The plugin-specific reference configuration for {rds} is packaged in a container image with the {rds} CRs.
13+
14+
For further information about the `cluster-compare` plugin, see "Understanding the cluster-compare plugin".
15+
16+
.Prerequisites
17+
18+
* You have access to the cluster as a user with the `cluster-admin` role.
19+
20+
* You have credentials to access the `registry.redhat.io` container image registry.
21+
22+
* You installed the `cluster-compare` plugin.
23+
24+
.Procedure
25+
26+
. Log on to the container image registry with your credentials by running the following command:
27+
+
28+
[source,terminal]
29+
----
30+
$ podman login registry.redhat.io
31+
----
32+
33+
. Extract the content from the `telco-core-rds-rhel9` container image by running the following commands:
34+
+
35+
[source,terminal]
36+
----
37+
$ mkdir -p ./out
38+
----
39+
+
40+
[source,terminal]
41+
----
42+
$ podman run -it registry.redhat.io/openshift4/openshift-telco-core-rds-rhel9:v4.18 | base64 -d | tar xv -C out
43+
----
44+
+
45+
You can view the reference configuration in the `reference-crs-kube-compare/` directory.
46+
+
47+
[source,text]
48+
----
49+
out/telco-core-rds/configuration/reference-crs-kube-compare/
50+
├── metadata.yaml <1>
51+
├── optional <2>
52+
│ ├── logging
53+
│ ├── networking
54+
│ ├── other
55+
│ └── tuning
56+
└── required <3>
57+
├── networking
58+
├── other
59+
├── performance
60+
├── scheduling
61+
└── storage
62+
----
63+
<1> Configuration file for the reference configuration.
64+
<2> Directory for optional templates.
65+
<3> Directory for required templates.
66+
67+
. Compare the configuration for your cluster to the telco core reference configuration by running the following command:
68+
+
69+
[source,terminal]
70+
----
71+
$ oc cluster-compare -r out/telco-core-rds/configuration/reference-crs-kube-compare/metadata.yaml
72+
----
73+
+
74+
.Example output
75+
[source,terminal]
76+
----
77+
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
78+
79+
...
80+
81+
**********************************
82+
83+
Cluster CR: config.openshift.io/v1_OperatorHub_cluster <1>
84+
Reference File: required/other/operator-hub.yaml <2>
85+
Diff Output: diff -u -N /tmp/MERGED-2801470219/config-openshift-io-v1_operatorhub_cluster /tmp/LIVE-2569768241/config-openshift-io-v1_operatorhub_cluster
86+
--- /tmp/MERGED-2801470219/config-openshift-io-v1_operatorhub_cluster 2024-12-12 14:13:22.898756462 +0000
87+
+++ /tmp/LIVE-2569768241/config-openshift-io-v1_operatorhub_cluster 2024-12-12 14:13:22.898756462 +0000
88+
@@ -1,6 +1,6 @@
89+
apiVersion: config.openshift.io/v1
90+
kind: OperatorHub
91+
metadata:
92+
+ annotations: <3>
93+
+ include.release.openshift.io/hypershift: "true"
94+
name: cluster
95+
-spec:
96+
- disableAllDefaultSources: true
97+
98+
**********************************
99+
100+
Summary <4>
101+
CRs with diffs: 3/4 <5>
102+
CRs in reference missing from the cluster: 22 <6>
103+
other:
104+
other:
105+
Missing CRs: <7>
106+
- optional/other/control-plane-load-kernel-modules.yaml
107+
- optional/other/worker-load-kernel-modules.yaml
108+
required-networking:
109+
networking-root:
110+
Missing CRs:
111+
- required/networking/nodeNetworkConfigurationPolicy.yaml
112+
networking-sriov:
113+
Missing CRs:
114+
- required/networking/sriov/sriovNetwork.yaml
115+
- required/networking/sriov/sriovNetworkNodePolicy.yaml
116+
- required/networking/sriov/SriovOperatorConfig.yaml
117+
- required/networking/sriov/SriovSubscription.yaml
118+
- required/networking/sriov/SriovSubscriptionNS.yaml
119+
- required/networking/sriov/SriovSubscriptionOperGroup.yaml
120+
required-other:
121+
scheduling:
122+
Missing CRs:
123+
- required/other/catalog-source.yaml
124+
- required/other/icsp.yaml
125+
required-performance:
126+
performance:
127+
Missing CRs:
128+
- required/performance/PerformanceProfile.yaml
129+
required-scheduling:
130+
scheduling:
131+
Missing CRs:
132+
- required/scheduling/nrop.yaml
133+
- required/scheduling/NROPSubscription.yaml
134+
- required/scheduling/NROPSubscriptionNS.yaml
135+
- required/scheduling/NROPSubscriptionOperGroup.yaml
136+
- required/scheduling/sched.yaml
137+
required-storage:
138+
storage-odf:
139+
Missing CRs:
140+
- required/storage/odf-external/01-rook-ceph-external-cluster-details.secret.yaml
141+
- required/storage/odf-external/02-ocs-external-storagecluster.yaml
142+
- required/storage/odf-external/odfNS.yaml
143+
- required/storage/odf-external/odfOperGroup.yaml
144+
- required/storage/odf-external/odfSubscription.yaml
145+
No CRs are unmatched to reference CRs <8>
146+
Metadata Hash: fe41066bac56517be02053d436c815661c9fa35eec5922af25a1be359818f297 <9>
147+
No patched CRs <10>
148+
----
149+
<1> The CR under comparison. The plugin displays each CR with a difference from the corresponding template.
150+
<2> The template matching with the CR for comparison.
151+
<3> The output in Linux diff format shows the difference between the template and the cluster CR.
152+
<4> After the plugin reports the line diffs for each CR, the summary of differences are reported.
153+
<5> The number of CRs in the comparison with differences from the corresponding templates.
154+
<6> The number of CRs represented in the reference configuration, but missing from the live cluster.
155+
<7> The list of CRs represented in the reference configuration, but missing from the live cluster.
156+
<8> The CRs that did not match to a corresponding template in the reference configuration.
157+
<9> The metadata hash identifies the reference configuration.
158+
<10> The list of patched CRs.
Lines changed: 130 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,130 @@
1+
// Module included in the following assemblies:
2+
//
3+
// * scalability_and_performance/cluster-compare/using-the-cluster-compare-plugin.adoc
4+
// * scalability_and_performance/telco_ran_du_ref_design_specs/telco-ran-du-rds.adoc
5+
// * scalability_and_performance/telco_ref_design_specs/core/telco-core-ref-crs.adoc
6+
// *scalability_and_performance/telco_ref_design_specs/core/telco-core-ref-crs.adoc
7+
// *scalability_and_performance/telco_ref_design_specs/ran/telco-ran-ref-du-crs.adoc
8+
// *scalability_and_performance/cluster-compare/using-the-cluster-compare-plugin.adoc
9+
10+
:_mod-docs-content-type: PROCEDURE
11+
12+
[id="using-cluster-compare-telco-ran_{context}"]
13+
= Comparing a cluster with the {rds} reference configuration
14+
15+
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).
16+
17+
The plugin-specific reference configuration for {rds} is packaged in a container image with the {rds} CRs.
18+
19+
For further information about the `cluster-compare` plugin, see "Understanding the cluster-compare plugin".
20+
21+
.Prerequisites
22+
23+
* You have access to the cluster as a user with the `cluster-admin` role.
24+
25+
* You have credentials to access the `registry.redhat.io` container image registry.
26+
27+
* You installed the `cluster-compare` plugin.
28+
29+
.Procedure
30+
31+
. Log on to the container image registry with your credentials by running the following command:
32+
+
33+
[source,terminal]
34+
----
35+
$ podman login registry.redhat.io
36+
----
37+
38+
. Extract the content from the `ztp-site-generate-rhel8` container image by running the following commands::
39+
+
40+
[source,terminal,subs="attributes+"]
41+
----
42+
$ podman pull registry.redhat.io/openshift4/ztp-site-generate-rhel8:v{product-version}
43+
----
44+
+
45+
[source,terminal]
46+
----
47+
$ mkdir -p ./out
48+
----
49+
+
50+
[source,terminal,subs="attributes+"]
51+
----
52+
$ 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
53+
----
54+
55+
. Compare the configuration for your cluster to the reference configuration by running the following command:
56+
+
57+
[source,terminal]
58+
----
59+
$ oc cluster-compare -r out/reference/metadata.yaml
60+
----
61+
+
62+
.Example output
63+
[source,terminal]
64+
----
65+
...
66+
67+
**********************************
68+
69+
Cluster CR: config.openshift.io/v1_OperatorHub_cluster <1>
70+
Reference File: required/other/operator-hub.yaml <2>
71+
Diff Output: diff -u -N /tmp/MERGED-2801470219/config-openshift-io-v1_operatorhub_cluster /tmp/LIVE-2569768241/config-openshift-io-v1_operatorhub_cluster
72+
--- /tmp/MERGED-2801470219/config-openshift-io-v1_operatorhub_cluster 2024-12-12 14:13:22.898756462 +0000
73+
+++ /tmp/LIVE-2569768241/config-openshift-io-v1_operatorhub_cluster 2024-12-12 14:13:22.898756462 +0000
74+
@@ -1,6 +1,6 @@
75+
apiVersion: config.openshift.io/v1
76+
kind: OperatorHub
77+
metadata:
78+
+ annotations: <3>
79+
+ include.release.openshift.io/hypershift: "true"
80+
name: cluster
81+
-spec:
82+
- disableAllDefaultSources: true
83+
84+
**********************************
85+
86+
Summary <4>
87+
CRs with diffs: 11/12 <5>
88+
CRs in reference missing from the cluster: 40 <6>
89+
optional-image-registry:
90+
image-registry:
91+
Missing CRs: <7>
92+
- optional/image-registry/ImageRegistryPV.yaml
93+
optional-ptp-config:
94+
ptp-config:
95+
One of the following is required:
96+
- optional/ptp-config/PtpConfigBoundary.yaml
97+
- optional/ptp-config/PtpConfigGmWpc.yaml
98+
- optional/ptp-config/PtpConfigDualCardGmWpc.yaml
99+
- optional/ptp-config/PtpConfigForHA.yaml
100+
- optional/ptp-config/PtpConfigMaster.yaml
101+
- optional/ptp-config/PtpConfigSlave.yaml
102+
- optional/ptp-config/PtpConfigSlaveForEvent.yaml
103+
- optional/ptp-config/PtpConfigForHAForEvent.yaml
104+
- optional/ptp-config/PtpConfigMasterForEvent.yaml
105+
- optional/ptp-config/PtpConfigBoundaryForEvent.yaml
106+
ptp-operator-config:
107+
One of the following is required:
108+
- optional/ptp-config/PtpOperatorConfig.yaml
109+
- optional/ptp-config/PtpOperatorConfigForEvent.yaml
110+
optional-storage:
111+
storage:
112+
Missing CRs:
113+
- optional/local-storage-operator/StorageLV.yaml
114+
115+
...
116+
117+
No CRs are unmatched to reference CRs <8>
118+
Metadata Hash: 09650c31212be9a44b99315ec14d2e7715ee194a5d68fb6d24f65fd5ddbe3c3c <9>
119+
No patched CRs <10>
120+
----
121+
<1> The CR under comparison. The plugin displays each CR with a difference from the corresponding template.
122+
<2> The template matching with the CR for comparison.
123+
<3> The output in Linux diff format shows the difference between the template and the cluster CR.
124+
<4> After the plugin reports the line diffs for each CR, the summary of differences are reported.
125+
<5> The number of CRs in the comparison with differences from the corresponding templates.
126+
<6> The number of CRs represented in the reference configuration, but missing from the live cluster.
127+
<7> The list of CRs represented in the reference configuration, but missing from the live cluster.
128+
<8> The CRs that did not match to a corresponding template in the reference configuration.
129+
<9> The metadata hash identifies the reference configuration.
130+
<10> The list of patched CRs.

0 commit comments

Comments
 (0)