Class: Google::Apis::GkehubV2::ConfigManagementConfigSync

Inherits:
Object
  • Object
show all
Includes:
Core::Hashable, Core::JsonObjectSupport
Defined in:
lib/google/apis/gkehub_v2/classes.rb,
lib/google/apis/gkehub_v2/representations.rb,
lib/google/apis/gkehub_v2/representations.rb

Overview

Configuration for Config Sync

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ ConfigManagementConfigSync

Returns a new instance of ConfigManagementConfigSync.



370
371
372
# File 'lib/google/apis/gkehub_v2/classes.rb', line 370

def initialize(**args)
   update!(**args)
end

Instance Attribute Details

#allow_vertical_scaleBoolean Also known as: allow_vertical_scale?

Set to true to allow the vertical scaling. Defaults to false which disallows vertical scaling. This field is deprecated. Corresponds to the JSON property allowVerticalScale

Returns:

  • (Boolean)


314
315
316
# File 'lib/google/apis/gkehub_v2/classes.rb', line 314

def allow_vertical_scale
  @allow_vertical_scale
end

#enabledBoolean Also known as: enabled?

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. Corresponds to the JSON property enabled

Returns:

  • (Boolean)


324
325
326
# File 'lib/google/apis/gkehub_v2/classes.rb', line 324

def enabled
  @enabled
end

#gitGoogle::Apis::GkehubV2::ConfigManagementGitConfig

Git repo configuration for a single cluster. Corresponds to the JSON property git



330
331
332
# File 'lib/google/apis/gkehub_v2/classes.rb', line 330

def git
  @git
end

#metrics_gcp_service_account_emailString

The Email of the Google Cloud Service Account (GSA) used for exporting Config Sync metrics to Cloud Monitoring and Cloud Monarch when Workload Identity is enabled. The GSA should have the Monitoring Metric Writer (roles/monitoring. metricWriter) IAM role. The Kubernetes ServiceAccount default in the namespace config-management-monitoring should be bound to the GSA. Deprecated: If Workload Identity Federation for GKE is enabled, Google Cloud Service Account is no longer needed for exporting Config Sync metrics: https:// cloud.google.com/kubernetes-engine/enterprise/config-sync/docs/how-to/monitor- config-sync-cloud-monitoring#custom-monitoring. Corresponds to the JSON property metricsGcpServiceAccountEmail

Returns:

  • (String)


343
344
345
# File 'lib/google/apis/gkehub_v2/classes.rb', line 343

def 
  @metrics_gcp_service_account_email
end

#ociGoogle::Apis::GkehubV2::ConfigManagementOciConfig

OCI repo configuration for a single cluster. Corresponds to the JSON property oci



348
349
350
# File 'lib/google/apis/gkehub_v2/classes.rb', line 348

def oci
  @oci
end

#prevent_driftBoolean Also known as: prevent_drift?

Set to true to enable the Config Sync admission webhook to prevent drifts. If set to false, disables the Config Sync admission webhook and does not prevent drifts. Corresponds to the JSON property preventDrift

Returns:

  • (Boolean)


355
356
357
# File 'lib/google/apis/gkehub_v2/classes.rb', line 355

def prevent_drift
  @prevent_drift
end

#source_formatString

Specifies whether the Config Sync Repo is in "hierarchical" or "unstructured" mode. Corresponds to the JSON property sourceFormat

Returns:

  • (String)


362
363
364
# File 'lib/google/apis/gkehub_v2/classes.rb', line 362

def source_format
  @source_format
end

#stop_syncingBoolean Also known as: stop_syncing?

Set to true to stop syncing configs for a single cluster. Default to false. Corresponds to the JSON property stopSyncing

Returns:

  • (Boolean)


367
368
369
# File 'lib/google/apis/gkehub_v2/classes.rb', line 367

def stop_syncing
  @stop_syncing
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



375
376
377
378
379
380
381
382
383
384
# File 'lib/google/apis/gkehub_v2/classes.rb', line 375

def update!(**args)
  @allow_vertical_scale = args[:allow_vertical_scale] if args.key?(:allow_vertical_scale)
  @enabled = args[:enabled] if args.key?(:enabled)
  @git = args[:git] if args.key?(:git)
  @metrics_gcp_service_account_email = args[:metrics_gcp_service_account_email] if args.key?(:metrics_gcp_service_account_email)
  @oci = args[:oci] if args.key?(:oci)
  @prevent_drift = args[:prevent_drift] if args.key?(:prevent_drift)
  @source_format = args[:source_format] if args.key?(:source_format)
  @stop_syncing = args[:stop_syncing] if args.key?(:stop_syncing)
end