1
0
mirror of https://github.com/openshift/openshift-docs.git synced 2026-02-05 12:46:18 +01:00
Files
openshift-docs/modules/understanding-a-reference-config.adoc

39 lines
2.1 KiB
Plaintext

// Module included in the following assemblies:
// *scalability_and_performance/cluster-compare/understanding-the-cluster-compare-plugin.adoc
:_mod-docs-content-type: CONCEPT
[id="understanding-a-reference-config_{context}"]
= Understanding a reference configuration
The `cluster-compare` plugin uses a reference configuration to validate a configuration from a live cluster.
The reference configuration consists of a YAML file called `metadata.yaml`, which references a set of templates that represent the baseline configuration.
.Example directory structure for a reference configuration
[source,text]
----
├── metadata.yaml <1>
├── optional <2>
│ ├── optionalTemplate1.yaml
│ └── optionalTemplate2.yaml
├── required
│ ├── requiredTemplate3.yaml
│ └── requiredTemplate4.yaml
└── baselineClusterResources <3>
├── clusterResource1.yaml
├── clusterResource2.yaml
├── clusterResource3.yaml
└── clusterResource4.yaml
----
<1> The reference configuration consists of the `metadata.yaml` file and a set of templates.
<2> This example uses an optional and required directory structure for templates that are referenced by the `metadata.yaml` file.
<3> The configuration CRs to use as a baseline configuration for clusters.
During a comparison, the plugin matches each template to a configuration resource from the cluster.
The plugin evaluates optional or required fields in the template using features such as Golang templating syntax and inline regular expression validation. The `metadata.yaml` file applies additional validation rules to decide whether a template is optional or required and assesses template dependency relationships.
Using these features, the plugin identifies relevant configuration differences between the cluster and the reference configuration. For example, the plugin can highlight mismatched field values, missing resources, extra resources, field type mismatches, or version discrepancies.
For further information about configuring a reference configuration, see "Creating a reference configuration".