# ClusterOptimizationConfiguration reference

> Fields of the ClusterOptimizationConfiguration custom resource

---

Site [llms.txt](/llms.txt)

---

`apiVersion: optimize.stormforge.io/v2`

Scope: Cluster.

For usage and examples, see [Configure optimization using CRDs](/docs/configure/optimization-configurations/).

Fields marked <strong>\*</strong> are required.

## ClusterOptimizationConfiguration {#ClusterOptimizationConfiguration}

ClusterOptimizationConfiguration is the Schema for the ClusterOptimizationConfiguration API.

| Field | Description |
|-------|-------------|
| `apiVersion`<br>*string* | `optimize.stormforge.io/v2` |
| `kind`<br>*string* | `ClusterOptimizationConfiguration` |
| `metadata`<br>*[ObjectMeta](https://kubernetes.io/docs/reference/kubernetes-api/definitions/object-meta-v1-meta/#ObjectMeta)* | Standard object metadata. |
| `spec`<br>*[ClusterOptimizationConfigurationSpec](#ClusterOptimizationConfigurationSpec)* | ClusterOptimizationConfigurationSpec defines the desired state of ClusterOptimizationConfiguration. |

## ClusterOptimizationConfigurationSpec {#ClusterOptimizationConfigurationSpec}

ClusterOptimizationConfigurationSpec defines the desired state of ClusterOptimizationConfiguration.

| Field | Description |
|-------|-------------|
| `match`<br>*object* | Gating applied to every rule in this configuration. Rules may narrow further with their own match. |
| `match.anyOf`<br>*object array* | Terms that are OR-ed together, of which at least one must match. Each term's own criteria are AND-ed within the term. A null or empty term matches no objects. Must contain at least 1 item. |
| `match.anyOf.expression`<br>*string* | CEL expression evaluated against the workload via the `object` variable. |
| `match.anyOf.namespaceSelector`<br>*string* | Selector applied to the labels of the workload's namespace. |
| `match.anyOf.objectSelector`<br>*string* | Selector applied to the labels of the workload. Named to align with the CEL `object` variable. |
| `match.expression`<br>*string* | CEL expression evaluated against the workload via the `object` variable. |
| `match.namespaceSelector`<br>*string* | Selector applied to the labels of the workload's namespace. |
| `match.objectSelector`<br>*string* | Selector applied to the labels of the workload. Named to align with the CEL `object` variable. |
| `order`<br>*integer* | Defaults to `0`. Value must be an integer between -1000 and 1000. |
| `rules`<br>*object array* | ClusterOptimizationConfig defines a single optimization configuration entry. Entries are keyed on `name`. |
| `rules.match`<br>*object* | ClusterMatch is the cluster-scoped counterpart of Match, combining its terms the same way. An empty ClusterMatch matches every workload. |
| `rules.match.anyOf`<br>*object array* | Terms that are OR-ed together, of which at least one must match. Each term's own criteria are AND-ed within the term. A null or empty term matches no objects. Must contain at least 1 item. |
| `rules.match.anyOf.expression`<br>*string* | CEL expression evaluated against the workload via the `object` variable. |
| `rules.match.anyOf.namespaceSelector`<br>*string* | Selector applied to the labels of the workload's namespace. |
| `rules.match.anyOf.objectSelector`<br>*string* | Selector applied to the labels of the workload. Named to align with the CEL `object` variable. |
| `rules.match.expression`<br>*string* | CEL expression evaluated against the workload via the `object` variable. |
| `rules.match.namespaceSelector`<br>*string* | Selector applied to the labels of the workload's namespace. |
| `rules.match.objectSelector`<br>*string* | Selector applied to the labels of the workload. Named to align with the CEL `object` variable. |
| `rules.name`&nbsp;<strong>\*</strong><br>*string* |  |
| `rules.settings`&nbsp;<strong>\*</strong><br>*object array* | ConfigItem represents a single configuration entry with a name and one or more values. Entries are keyed on `name`. Either value or values must be set, but not both. |
| `rules.settings.name`&nbsp;<strong>\*</strong><br>*string* |  |
| `rules.settings.value`<br>*string* |  |
| `rules.settings.values`<br>*string array* |  |
