This page explains the different fields that you can set in your
`ConfigManagement` object. You can use this object when you are configuring
Config Sync using `kubectl` commands.

> [!NOTE]
> **Note:** The gcloud CLI apply command uses a [different file format](https://docs.cloud.google.com/kubernetes-engine/config-sync/docs/reference/gcloud-apply-fields.md.txt) than the `ConfigManagement` object.

> [!CAUTION]
> **Caution:** Don't change configuration values outside the `spec` field.

## Configuration for Config Sync features

| Key | Description |
|---|---|
| `spec.enableMultiRepo` | If `true`, enables the RootSync and RepoSync APIs. These APIs provide you with additional [Config Sync features](https://docs.cloud.google.com/kubernetes-engine/config-sync/docs/reference/rootsync-reposync-fields.md.txt), such as syncing from multiple repositories. and [syncing Kustomize and Helm configurations](https://docs.cloud.google.com/kubernetes-engine/config-sync/docs/tutorials/config-sync-helm.md.txt). Defaults to `false`. |
| `spec.preventDrift` | If `true`, enables the Config Sync admission webhook to [prevent drifts](https://docs.cloud.google.com/kubernetes-engine/config-sync/docs/how-to/prevent-config-drift.md.txt) by rejecting conflicting changes from being pushed to live clusters. Defaults to `false`. Config Sync always remediates drifts no matter the value of this field. |

## Configuration for behavior of the ConfigManagement object

| Key | Description |
|---|---|
| `spec.clusterName` | The user-defined name for the cluster used by [ClusterSelectors](https://docs.cloud.google.com/kubernetes-engine/config-sync/docs/how-to/cluster-scoped-objects.md.txt#configure_a_subset_of_clusters) to group clusters together. Unique within an Config Sync installation. You cannot configure this field in the Google Cloud console. |

## Example ConfigManagement object

```yaml
apiVersion: configmanagement.gke.io/v1
kind: ConfigManagement
metadata:
  name: config-management
spec:
  clusterName: my-cluster
  enableMultiRepo: true
```