Specifies whether the Config Sync Repo is in "hierarchical" or "unstructured" mode.
↳ enabled
bool
Enables the installation of ConfigSync. If set to true, ConfigSync resources will be created and the other ConfigSync fields will be applied if exist. If set to false, all other ConfigSync fields will be ignored, ConfigSync resources will be deleted. If omitted, ConfigSync resources will be managed depends on the presence of the git or oci field.
↳ prevent_drift
bool
Set to true to enable the Config Sync admission webhook to prevent drifts. If set tofalse, disables the Config Sync admission webhook and does not prevent drifts.
The Email of the Google Cloud Service Account (GSA) used for exporting Config Sync metrics to Cloud Monitoring when Workload Identity is enabled. The GSA should have the Monitoring Metric Writer (roles/monitoring.metricWriter) IAM role. The Kubernetes ServiceAccountdefaultin the namespaceconfig-management-monitoringshould be bound to the GSA.
Specifies whether the Config Sync Repo is
in "hierarchical" or "unstructured" mode.
Returns
Type
Description
string
setSourceFormat
Specifies whether the Config Sync Repo is
in "hierarchical" or "unstructured" mode.
Parameter
Name
Description
var
string
Returns
Type
Description
$this
getEnabled
Enables the installation of ConfigSync.
If set to true, ConfigSync resources will be created and the other
ConfigSync fields will be applied if exist.
If set to false, all other ConfigSync fields will be ignored, ConfigSync
resources will be deleted.
If omitted, ConfigSync resources will be managed depends on the presence
of the git or oci field.
Returns
Type
Description
bool
hasEnabled
clearEnabled
setEnabled
Enables the installation of ConfigSync.
If set to true, ConfigSync resources will be created and the other
ConfigSync fields will be applied if exist.
If set to false, all other ConfigSync fields will be ignored, ConfigSync
resources will be deleted.
If omitted, ConfigSync resources will be managed depends on the presence
of the git or oci field.
Parameter
Name
Description
var
bool
Returns
Type
Description
$this
getPreventDrift
Set to true to enable the Config Sync admission webhook to prevent drifts.
If set tofalse, disables the Config Sync admission webhook and does not
prevent drifts.
Returns
Type
Description
bool
setPreventDrift
Set to true to enable the Config Sync admission webhook to prevent drifts.
If set tofalse, disables the Config Sync admission webhook and does not
prevent drifts.
The Email of the Google Cloud Service Account (GSA) used for exporting
Config Sync metrics to Cloud Monitoring when Workload Identity is enabled.
The GSA should have the Monitoring Metric Writer
(roles/monitoring.metricWriter) IAM role.
The Kubernetes ServiceAccountdefaultin the namespaceconfig-management-monitoringshould be bound to the GSA.
Returns
Type
Description
string
setMetricsGcpServiceAccountEmail
The Email of the Google Cloud Service Account (GSA) used for exporting
Config Sync metrics to Cloud Monitoring when Workload Identity is enabled.
The GSA should have the Monitoring Metric Writer
(roles/monitoring.metricWriter) IAM role.
The Kubernetes ServiceAccountdefaultin the namespaceconfig-management-monitoringshould be bound to the GSA.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-09-04 UTC."],[],[],null,["# Google Cloud Gke Hub V1 Client - Class ConfigSync (1.0.6)\n\nVersion latestkeyboard_arrow_down\n\n- [1.0.6 (latest)](/php/docs/reference/cloud-gke-hub/latest/ConfigManagement.V1.ConfigSync)\n- [1.0.5](/php/docs/reference/cloud-gke-hub/1.0.5/ConfigManagement.V1.ConfigSync)\n- [0.10.0](/php/docs/reference/cloud-gke-hub/0.10.0/ConfigManagement.V1.ConfigSync)\n- [0.9.5](/php/docs/reference/cloud-gke-hub/0.9.5/ConfigManagement.V1.ConfigSync)\n- [0.8.2](/php/docs/reference/cloud-gke-hub/0.8.2/ConfigManagement.V1.ConfigSync)\n- [0.7.1](/php/docs/reference/cloud-gke-hub/0.7.1/ConfigManagement.V1.ConfigSync)\n- [0.6.3](/php/docs/reference/cloud-gke-hub/0.6.3/ConfigManagement.V1.ConfigSync)\n- [0.5.6](/php/docs/reference/cloud-gke-hub/0.5.6/ConfigManagement.V1.ConfigSync) \nReference documentation and code samples for the Google Cloud Gke Hub V1 Client class ConfigSync.\n\nConfiguration for Config Sync\n\nGenerated from protobuf message `google.cloud.gkehub.configmanagement.v1.ConfigSync`\n\nNamespace\n---------\n\nGoogle \\\\ Cloud \\\\ GkeHub \\\\ ConfigManagement \\\\ V1\n\nMethods\n-------\n\n### __construct\n\nConstructor.\n\n### getGit\n\nGit repo configuration for the cluster.\n\n### hasGit\n\n### clearGit\n\n### setGit\n\nGit repo configuration for the cluster.\n\n### getSourceFormat\n\nSpecifies whether the Config Sync Repo is\nin \"hierarchical\" or \"unstructured\" mode.\n\n### setSourceFormat\n\nSpecifies whether the Config Sync Repo is\nin \"hierarchical\" or \"unstructured\" mode.\n\n### getEnabled\n\nEnables the installation of ConfigSync.\n\nIf set to true, ConfigSync resources will be created and the other\nConfigSync fields will be applied if exist.\nIf set to false, all other ConfigSync fields will be ignored, ConfigSync\nresources will be deleted.\nIf omitted, ConfigSync resources will be managed depends on the presence\nof the git or oci field.\n\n### hasEnabled\n\n### clearEnabled\n\n### setEnabled\n\nEnables the installation of ConfigSync.\n\nIf set to true, ConfigSync resources will be created and the other\nConfigSync fields will be applied if exist.\nIf set to false, all other ConfigSync fields will be ignored, ConfigSync\nresources will be deleted.\nIf omitted, ConfigSync resources will be managed depends on the presence\nof the git or oci field.\n\n### getPreventDrift\n\nSet to true to enable the Config Sync admission webhook to prevent drifts.\n\nIf set to `false`, disables the Config Sync admission webhook and does not\nprevent drifts.\n\n### setPreventDrift\n\nSet to true to enable the Config Sync admission webhook to prevent drifts.\n\nIf set to `false`, disables the Config Sync admission webhook and does not\nprevent drifts.\n\n### getOci\n\nOCI repo configuration for the cluster\n\n### hasOci\n\n### clearOci\n\n### setOci\n\nOCI repo configuration for the cluster\n\n### getMetricsGcpServiceAccountEmail\n\nThe Email of the Google Cloud Service Account (GSA) used for exporting\nConfig Sync metrics to Cloud Monitoring when Workload Identity is enabled.\n\nThe GSA should have the Monitoring Metric Writer\n(roles/monitoring.metricWriter) IAM role.\nThe Kubernetes ServiceAccount `default` in the namespace\n`config-management-monitoring` should be bound to the GSA.\n\n### setMetricsGcpServiceAccountEmail\n\nThe Email of the Google Cloud Service Account (GSA) used for exporting\nConfig Sync metrics to Cloud Monitoring when Workload Identity is enabled.\n\nThe GSA should have the Monitoring Metric Writer\n(roles/monitoring.metricWriter) IAM role.\nThe Kubernetes ServiceAccount `default` in the namespace\n`config-management-monitoring` should be bound to the GSA."]]