gcloud configuration field behavior

The --config flag on the update command accepts fields to configure the behavior of Config Sync.

Unlike the --config flag on the apply command, the --config flag on the update command does not define a Google Cloud CLI representation of the underlying configuration API fields. Instead, the --config flag on the update command adopts the schema of the Spec API field directly.

This page documents the additional gcloud CLI-specific handling of the configuration fields before the update command sends them to the API.

Default field values

Key Description
configSync.enabled Installation defaults to true.
version The Config Sync version defaults to its existing value in the membership configuration, or if it's not configured, the version of Config Sync installed on the membership's cluster. Use the describe command to view these values. If Config Sync is not installed on the cluster, this field defaults to the latest version.

Unsupported fields

The --config flag on the update command errors if any of the following legacy fields are set:

  • configSync.metricsGcpServiceAccountEmail
  • policyController
  • hierarchyController
  • binauthz
  • management

Example configuration files

This section provides examples of configurations which can be passed to the --config flag on the update command.

Compared to the examples on the apply command page, the following configurations don't contain applySpecVersion and spec fields. The configSync.deploymentOverrides[].deploymentName field is spec.configSync.deploymentOverrides[].name for the apply command. Other fields, including ones not in the following examples, are named differently as well.

The following example shows a basic configuration:

configSync:
  enabled: true
  sourceFormat: unstructured
  git:
    syncRepo: https://github.com/GoogleCloudPlatform/anthos-config-management-samples
    syncBranch: main
    secretType: none
    policyDir: config-sync-quickstart/multirepo/root

The following example shows a more complex configuration:

configSync:
  enabled: true
  stopSyncing: true
  sourceFormat: unstructured
  git:
    syncRepo: https://github.com/GoogleCloudPlatform/anthos-config-management-samples
    syncBranch: main
    secretType: none
    policyDir: config-sync-quickstart/multirepo/root
  deploymentOverrides:
  - deploymentName: reconciler-manager
    deploymentNamespace: config-management-system
    containers:
    - containerName: reconciler-manager
      cpuRequest: 50m
      cpuLimit: 100m
      memoryRequest: 256Mi
      memoryLimit: 512Mi