From d3b78001cfc802d03d43eff7a3470944681b7cd1 Mon Sep 17 00:00:00 2001 From: DCL Team Date: Wed, 13 Nov 2024 18:39:36 -0800 Subject: [PATCH] Automated DCL import. - 2792d0bbff838cdd4e91b57dbeac4b5422e2cd77 Automatic import from cloud_mmv2_dcl_20241113_1831_RC00 by DCL Team GitOrigin-RevId: 2792d0bbff838cdd4e91b57dbeac4b5422e2cd77 --- .../gkehub/alpha/feature_membership.proto | 7 ++++--- .../gkehub/beta/feature_membership.proto | 7 ++++--- python/proto/gkehub/feature_membership.proto | 7 ++++--- .../gkehub/alpha/feature_membership.py | 5 +++++ .../gkehub/alpha/feature_membership_server.go | 2 ++ .../gkehub/beta/feature_membership.py | 5 +++++ .../gkehub/beta/feature_membership_server.go | 2 ++ python/services/gkehub/feature_membership.py | 5 +++++ .../gkehub/feature_membership_server.go | 2 ++ .../google/gkehub/alpha/feature_membership.go | 3 +++ .../gkehub/alpha/feature_membership.yaml | 5 +++++ .../feature_membership_alpha_yaml_embed.go | 6 +++--- .../alpha/feature_membership_internal.go | 19 +++++++++++++++++++ .../gkehub/alpha/feature_membership_schema.go | 5 +++++ .../google/gkehub/beta/feature_membership.go | 3 +++ .../gkehub/beta/feature_membership.yaml | 5 +++++ .../feature_membership_beta_yaml_embed.go | 6 +++--- .../beta/feature_membership_internal.go | 19 +++++++++++++++++++ .../gkehub/beta/feature_membership_schema.go | 5 +++++ services/google/gkehub/feature_membership.go | 3 +++ .../google/gkehub/feature_membership.yaml | 5 +++++ .../gkehub/feature_membership_internal.go | 19 +++++++++++++++++++ .../gkehub/feature_membership_schema.go | 5 +++++ .../gkehub/feature_membership_yaml_embed.go | 6 +++--- .../samples/acm.feature_membership.json | 3 ++- .../update_1_acm.feature_membership.json | 3 ++- .../google/gkehub/alpha/feature_membership.go | 10 ++++++++++ .../google/gkehub/beta/feature_membership.go | 10 ++++++++++ .../google/gkehub/feature_membership.go | 10 ++++++++++ 29 files changed, 172 insertions(+), 20 deletions(-) diff --git a/python/proto/gkehub/alpha/feature_membership.proto b/python/proto/gkehub/alpha/feature_membership.proto index 0fec06791..9aea52bc9 100755 --- a/python/proto/gkehub/alpha/feature_membership.proto +++ b/python/proto/gkehub/alpha/feature_membership.proto @@ -109,9 +109,10 @@ message GkehubAlphaFeatureMembershipConfigmanagementConfigSync { GkehubAlphaFeatureMembershipConfigmanagementConfigSyncGit git = 1; string source_format = 2; bool enabled = 3; - bool prevent_drift = 4; - string metrics_gcp_service_account_email = 5; - GkehubAlphaFeatureMembershipConfigmanagementConfigSyncOci oci = 6; + bool stop_syncing = 4; + bool prevent_drift = 5; + string metrics_gcp_service_account_email = 6; + GkehubAlphaFeatureMembershipConfigmanagementConfigSyncOci oci = 7; } message GkehubAlphaFeatureMembershipConfigmanagementConfigSyncGit { diff --git a/python/proto/gkehub/beta/feature_membership.proto b/python/proto/gkehub/beta/feature_membership.proto index 014f09d97..a8d0c5ea1 100755 --- a/python/proto/gkehub/beta/feature_membership.proto +++ b/python/proto/gkehub/beta/feature_membership.proto @@ -109,9 +109,10 @@ message GkehubBetaFeatureMembershipConfigmanagementConfigSync { GkehubBetaFeatureMembershipConfigmanagementConfigSyncGit git = 1; string source_format = 2; bool enabled = 3; - bool prevent_drift = 4; - string metrics_gcp_service_account_email = 5; - GkehubBetaFeatureMembershipConfigmanagementConfigSyncOci oci = 6; + bool stop_syncing = 4; + bool prevent_drift = 5; + string metrics_gcp_service_account_email = 6; + GkehubBetaFeatureMembershipConfigmanagementConfigSyncOci oci = 7; } message GkehubBetaFeatureMembershipConfigmanagementConfigSyncGit { diff --git a/python/proto/gkehub/feature_membership.proto b/python/proto/gkehub/feature_membership.proto index 674783a52..077eaf162 100755 --- a/python/proto/gkehub/feature_membership.proto +++ b/python/proto/gkehub/feature_membership.proto @@ -109,9 +109,10 @@ message GkehubFeatureMembershipConfigmanagementConfigSync { GkehubFeatureMembershipConfigmanagementConfigSyncGit git = 1; string source_format = 2; bool enabled = 3; - bool prevent_drift = 4; - string metrics_gcp_service_account_email = 5; - GkehubFeatureMembershipConfigmanagementConfigSyncOci oci = 6; + bool stop_syncing = 4; + bool prevent_drift = 5; + string metrics_gcp_service_account_email = 6; + GkehubFeatureMembershipConfigmanagementConfigSyncOci oci = 7; } message GkehubFeatureMembershipConfigmanagementConfigSyncGit { diff --git a/python/services/gkehub/alpha/feature_membership.py b/python/services/gkehub/alpha/feature_membership.py index 73566515d..4a952aa25 100755 --- a/python/services/gkehub/alpha/feature_membership.py +++ b/python/services/gkehub/alpha/feature_membership.py @@ -347,6 +347,7 @@ def __init__( git: dict = None, source_format: str = None, enabled: bool = None, + stop_syncing: bool = None, prevent_drift: bool = None, metrics_gcp_service_account_email: str = None, oci: dict = None, @@ -354,6 +355,7 @@ def __init__( self.git = git self.source_format = source_format self.enabled = enabled + self.stop_syncing = stop_syncing self.prevent_drift = prevent_drift self.metrics_gcp_service_account_email = metrics_gcp_service_account_email self.oci = oci @@ -376,6 +378,8 @@ def to_proto(self, resource): res.source_format = Primitive.to_proto(resource.source_format) if Primitive.to_proto(resource.enabled): res.enabled = Primitive.to_proto(resource.enabled) + if Primitive.to_proto(resource.stop_syncing): + res.stop_syncing = Primitive.to_proto(resource.stop_syncing) if Primitive.to_proto(resource.prevent_drift): res.prevent_drift = Primitive.to_proto(resource.prevent_drift) if Primitive.to_proto(resource.metrics_gcp_service_account_email): @@ -399,6 +403,7 @@ def from_proto(self, resource): git=FeatureMembershipConfigmanagementConfigSyncGit.from_proto(resource.git), source_format=Primitive.from_proto(resource.source_format), enabled=Primitive.from_proto(resource.enabled), + stop_syncing=Primitive.from_proto(resource.stop_syncing), prevent_drift=Primitive.from_proto(resource.prevent_drift), metrics_gcp_service_account_email=Primitive.from_proto( resource.metrics_gcp_service_account_email diff --git a/python/services/gkehub/alpha/feature_membership_server.go b/python/services/gkehub/alpha/feature_membership_server.go index 58887cd56..db864cfc6 100755 --- a/python/services/gkehub/alpha/feature_membership_server.go +++ b/python/services/gkehub/alpha/feature_membership_server.go @@ -157,6 +157,7 @@ func ProtoToGkehubAlphaFeatureMembershipConfigmanagementConfigSync(p *alphapb.Gk Git: ProtoToGkehubAlphaFeatureMembershipConfigmanagementConfigSyncGit(p.GetGit()), SourceFormat: dcl.StringOrNil(p.GetSourceFormat()), Enabled: dcl.Bool(p.GetEnabled()), + StopSyncing: dcl.Bool(p.GetStopSyncing()), PreventDrift: dcl.Bool(p.GetPreventDrift()), MetricsGcpServiceAccountEmail: dcl.StringOrNil(p.GetMetricsGcpServiceAccountEmail()), Oci: ProtoToGkehubAlphaFeatureMembershipConfigmanagementConfigSyncOci(p.GetOci()), @@ -536,6 +537,7 @@ func GkehubAlphaFeatureMembershipConfigmanagementConfigSyncToProto(o *alpha.Feat p.SetGit(GkehubAlphaFeatureMembershipConfigmanagementConfigSyncGitToProto(o.Git)) p.SetSourceFormat(dcl.ValueOrEmptyString(o.SourceFormat)) p.SetEnabled(dcl.ValueOrEmptyBool(o.Enabled)) + p.SetStopSyncing(dcl.ValueOrEmptyBool(o.StopSyncing)) p.SetPreventDrift(dcl.ValueOrEmptyBool(o.PreventDrift)) p.SetMetricsGcpServiceAccountEmail(dcl.ValueOrEmptyString(o.MetricsGcpServiceAccountEmail)) p.SetOci(GkehubAlphaFeatureMembershipConfigmanagementConfigSyncOciToProto(o.Oci)) diff --git a/python/services/gkehub/beta/feature_membership.py b/python/services/gkehub/beta/feature_membership.py index 3b57f3fb4..18cc7fbb8 100755 --- a/python/services/gkehub/beta/feature_membership.py +++ b/python/services/gkehub/beta/feature_membership.py @@ -347,6 +347,7 @@ def __init__( git: dict = None, source_format: str = None, enabled: bool = None, + stop_syncing: bool = None, prevent_drift: bool = None, metrics_gcp_service_account_email: str = None, oci: dict = None, @@ -354,6 +355,7 @@ def __init__( self.git = git self.source_format = source_format self.enabled = enabled + self.stop_syncing = stop_syncing self.prevent_drift = prevent_drift self.metrics_gcp_service_account_email = metrics_gcp_service_account_email self.oci = oci @@ -376,6 +378,8 @@ def to_proto(self, resource): res.source_format = Primitive.to_proto(resource.source_format) if Primitive.to_proto(resource.enabled): res.enabled = Primitive.to_proto(resource.enabled) + if Primitive.to_proto(resource.stop_syncing): + res.stop_syncing = Primitive.to_proto(resource.stop_syncing) if Primitive.to_proto(resource.prevent_drift): res.prevent_drift = Primitive.to_proto(resource.prevent_drift) if Primitive.to_proto(resource.metrics_gcp_service_account_email): @@ -399,6 +403,7 @@ def from_proto(self, resource): git=FeatureMembershipConfigmanagementConfigSyncGit.from_proto(resource.git), source_format=Primitive.from_proto(resource.source_format), enabled=Primitive.from_proto(resource.enabled), + stop_syncing=Primitive.from_proto(resource.stop_syncing), prevent_drift=Primitive.from_proto(resource.prevent_drift), metrics_gcp_service_account_email=Primitive.from_proto( resource.metrics_gcp_service_account_email diff --git a/python/services/gkehub/beta/feature_membership_server.go b/python/services/gkehub/beta/feature_membership_server.go index 3869a5294..1acab422c 100755 --- a/python/services/gkehub/beta/feature_membership_server.go +++ b/python/services/gkehub/beta/feature_membership_server.go @@ -157,6 +157,7 @@ func ProtoToGkehubBetaFeatureMembershipConfigmanagementConfigSync(p *betapb.Gkeh Git: ProtoToGkehubBetaFeatureMembershipConfigmanagementConfigSyncGit(p.GetGit()), SourceFormat: dcl.StringOrNil(p.GetSourceFormat()), Enabled: dcl.Bool(p.GetEnabled()), + StopSyncing: dcl.Bool(p.GetStopSyncing()), PreventDrift: dcl.Bool(p.GetPreventDrift()), MetricsGcpServiceAccountEmail: dcl.StringOrNil(p.GetMetricsGcpServiceAccountEmail()), Oci: ProtoToGkehubBetaFeatureMembershipConfigmanagementConfigSyncOci(p.GetOci()), @@ -536,6 +537,7 @@ func GkehubBetaFeatureMembershipConfigmanagementConfigSyncToProto(o *beta.Featur p.SetGit(GkehubBetaFeatureMembershipConfigmanagementConfigSyncGitToProto(o.Git)) p.SetSourceFormat(dcl.ValueOrEmptyString(o.SourceFormat)) p.SetEnabled(dcl.ValueOrEmptyBool(o.Enabled)) + p.SetStopSyncing(dcl.ValueOrEmptyBool(o.StopSyncing)) p.SetPreventDrift(dcl.ValueOrEmptyBool(o.PreventDrift)) p.SetMetricsGcpServiceAccountEmail(dcl.ValueOrEmptyString(o.MetricsGcpServiceAccountEmail)) p.SetOci(GkehubBetaFeatureMembershipConfigmanagementConfigSyncOciToProto(o.Oci)) diff --git a/python/services/gkehub/feature_membership.py b/python/services/gkehub/feature_membership.py index 90b9b94dc..3a54982e9 100755 --- a/python/services/gkehub/feature_membership.py +++ b/python/services/gkehub/feature_membership.py @@ -347,6 +347,7 @@ def __init__( git: dict = None, source_format: str = None, enabled: bool = None, + stop_syncing: bool = None, prevent_drift: bool = None, metrics_gcp_service_account_email: str = None, oci: dict = None, @@ -354,6 +355,7 @@ def __init__( self.git = git self.source_format = source_format self.enabled = enabled + self.stop_syncing = stop_syncing self.prevent_drift = prevent_drift self.metrics_gcp_service_account_email = metrics_gcp_service_account_email self.oci = oci @@ -374,6 +376,8 @@ def to_proto(self, resource): res.source_format = Primitive.to_proto(resource.source_format) if Primitive.to_proto(resource.enabled): res.enabled = Primitive.to_proto(resource.enabled) + if Primitive.to_proto(resource.stop_syncing): + res.stop_syncing = Primitive.to_proto(resource.stop_syncing) if Primitive.to_proto(resource.prevent_drift): res.prevent_drift = Primitive.to_proto(resource.prevent_drift) if Primitive.to_proto(resource.metrics_gcp_service_account_email): @@ -397,6 +401,7 @@ def from_proto(self, resource): git=FeatureMembershipConfigmanagementConfigSyncGit.from_proto(resource.git), source_format=Primitive.from_proto(resource.source_format), enabled=Primitive.from_proto(resource.enabled), + stop_syncing=Primitive.from_proto(resource.stop_syncing), prevent_drift=Primitive.from_proto(resource.prevent_drift), metrics_gcp_service_account_email=Primitive.from_proto( resource.metrics_gcp_service_account_email diff --git a/python/services/gkehub/feature_membership_server.go b/python/services/gkehub/feature_membership_server.go index df9209295..e5b2bf99d 100755 --- a/python/services/gkehub/feature_membership_server.go +++ b/python/services/gkehub/feature_membership_server.go @@ -157,6 +157,7 @@ func ProtoToGkehubFeatureMembershipConfigmanagementConfigSync(p *gkehubpb.Gkehub Git: ProtoToGkehubFeatureMembershipConfigmanagementConfigSyncGit(p.GetGit()), SourceFormat: dcl.StringOrNil(p.GetSourceFormat()), Enabled: dcl.Bool(p.GetEnabled()), + StopSyncing: dcl.Bool(p.GetStopSyncing()), PreventDrift: dcl.Bool(p.GetPreventDrift()), MetricsGcpServiceAccountEmail: dcl.StringOrNil(p.GetMetricsGcpServiceAccountEmail()), Oci: ProtoToGkehubFeatureMembershipConfigmanagementConfigSyncOci(p.GetOci()), @@ -536,6 +537,7 @@ func GkehubFeatureMembershipConfigmanagementConfigSyncToProto(o *gkehub.FeatureM p.SetGit(GkehubFeatureMembershipConfigmanagementConfigSyncGitToProto(o.Git)) p.SetSourceFormat(dcl.ValueOrEmptyString(o.SourceFormat)) p.SetEnabled(dcl.ValueOrEmptyBool(o.Enabled)) + p.SetStopSyncing(dcl.ValueOrEmptyBool(o.StopSyncing)) p.SetPreventDrift(dcl.ValueOrEmptyBool(o.PreventDrift)) p.SetMetricsGcpServiceAccountEmail(dcl.ValueOrEmptyString(o.MetricsGcpServiceAccountEmail)) p.SetOci(GkehubFeatureMembershipConfigmanagementConfigSyncOciToProto(o.Oci)) diff --git a/services/google/gkehub/alpha/feature_membership.go b/services/google/gkehub/alpha/feature_membership.go index d6a977d52..82ab4a793 100755 --- a/services/google/gkehub/alpha/feature_membership.go +++ b/services/google/gkehub/alpha/feature_membership.go @@ -369,6 +369,7 @@ type FeatureMembershipConfigmanagementConfigSync struct { Git *FeatureMembershipConfigmanagementConfigSyncGit `json:"git"` SourceFormat *string `json:"sourceFormat"` Enabled *bool `json:"enabled"` + StopSyncing *bool `json:"stopSyncing"` PreventDrift *bool `json:"preventDrift"` MetricsGcpServiceAccountEmail *string `json:"metricsGcpServiceAccountEmail"` Oci *FeatureMembershipConfigmanagementConfigSyncOci `json:"oci"` @@ -395,6 +396,8 @@ func (r *FeatureMembershipConfigmanagementConfigSync) UnmarshalJSON(data []byte) r.Enabled = res.Enabled + r.StopSyncing = res.StopSyncing + r.PreventDrift = res.PreventDrift r.MetricsGcpServiceAccountEmail = res.MetricsGcpServiceAccountEmail diff --git a/services/google/gkehub/alpha/feature_membership.yaml b/services/google/gkehub/alpha/feature_membership.yaml index 7a1afddf6..57653e205 100755 --- a/services/google/gkehub/alpha/feature_membership.yaml +++ b/services/google/gkehub/alpha/feature_membership.yaml @@ -225,6 +225,11 @@ components: x-dcl-go-name: SourceFormat description: Specifies whether the Config Sync Repo is in "hierarchical" or "unstructured" mode. + stopSyncing: + type: boolean + x-dcl-go-name: StopSyncing + description: 'Set to true to stop syncing configs for a single cluster. + Default: false.' hierarchyController: type: object x-dcl-go-name: HierarchyController diff --git a/services/google/gkehub/alpha/feature_membership_alpha_yaml_embed.go b/services/google/gkehub/alpha/feature_membership_alpha_yaml_embed.go index d44405bac..15f88cf51 100755 --- a/services/google/gkehub/alpha/feature_membership_alpha_yaml_embed.go +++ b/services/google/gkehub/alpha/feature_membership_alpha_yaml_embed.go @@ -17,7 +17,7 @@ package alpha // blaze-out/k8-fastbuild/genfiles/cloud/graphite/mmv2/services/google/gkehub/alpha/feature_membership.yaml -var YAML_feature_membership = []byte("info:\n title: GkeHub/FeatureMembership\n description: The GkeHub FeatureMembership resource\n x-dcl-struct-name: FeatureMembership\n x-dcl-has-iam: false\n x-dcl-mutex: '{{project}}/{{location}}/{{feature}}'\npaths:\n get:\n description: The function used to get information about a FeatureMembership\n parameters:\n - name: featureMembership\n required: true\n description: A full instance of a FeatureMembership\n apply:\n description: The function used to apply information about a FeatureMembership\n parameters:\n - name: featureMembership\n required: true\n description: A full instance of a FeatureMembership\n delete:\n description: The function used to delete a FeatureMembership\n parameters:\n - name: featureMembership\n required: true\n description: A full instance of a FeatureMembership\n deleteAll:\n description: The function used to delete all FeatureMembership\n parameters:\n - name: project\n required: true\n schema:\n type: string\n - name: location\n required: true\n schema:\n type: string\n - name: feature\n required: true\n schema:\n type: string\n list:\n description: The function used to list information about many FeatureMembership\n parameters:\n - name: project\n required: true\n schema:\n type: string\n - name: location\n required: true\n schema:\n type: string\n - name: feature\n required: true\n schema:\n type: string\ncomponents:\n schemas:\n FeatureMembership:\n title: FeatureMembership\n x-dcl-id: projects/{{project}}/locations/{{location}}/features/{{feature}}/memberships/{{membership}}\n x-dcl-parent-container: project\n x-dcl-has-create: true\n x-dcl-has-iam: false\n x-dcl-read-timeout: 0\n x-dcl-apply-timeout: 0\n x-dcl-delete-timeout: 0\n type: object\n required:\n - project\n - location\n - feature\n - membership\n properties:\n configmanagement:\n type: object\n x-dcl-go-name: Configmanagement\n x-dcl-go-type: FeatureMembershipConfigmanagement\n description: Config Management-specific spec.\n properties:\n binauthz:\n type: object\n x-dcl-go-name: Binauthz\n x-dcl-go-type: FeatureMembershipConfigmanagementBinauthz\n description: '**DEPRECATED** Binauthz configuration for the cluster.\n This field will be ignored and should not be set.'\n x-dcl-server-default: true\n properties:\n enabled:\n type: boolean\n x-dcl-go-name: Enabled\n description: Whether binauthz is enabled in this cluster.\n x-dcl-parameter: true\n configSync:\n type: object\n x-dcl-go-name: ConfigSync\n x-dcl-go-type: FeatureMembershipConfigmanagementConfigSync\n description: Config Sync configuration for the cluster.\n x-dcl-send-empty: true\n properties:\n enabled:\n type: boolean\n x-dcl-go-name: Enabled\n description: Enables the installation of ConfigSync. If set to true,\n ConfigSync resources will be created and the other ConfigSync\n fields will be applied if exist. If set to false, all other ConfigSync\n fields will be ignored, ConfigSync resources will be deleted.\n If omitted, ConfigSync resources will be managed depends on the\n presence of the git or oci field.\n git:\n type: object\n x-dcl-go-name: Git\n x-dcl-go-type: FeatureMembershipConfigmanagementConfigSyncGit\n properties:\n gcpServiceAccountEmail:\n type: string\n x-dcl-go-name: GcpServiceAccountEmail\n description: The GCP Service Account Email used for auth when\n secretType is gcpServiceAccount.\n x-dcl-references:\n - resource: Iam/ServiceAccount\n field: email\n httpsProxy:\n type: string\n x-dcl-go-name: HttpsProxy\n description: URL for the HTTPS proxy to be used when communicating\n with the Git repo.\n policyDir:\n type: string\n x-dcl-go-name: PolicyDir\n description: 'The path within the Git repository that represents\n the top level of the repo to sync. Default: the root directory\n of the repository.'\n secretType:\n type: string\n x-dcl-go-name: SecretType\n description: Type of secret configured for access to the Git\n repo. Must be one of ssh, cookiefile, gcenode, token, gcpserviceaccount\n or none. The validation of this is case-sensitive.\n syncBranch:\n type: string\n x-dcl-go-name: SyncBranch\n description: 'The branch of the repository to sync from. Default:\n master.'\n syncRepo:\n type: string\n x-dcl-go-name: SyncRepo\n description: The URL of the Git repository to use as the source\n of truth.\n syncRev:\n type: string\n x-dcl-go-name: SyncRev\n description: Git revision (tag or hash) to check out. Default\n HEAD.\n syncWaitSecs:\n type: string\n x-dcl-go-name: SyncWaitSecs\n description: 'Period in seconds between consecutive syncs. Default:\n 15.'\n metricsGcpServiceAccountEmail:\n type: string\n x-dcl-go-name: MetricsGcpServiceAccountEmail\n description: 'Deprecated: If Workload Identity Federation for GKE\n is enabled, Google Cloud Service Account is no longer needed for\n exporting Config Sync metrics: https://cloud.google.com/kubernetes-engine/enterprise/config-sync/docs/how-to/monitor-config-sync-cloud-monitoring#custom-monitoring.'\n x-dcl-references:\n - resource: Iam/ServiceAccount\n field: email\n x-dcl-deprecated: true\n oci:\n type: object\n x-dcl-go-name: Oci\n x-dcl-go-type: FeatureMembershipConfigmanagementConfigSyncOci\n properties:\n gcpServiceAccountEmail:\n type: string\n x-dcl-go-name: GcpServiceAccountEmail\n description: 'The GCP Service Account Email used for auth when\n secret_type is gcpserviceaccount. '\n x-dcl-references:\n - resource: Iam/ServiceAccount\n field: email\n policyDir:\n type: string\n x-dcl-go-name: PolicyDir\n description: 'The absolute path of the directory that contains\n the local resources. Default: the root directory of the image.'\n secretType:\n type: string\n x-dcl-go-name: SecretType\n description: Type of secret configured for access to the OCI\n Image. Must be one of gcenode, gcpserviceaccount or none.\n The validation of this is case-sensitive.\n syncRepo:\n type: string\n x-dcl-go-name: SyncRepo\n description: The OCI image repository URL for the package to\n sync from. e.g. LOCATION-docker.pkg.dev/PROJECT_ID/REPOSITORY_NAME/PACKAGE_NAME.\n syncWaitSecs:\n type: string\n x-dcl-go-name: SyncWaitSecs\n description: 'Period in seconds(int64 format) between consecutive\n syncs. Default: 15.'\n preventDrift:\n type: boolean\n x-dcl-go-name: PreventDrift\n description: Set to true to enable the Config Sync admission webhook\n to prevent drifts. If set to `false`, disables the Config Sync\n admission webhook and does not prevent drifts.\n x-dcl-server-default: true\n sourceFormat:\n type: string\n x-dcl-go-name: SourceFormat\n description: Specifies whether the Config Sync Repo is in \"hierarchical\"\n or \"unstructured\" mode.\n hierarchyController:\n type: object\n x-dcl-go-name: HierarchyController\n x-dcl-go-type: FeatureMembershipConfigmanagementHierarchyController\n description: Hierarchy Controller configuration for the cluster.\n x-dcl-send-empty: true\n properties:\n enableHierarchicalResourceQuota:\n type: boolean\n x-dcl-go-name: EnableHierarchicalResourceQuota\n description: Whether hierarchical resource quota is enabled in this\n cluster.\n x-dcl-send-empty: true\n enablePodTreeLabels:\n type: boolean\n x-dcl-go-name: EnablePodTreeLabels\n description: Whether pod tree labels are enabled in this cluster.\n x-dcl-send-empty: true\n enabled:\n type: boolean\n x-dcl-go-name: Enabled\n description: '**DEPRECATED** Configuring Hierarchy Controller through\n the configmanagement feature is no longer recommended. Use https://github.com/kubernetes-sigs/hierarchical-namespaces\n instead.'\n x-dcl-send-empty: true\n management:\n type: string\n x-dcl-go-name: Management\n x-dcl-go-type: FeatureMembershipConfigmanagementManagementEnum\n description: Set this field to MANAGEMENT_AUTOMATIC to enable Config\n Sync auto-upgrades, and set this field to MANAGEMENT_MANUAL or MANAGEMENT_UNSPECIFIED\n to disable Config Sync auto-upgrades.\n x-dcl-server-default: true\n enum:\n - MANAGEMENT_UNSPECIFIED\n - MANAGEMENT_AUTOMATIC\n - MANAGEMENT_MANUAL\n policyController:\n type: object\n x-dcl-go-name: PolicyController\n x-dcl-go-type: FeatureMembershipConfigmanagementPolicyController\n description: '**DEPRECATED** Configuring Policy Controller through the\n configmanagement feature is no longer recommended. Use the policycontroller\n feature instead.'\n properties:\n auditIntervalSeconds:\n type: string\n x-dcl-go-name: AuditIntervalSeconds\n description: Sets the interval for Policy Controller Audit Scans\n (in seconds). When set to 0, this disables audit functionality\n altogether.\n enabled:\n type: boolean\n x-dcl-go-name: Enabled\n description: Enables the installation of Policy Controller. If false,\n the rest of PolicyController fields take no effect.\n exemptableNamespaces:\n type: array\n x-dcl-go-name: ExemptableNamespaces\n description: The set of namespaces that are excluded from Policy\n Controller checks. Namespaces do not need to currently exist on\n the cluster.\n x-dcl-send-empty: true\n x-dcl-list-type: list\n items:\n type: string\n x-dcl-go-type: string\n logDeniesEnabled:\n type: boolean\n x-dcl-go-name: LogDeniesEnabled\n description: Logs all denies and dry run failures.\n monitoring:\n type: object\n x-dcl-go-name: Monitoring\n x-dcl-go-type: FeatureMembershipConfigmanagementPolicyControllerMonitoring\n description: 'Specifies the backends Policy Controller should export\n metrics to. For example, to specify metrics should be exported\n to Cloud Monitoring and Prometheus, specify backends: [\"cloudmonitoring\",\n \"prometheus\"]. Default: [\"cloudmonitoring\", \"prometheus\"]'\n x-dcl-server-default: true\n properties:\n backends:\n type: array\n x-dcl-go-name: Backends\n description: ' Specifies the list of backends Policy Controller\n will export to. Specifying an empty value `[]` disables metrics\n export.'\n x-dcl-server-default: true\n x-dcl-send-empty: true\n x-dcl-list-type: list\n items:\n type: string\n x-dcl-go-type: FeatureMembershipConfigmanagementPolicyControllerMonitoringBackendsEnum\n enum:\n - MONITORING_BACKEND_UNSPECIFIED\n - PROMETHEUS\n - CLOUD_MONITORING\n mutationEnabled:\n type: boolean\n x-dcl-go-name: MutationEnabled\n description: Enable or disable mutation in policy controller. If\n true, mutation CRDs, webhook and controller deployment will be\n deployed to the cluster.\n referentialRulesEnabled:\n type: boolean\n x-dcl-go-name: ReferentialRulesEnabled\n description: Enables the ability to use Constraint Templates that\n reference to objects other than the object currently being evaluated.\n templateLibraryInstalled:\n type: boolean\n x-dcl-go-name: TemplateLibraryInstalled\n description: Installs the default template library along with Policy\n Controller.\n version:\n type: string\n x-dcl-go-name: Version\n description: Optional. Version of ACM to install. Defaults to the latest\n version.\n x-dcl-server-default: true\n feature:\n type: string\n x-dcl-go-name: Feature\n description: The name of the feature\n x-kubernetes-immutable: true\n x-dcl-references:\n - resource: Gkehub/Feature\n field: name\n parent: true\n x-dcl-parameter: true\n location:\n type: string\n x-dcl-go-name: Location\n description: The location of the feature\n x-kubernetes-immutable: true\n x-dcl-parameter: true\n membership:\n type: string\n x-dcl-go-name: Membership\n description: The name of the membership\n x-kubernetes-immutable: true\n x-dcl-references:\n - resource: Gkehub/Membership\n field: name\n x-dcl-parameter: true\n membershipLocation:\n type: string\n x-dcl-go-name: MembershipLocation\n description: The location of the membership\n x-kubernetes-immutable: true\n x-dcl-parameter: true\n mesh:\n type: object\n x-dcl-go-name: Mesh\n x-dcl-go-type: FeatureMembershipMesh\n description: Manage Mesh Features\n properties:\n controlPlane:\n type: string\n x-dcl-go-name: ControlPlane\n x-dcl-go-type: FeatureMembershipMeshControlPlaneEnum\n description: '**DEPRECATED** Whether to automatically manage Service\n Mesh control planes. Possible values: CONTROL_PLANE_MANAGEMENT_UNSPECIFIED,\n AUTOMATIC, MANUAL'\n enum:\n - CONTROL_PLANE_MANAGEMENT_UNSPECIFIED\n - AUTOMATIC\n - MANUAL\n management:\n type: string\n x-dcl-go-name: Management\n x-dcl-go-type: FeatureMembershipMeshManagementEnum\n description: 'Whether to automatically manage Service Mesh. Possible\n values: MANAGEMENT_UNSPECIFIED, MANAGEMENT_AUTOMATIC, MANAGEMENT_MANUAL'\n enum:\n - MANAGEMENT_UNSPECIFIED\n - MANAGEMENT_AUTOMATIC\n - MANAGEMENT_MANUAL\n policycontroller:\n type: object\n x-dcl-go-name: Policycontroller\n x-dcl-go-type: FeatureMembershipPolicycontroller\n description: Policy Controller-specific spec.\n required:\n - policyControllerHubConfig\n properties:\n policyControllerHubConfig:\n type: object\n x-dcl-go-name: PolicyControllerHubConfig\n x-dcl-go-type: FeatureMembershipPolicycontrollerPolicyControllerHubConfig\n description: Policy Controller configuration for the cluster.\n properties:\n auditIntervalSeconds:\n type: integer\n format: int64\n x-dcl-go-name: AuditIntervalSeconds\n description: Sets the interval for Policy Controller Audit Scans\n (in seconds). When set to 0, this disables audit functionality\n altogether.\n constraintViolationLimit:\n type: integer\n format: int64\n x-dcl-go-name: ConstraintViolationLimit\n description: The maximum number of audit violations to be stored\n in a constraint. If not set, the internal default of 20 will be\n used.\n deploymentConfigs:\n type: object\n additionalProperties:\n type: object\n x-dcl-go-type: FeatureMembershipPolicycontrollerPolicyControllerHubConfigDeploymentConfigs\n properties:\n containerResources:\n type: object\n x-dcl-go-name: ContainerResources\n x-dcl-go-type: FeatureMembershipPolicycontrollerPolicyControllerHubConfigDeploymentConfigsContainerResources\n description: Container resource requirements.\n x-dcl-conflicts:\n - replicaCount\n - podAffinity\n - podTolerations\n properties:\n limits:\n type: object\n x-dcl-go-name: Limits\n x-dcl-go-type: FeatureMembershipPolicycontrollerPolicyControllerHubConfigDeploymentConfigsContainerResourcesLimits\n description: Limits describes the maximum amount of compute\n resources allowed for use by the running container.\n properties:\n cpu:\n type: string\n x-dcl-go-name: Cpu\n description: CPU requirement expressed in Kubernetes\n resource units.\n memory:\n type: string\n x-dcl-go-name: Memory\n description: Memory requirement expressed in Kubernetes\n resource units.\n requests:\n type: object\n x-dcl-go-name: Requests\n x-dcl-go-type: FeatureMembershipPolicycontrollerPolicyControllerHubConfigDeploymentConfigsContainerResourcesRequests\n description: Requests describes the amount of compute\n resources reserved for the container by the kube-scheduler.\n properties:\n cpu:\n type: string\n x-dcl-go-name: Cpu\n description: CPU requirement expressed in Kubernetes\n resource units.\n memory:\n type: string\n x-dcl-go-name: Memory\n description: Memory requirement expressed in Kubernetes\n resource units.\n podAffinity:\n type: string\n x-dcl-go-name: PodAffinity\n x-dcl-go-type: FeatureMembershipPolicycontrollerPolicyControllerHubConfigDeploymentConfigsPodAffinityEnum\n description: 'Pod affinity configuration. Possible values:\n AFFINITY_UNSPECIFIED, NO_AFFINITY, ANTI_AFFINITY'\n x-dcl-conflicts:\n - replicaCount\n - containerResources\n - podTolerations\n enum:\n - AFFINITY_UNSPECIFIED\n - NO_AFFINITY\n - ANTI_AFFINITY\n podTolerations:\n type: array\n x-dcl-go-name: PodTolerations\n description: Pod tolerations of node taints.\n x-dcl-conflicts:\n - replicaCount\n - containerResources\n - podAffinity\n x-dcl-send-empty: true\n x-dcl-list-type: list\n items:\n type: object\n x-dcl-go-type: FeatureMembershipPolicycontrollerPolicyControllerHubConfigDeploymentConfigsPodTolerations\n properties:\n effect:\n type: string\n x-dcl-go-name: Effect\n description: Matches a taint effect.\n key:\n type: string\n x-dcl-go-name: Key\n description: Matches a taint key (not necessarily unique).\n operator:\n type: string\n x-dcl-go-name: Operator\n description: Matches a taint operator.\n value:\n type: string\n x-dcl-go-name: Value\n description: Matches a taint value.\n replicaCount:\n type: integer\n format: int64\n x-dcl-go-name: ReplicaCount\n description: Pod replica count.\n x-dcl-conflicts:\n - containerResources\n - podAffinity\n - podTolerations\n x-dcl-go-name: DeploymentConfigs\n description: Map of deployment configs to deployments (\"admission\",\n \"audit\", \"mutation\").\n x-dcl-server-default: true\n exemptableNamespaces:\n type: array\n x-dcl-go-name: ExemptableNamespaces\n description: The set of namespaces that are excluded from Policy\n Controller checks. Namespaces do not need to currently exist on\n the cluster.\n x-dcl-send-empty: true\n x-dcl-list-type: list\n items:\n type: string\n x-dcl-go-type: string\n installSpec:\n type: string\n x-dcl-go-name: InstallSpec\n x-dcl-go-type: FeatureMembershipPolicycontrollerPolicyControllerHubConfigInstallSpecEnum\n description: 'Configures the mode of the Policy Controller installation.\n Possible values: INSTALL_SPEC_UNSPECIFIED, INSTALL_SPEC_NOT_INSTALLED,\n INSTALL_SPEC_ENABLED, INSTALL_SPEC_SUSPENDED, INSTALL_SPEC_DETACHED'\n enum:\n - INSTALL_SPEC_UNSPECIFIED\n - INSTALL_SPEC_NOT_INSTALLED\n - INSTALL_SPEC_ENABLED\n - INSTALL_SPEC_SUSPENDED\n - INSTALL_SPEC_DETACHED\n logDeniesEnabled:\n type: boolean\n x-dcl-go-name: LogDeniesEnabled\n description: Logs all denies and dry run failures.\n monitoring:\n type: object\n x-dcl-go-name: Monitoring\n x-dcl-go-type: FeatureMembershipPolicycontrollerPolicyControllerHubConfigMonitoring\n description: 'Specifies the backends Policy Controller should export\n metrics to. For example, to specify metrics should be exported\n to Cloud Monitoring and Prometheus, specify backends: [\"cloudmonitoring\",\n \"prometheus\"]. Default: [\"cloudmonitoring\", \"prometheus\"]'\n x-dcl-server-default: true\n properties:\n backends:\n type: array\n x-dcl-go-name: Backends\n description: ' Specifies the list of backends Policy Controller\n will export to. Specifying an empty value `[]` disables metrics\n export.'\n x-dcl-server-default: true\n x-dcl-send-empty: true\n x-dcl-list-type: list\n items:\n type: string\n x-dcl-go-type: FeatureMembershipPolicycontrollerPolicyControllerHubConfigMonitoringBackendsEnum\n enum:\n - MONITORING_BACKEND_UNSPECIFIED\n - PROMETHEUS\n - CLOUD_MONITORING\n mutationEnabled:\n type: boolean\n x-dcl-go-name: MutationEnabled\n description: Enables the ability to mutate resources using Policy\n Controller.\n policyContent:\n type: object\n x-dcl-go-name: PolicyContent\n x-dcl-go-type: FeatureMembershipPolicycontrollerPolicyControllerHubConfigPolicyContent\n description: Specifies the desired policy content on the cluster.\n x-dcl-server-default: true\n properties:\n bundles:\n type: object\n additionalProperties:\n type: object\n x-dcl-go-type: FeatureMembershipPolicycontrollerPolicyControllerHubConfigPolicyContentBundles\n properties:\n exemptedNamespaces:\n type: array\n x-dcl-go-name: ExemptedNamespaces\n description: The set of namespaces to be exempted from\n the bundle.\n x-dcl-send-empty: true\n x-dcl-list-type: list\n items:\n type: string\n x-dcl-go-type: string\n x-dcl-go-name: Bundles\n description: map of bundle name to BundleInstallSpec. The bundle\n name maps to the `bundleName` key in the `policycontroller.gke.io/constraintData`\n annotation on a constraint.\n templateLibrary:\n type: object\n x-dcl-go-name: TemplateLibrary\n x-dcl-go-type: FeatureMembershipPolicycontrollerPolicyControllerHubConfigPolicyContentTemplateLibrary\n description: Configures the installation of the Template Library.\n x-dcl-server-default: true\n properties:\n installation:\n type: string\n x-dcl-go-name: Installation\n x-dcl-go-type: FeatureMembershipPolicycontrollerPolicyControllerHubConfigPolicyContentTemplateLibraryInstallationEnum\n description: 'Configures the manner in which the template\n library is installed on the cluster. Possible values:\n INSTALLATION_UNSPECIFIED, NOT_INSTALLED, ALL'\n enum:\n - INSTALLATION_UNSPECIFIED\n - NOT_INSTALLED\n - ALL\n referentialRulesEnabled:\n type: boolean\n x-dcl-go-name: ReferentialRulesEnabled\n description: Enables the ability to use Constraint Templates that\n reference to objects other than the object currently being evaluated.\n version:\n type: string\n x-dcl-go-name: Version\n description: Optional. Version of Policy Controller to install. Defaults\n to the latest version.\n x-dcl-server-default: true\n project:\n type: string\n x-dcl-go-name: Project\n description: The project of the feature\n x-kubernetes-immutable: true\n x-dcl-references:\n - resource: Cloudresourcemanager/Project\n field: name\n parent: true\n x-dcl-parameter: true\n") +var YAML_feature_membership = []byte("info:\n title: GkeHub/FeatureMembership\n description: The GkeHub FeatureMembership resource\n x-dcl-struct-name: FeatureMembership\n x-dcl-has-iam: false\n x-dcl-mutex: '{{project}}/{{location}}/{{feature}}'\npaths:\n get:\n description: The function used to get information about a FeatureMembership\n parameters:\n - name: featureMembership\n required: true\n description: A full instance of a FeatureMembership\n apply:\n description: The function used to apply information about a FeatureMembership\n parameters:\n - name: featureMembership\n required: true\n description: A full instance of a FeatureMembership\n delete:\n description: The function used to delete a FeatureMembership\n parameters:\n - name: featureMembership\n required: true\n description: A full instance of a FeatureMembership\n deleteAll:\n description: The function used to delete all FeatureMembership\n parameters:\n - name: project\n required: true\n schema:\n type: string\n - name: location\n required: true\n schema:\n type: string\n - name: feature\n required: true\n schema:\n type: string\n list:\n description: The function used to list information about many FeatureMembership\n parameters:\n - name: project\n required: true\n schema:\n type: string\n - name: location\n required: true\n schema:\n type: string\n - name: feature\n required: true\n schema:\n type: string\ncomponents:\n schemas:\n FeatureMembership:\n title: FeatureMembership\n x-dcl-id: projects/{{project}}/locations/{{location}}/features/{{feature}}/memberships/{{membership}}\n x-dcl-parent-container: project\n x-dcl-has-create: true\n x-dcl-has-iam: false\n x-dcl-read-timeout: 0\n x-dcl-apply-timeout: 0\n x-dcl-delete-timeout: 0\n type: object\n required:\n - project\n - location\n - feature\n - membership\n properties:\n configmanagement:\n type: object\n x-dcl-go-name: Configmanagement\n x-dcl-go-type: FeatureMembershipConfigmanagement\n description: Config Management-specific spec.\n properties:\n binauthz:\n type: object\n x-dcl-go-name: Binauthz\n x-dcl-go-type: FeatureMembershipConfigmanagementBinauthz\n description: '**DEPRECATED** Binauthz configuration for the cluster.\n This field will be ignored and should not be set.'\n x-dcl-server-default: true\n properties:\n enabled:\n type: boolean\n x-dcl-go-name: Enabled\n description: Whether binauthz is enabled in this cluster.\n x-dcl-parameter: true\n configSync:\n type: object\n x-dcl-go-name: ConfigSync\n x-dcl-go-type: FeatureMembershipConfigmanagementConfigSync\n description: Config Sync configuration for the cluster.\n x-dcl-send-empty: true\n properties:\n enabled:\n type: boolean\n x-dcl-go-name: Enabled\n description: Enables the installation of ConfigSync. If set to true,\n ConfigSync resources will be created and the other ConfigSync\n fields will be applied if exist. If set to false, all other ConfigSync\n fields will be ignored, ConfigSync resources will be deleted.\n If omitted, ConfigSync resources will be managed depends on the\n presence of the git or oci field.\n git:\n type: object\n x-dcl-go-name: Git\n x-dcl-go-type: FeatureMembershipConfigmanagementConfigSyncGit\n properties:\n gcpServiceAccountEmail:\n type: string\n x-dcl-go-name: GcpServiceAccountEmail\n description: The GCP Service Account Email used for auth when\n secretType is gcpServiceAccount.\n x-dcl-references:\n - resource: Iam/ServiceAccount\n field: email\n httpsProxy:\n type: string\n x-dcl-go-name: HttpsProxy\n description: URL for the HTTPS proxy to be used when communicating\n with the Git repo.\n policyDir:\n type: string\n x-dcl-go-name: PolicyDir\n description: 'The path within the Git repository that represents\n the top level of the repo to sync. Default: the root directory\n of the repository.'\n secretType:\n type: string\n x-dcl-go-name: SecretType\n description: Type of secret configured for access to the Git\n repo. Must be one of ssh, cookiefile, gcenode, token, gcpserviceaccount\n or none. The validation of this is case-sensitive.\n syncBranch:\n type: string\n x-dcl-go-name: SyncBranch\n description: 'The branch of the repository to sync from. Default:\n master.'\n syncRepo:\n type: string\n x-dcl-go-name: SyncRepo\n description: The URL of the Git repository to use as the source\n of truth.\n syncRev:\n type: string\n x-dcl-go-name: SyncRev\n description: Git revision (tag or hash) to check out. Default\n HEAD.\n syncWaitSecs:\n type: string\n x-dcl-go-name: SyncWaitSecs\n description: 'Period in seconds between consecutive syncs. Default:\n 15.'\n metricsGcpServiceAccountEmail:\n type: string\n x-dcl-go-name: MetricsGcpServiceAccountEmail\n description: 'Deprecated: If Workload Identity Federation for GKE\n is enabled, Google Cloud Service Account is no longer needed for\n exporting Config Sync metrics: https://cloud.google.com/kubernetes-engine/enterprise/config-sync/docs/how-to/monitor-config-sync-cloud-monitoring#custom-monitoring.'\n x-dcl-references:\n - resource: Iam/ServiceAccount\n field: email\n x-dcl-deprecated: true\n oci:\n type: object\n x-dcl-go-name: Oci\n x-dcl-go-type: FeatureMembershipConfigmanagementConfigSyncOci\n properties:\n gcpServiceAccountEmail:\n type: string\n x-dcl-go-name: GcpServiceAccountEmail\n description: 'The GCP Service Account Email used for auth when\n secret_type is gcpserviceaccount. '\n x-dcl-references:\n - resource: Iam/ServiceAccount\n field: email\n policyDir:\n type: string\n x-dcl-go-name: PolicyDir\n description: 'The absolute path of the directory that contains\n the local resources. Default: the root directory of the image.'\n secretType:\n type: string\n x-dcl-go-name: SecretType\n description: Type of secret configured for access to the OCI\n Image. Must be one of gcenode, gcpserviceaccount or none.\n The validation of this is case-sensitive.\n syncRepo:\n type: string\n x-dcl-go-name: SyncRepo\n description: The OCI image repository URL for the package to\n sync from. e.g. LOCATION-docker.pkg.dev/PROJECT_ID/REPOSITORY_NAME/PACKAGE_NAME.\n syncWaitSecs:\n type: string\n x-dcl-go-name: SyncWaitSecs\n description: 'Period in seconds(int64 format) between consecutive\n syncs. Default: 15.'\n preventDrift:\n type: boolean\n x-dcl-go-name: PreventDrift\n description: Set to true to enable the Config Sync admission webhook\n to prevent drifts. If set to `false`, disables the Config Sync\n admission webhook and does not prevent drifts.\n x-dcl-server-default: true\n sourceFormat:\n type: string\n x-dcl-go-name: SourceFormat\n description: Specifies whether the Config Sync Repo is in \"hierarchical\"\n or \"unstructured\" mode.\n stopSyncing:\n type: boolean\n x-dcl-go-name: StopSyncing\n description: 'Set to true to stop syncing configs for a single cluster.\n Default: false.'\n hierarchyController:\n type: object\n x-dcl-go-name: HierarchyController\n x-dcl-go-type: FeatureMembershipConfigmanagementHierarchyController\n description: Hierarchy Controller configuration for the cluster.\n x-dcl-send-empty: true\n properties:\n enableHierarchicalResourceQuota:\n type: boolean\n x-dcl-go-name: EnableHierarchicalResourceQuota\n description: Whether hierarchical resource quota is enabled in this\n cluster.\n x-dcl-send-empty: true\n enablePodTreeLabels:\n type: boolean\n x-dcl-go-name: EnablePodTreeLabels\n description: Whether pod tree labels are enabled in this cluster.\n x-dcl-send-empty: true\n enabled:\n type: boolean\n x-dcl-go-name: Enabled\n description: '**DEPRECATED** Configuring Hierarchy Controller through\n the configmanagement feature is no longer recommended. Use https://github.com/kubernetes-sigs/hierarchical-namespaces\n instead.'\n x-dcl-send-empty: true\n management:\n type: string\n x-dcl-go-name: Management\n x-dcl-go-type: FeatureMembershipConfigmanagementManagementEnum\n description: Set this field to MANAGEMENT_AUTOMATIC to enable Config\n Sync auto-upgrades, and set this field to MANAGEMENT_MANUAL or MANAGEMENT_UNSPECIFIED\n to disable Config Sync auto-upgrades.\n x-dcl-server-default: true\n enum:\n - MANAGEMENT_UNSPECIFIED\n - MANAGEMENT_AUTOMATIC\n - MANAGEMENT_MANUAL\n policyController:\n type: object\n x-dcl-go-name: PolicyController\n x-dcl-go-type: FeatureMembershipConfigmanagementPolicyController\n description: '**DEPRECATED** Configuring Policy Controller through the\n configmanagement feature is no longer recommended. Use the policycontroller\n feature instead.'\n properties:\n auditIntervalSeconds:\n type: string\n x-dcl-go-name: AuditIntervalSeconds\n description: Sets the interval for Policy Controller Audit Scans\n (in seconds). When set to 0, this disables audit functionality\n altogether.\n enabled:\n type: boolean\n x-dcl-go-name: Enabled\n description: Enables the installation of Policy Controller. If false,\n the rest of PolicyController fields take no effect.\n exemptableNamespaces:\n type: array\n x-dcl-go-name: ExemptableNamespaces\n description: The set of namespaces that are excluded from Policy\n Controller checks. Namespaces do not need to currently exist on\n the cluster.\n x-dcl-send-empty: true\n x-dcl-list-type: list\n items:\n type: string\n x-dcl-go-type: string\n logDeniesEnabled:\n type: boolean\n x-dcl-go-name: LogDeniesEnabled\n description: Logs all denies and dry run failures.\n monitoring:\n type: object\n x-dcl-go-name: Monitoring\n x-dcl-go-type: FeatureMembershipConfigmanagementPolicyControllerMonitoring\n description: 'Specifies the backends Policy Controller should export\n metrics to. For example, to specify metrics should be exported\n to Cloud Monitoring and Prometheus, specify backends: [\"cloudmonitoring\",\n \"prometheus\"]. Default: [\"cloudmonitoring\", \"prometheus\"]'\n x-dcl-server-default: true\n properties:\n backends:\n type: array\n x-dcl-go-name: Backends\n description: ' Specifies the list of backends Policy Controller\n will export to. Specifying an empty value `[]` disables metrics\n export.'\n x-dcl-server-default: true\n x-dcl-send-empty: true\n x-dcl-list-type: list\n items:\n type: string\n x-dcl-go-type: FeatureMembershipConfigmanagementPolicyControllerMonitoringBackendsEnum\n enum:\n - MONITORING_BACKEND_UNSPECIFIED\n - PROMETHEUS\n - CLOUD_MONITORING\n mutationEnabled:\n type: boolean\n x-dcl-go-name: MutationEnabled\n description: Enable or disable mutation in policy controller. If\n true, mutation CRDs, webhook and controller deployment will be\n deployed to the cluster.\n referentialRulesEnabled:\n type: boolean\n x-dcl-go-name: ReferentialRulesEnabled\n description: Enables the ability to use Constraint Templates that\n reference to objects other than the object currently being evaluated.\n templateLibraryInstalled:\n type: boolean\n x-dcl-go-name: TemplateLibraryInstalled\n description: Installs the default template library along with Policy\n Controller.\n version:\n type: string\n x-dcl-go-name: Version\n description: Optional. Version of ACM to install. Defaults to the latest\n version.\n x-dcl-server-default: true\n feature:\n type: string\n x-dcl-go-name: Feature\n description: The name of the feature\n x-kubernetes-immutable: true\n x-dcl-references:\n - resource: Gkehub/Feature\n field: name\n parent: true\n x-dcl-parameter: true\n location:\n type: string\n x-dcl-go-name: Location\n description: The location of the feature\n x-kubernetes-immutable: true\n x-dcl-parameter: true\n membership:\n type: string\n x-dcl-go-name: Membership\n description: The name of the membership\n x-kubernetes-immutable: true\n x-dcl-references:\n - resource: Gkehub/Membership\n field: name\n x-dcl-parameter: true\n membershipLocation:\n type: string\n x-dcl-go-name: MembershipLocation\n description: The location of the membership\n x-kubernetes-immutable: true\n x-dcl-parameter: true\n mesh:\n type: object\n x-dcl-go-name: Mesh\n x-dcl-go-type: FeatureMembershipMesh\n description: Manage Mesh Features\n properties:\n controlPlane:\n type: string\n x-dcl-go-name: ControlPlane\n x-dcl-go-type: FeatureMembershipMeshControlPlaneEnum\n description: '**DEPRECATED** Whether to automatically manage Service\n Mesh control planes. Possible values: CONTROL_PLANE_MANAGEMENT_UNSPECIFIED,\n AUTOMATIC, MANUAL'\n enum:\n - CONTROL_PLANE_MANAGEMENT_UNSPECIFIED\n - AUTOMATIC\n - MANUAL\n management:\n type: string\n x-dcl-go-name: Management\n x-dcl-go-type: FeatureMembershipMeshManagementEnum\n description: 'Whether to automatically manage Service Mesh. Possible\n values: MANAGEMENT_UNSPECIFIED, MANAGEMENT_AUTOMATIC, MANAGEMENT_MANUAL'\n enum:\n - MANAGEMENT_UNSPECIFIED\n - MANAGEMENT_AUTOMATIC\n - MANAGEMENT_MANUAL\n policycontroller:\n type: object\n x-dcl-go-name: Policycontroller\n x-dcl-go-type: FeatureMembershipPolicycontroller\n description: Policy Controller-specific spec.\n required:\n - policyControllerHubConfig\n properties:\n policyControllerHubConfig:\n type: object\n x-dcl-go-name: PolicyControllerHubConfig\n x-dcl-go-type: FeatureMembershipPolicycontrollerPolicyControllerHubConfig\n description: Policy Controller configuration for the cluster.\n properties:\n auditIntervalSeconds:\n type: integer\n format: int64\n x-dcl-go-name: AuditIntervalSeconds\n description: Sets the interval for Policy Controller Audit Scans\n (in seconds). When set to 0, this disables audit functionality\n altogether.\n constraintViolationLimit:\n type: integer\n format: int64\n x-dcl-go-name: ConstraintViolationLimit\n description: The maximum number of audit violations to be stored\n in a constraint. If not set, the internal default of 20 will be\n used.\n deploymentConfigs:\n type: object\n additionalProperties:\n type: object\n x-dcl-go-type: FeatureMembershipPolicycontrollerPolicyControllerHubConfigDeploymentConfigs\n properties:\n containerResources:\n type: object\n x-dcl-go-name: ContainerResources\n x-dcl-go-type: FeatureMembershipPolicycontrollerPolicyControllerHubConfigDeploymentConfigsContainerResources\n description: Container resource requirements.\n x-dcl-conflicts:\n - replicaCount\n - podAffinity\n - podTolerations\n properties:\n limits:\n type: object\n x-dcl-go-name: Limits\n x-dcl-go-type: FeatureMembershipPolicycontrollerPolicyControllerHubConfigDeploymentConfigsContainerResourcesLimits\n description: Limits describes the maximum amount of compute\n resources allowed for use by the running container.\n properties:\n cpu:\n type: string\n x-dcl-go-name: Cpu\n description: CPU requirement expressed in Kubernetes\n resource units.\n memory:\n type: string\n x-dcl-go-name: Memory\n description: Memory requirement expressed in Kubernetes\n resource units.\n requests:\n type: object\n x-dcl-go-name: Requests\n x-dcl-go-type: FeatureMembershipPolicycontrollerPolicyControllerHubConfigDeploymentConfigsContainerResourcesRequests\n description: Requests describes the amount of compute\n resources reserved for the container by the kube-scheduler.\n properties:\n cpu:\n type: string\n x-dcl-go-name: Cpu\n description: CPU requirement expressed in Kubernetes\n resource units.\n memory:\n type: string\n x-dcl-go-name: Memory\n description: Memory requirement expressed in Kubernetes\n resource units.\n podAffinity:\n type: string\n x-dcl-go-name: PodAffinity\n x-dcl-go-type: FeatureMembershipPolicycontrollerPolicyControllerHubConfigDeploymentConfigsPodAffinityEnum\n description: 'Pod affinity configuration. Possible values:\n AFFINITY_UNSPECIFIED, NO_AFFINITY, ANTI_AFFINITY'\n x-dcl-conflicts:\n - replicaCount\n - containerResources\n - podTolerations\n enum:\n - AFFINITY_UNSPECIFIED\n - NO_AFFINITY\n - ANTI_AFFINITY\n podTolerations:\n type: array\n x-dcl-go-name: PodTolerations\n description: Pod tolerations of node taints.\n x-dcl-conflicts:\n - replicaCount\n - containerResources\n - podAffinity\n x-dcl-send-empty: true\n x-dcl-list-type: list\n items:\n type: object\n x-dcl-go-type: FeatureMembershipPolicycontrollerPolicyControllerHubConfigDeploymentConfigsPodTolerations\n properties:\n effect:\n type: string\n x-dcl-go-name: Effect\n description: Matches a taint effect.\n key:\n type: string\n x-dcl-go-name: Key\n description: Matches a taint key (not necessarily unique).\n operator:\n type: string\n x-dcl-go-name: Operator\n description: Matches a taint operator.\n value:\n type: string\n x-dcl-go-name: Value\n description: Matches a taint value.\n replicaCount:\n type: integer\n format: int64\n x-dcl-go-name: ReplicaCount\n description: Pod replica count.\n x-dcl-conflicts:\n - containerResources\n - podAffinity\n - podTolerations\n x-dcl-go-name: DeploymentConfigs\n description: Map of deployment configs to deployments (\"admission\",\n \"audit\", \"mutation\").\n x-dcl-server-default: true\n exemptableNamespaces:\n type: array\n x-dcl-go-name: ExemptableNamespaces\n description: The set of namespaces that are excluded from Policy\n Controller checks. Namespaces do not need to currently exist on\n the cluster.\n x-dcl-send-empty: true\n x-dcl-list-type: list\n items:\n type: string\n x-dcl-go-type: string\n installSpec:\n type: string\n x-dcl-go-name: InstallSpec\n x-dcl-go-type: FeatureMembershipPolicycontrollerPolicyControllerHubConfigInstallSpecEnum\n description: 'Configures the mode of the Policy Controller installation.\n Possible values: INSTALL_SPEC_UNSPECIFIED, INSTALL_SPEC_NOT_INSTALLED,\n INSTALL_SPEC_ENABLED, INSTALL_SPEC_SUSPENDED, INSTALL_SPEC_DETACHED'\n enum:\n - INSTALL_SPEC_UNSPECIFIED\n - INSTALL_SPEC_NOT_INSTALLED\n - INSTALL_SPEC_ENABLED\n - INSTALL_SPEC_SUSPENDED\n - INSTALL_SPEC_DETACHED\n logDeniesEnabled:\n type: boolean\n x-dcl-go-name: LogDeniesEnabled\n description: Logs all denies and dry run failures.\n monitoring:\n type: object\n x-dcl-go-name: Monitoring\n x-dcl-go-type: FeatureMembershipPolicycontrollerPolicyControllerHubConfigMonitoring\n description: 'Specifies the backends Policy Controller should export\n metrics to. For example, to specify metrics should be exported\n to Cloud Monitoring and Prometheus, specify backends: [\"cloudmonitoring\",\n \"prometheus\"]. Default: [\"cloudmonitoring\", \"prometheus\"]'\n x-dcl-server-default: true\n properties:\n backends:\n type: array\n x-dcl-go-name: Backends\n description: ' Specifies the list of backends Policy Controller\n will export to. Specifying an empty value `[]` disables metrics\n export.'\n x-dcl-server-default: true\n x-dcl-send-empty: true\n x-dcl-list-type: list\n items:\n type: string\n x-dcl-go-type: FeatureMembershipPolicycontrollerPolicyControllerHubConfigMonitoringBackendsEnum\n enum:\n - MONITORING_BACKEND_UNSPECIFIED\n - PROMETHEUS\n - CLOUD_MONITORING\n mutationEnabled:\n type: boolean\n x-dcl-go-name: MutationEnabled\n description: Enables the ability to mutate resources using Policy\n Controller.\n policyContent:\n type: object\n x-dcl-go-name: PolicyContent\n x-dcl-go-type: FeatureMembershipPolicycontrollerPolicyControllerHubConfigPolicyContent\n description: Specifies the desired policy content on the cluster.\n x-dcl-server-default: true\n properties:\n bundles:\n type: object\n additionalProperties:\n type: object\n x-dcl-go-type: FeatureMembershipPolicycontrollerPolicyControllerHubConfigPolicyContentBundles\n properties:\n exemptedNamespaces:\n type: array\n x-dcl-go-name: ExemptedNamespaces\n description: The set of namespaces to be exempted from\n the bundle.\n x-dcl-send-empty: true\n x-dcl-list-type: list\n items:\n type: string\n x-dcl-go-type: string\n x-dcl-go-name: Bundles\n description: map of bundle name to BundleInstallSpec. The bundle\n name maps to the `bundleName` key in the `policycontroller.gke.io/constraintData`\n annotation on a constraint.\n templateLibrary:\n type: object\n x-dcl-go-name: TemplateLibrary\n x-dcl-go-type: FeatureMembershipPolicycontrollerPolicyControllerHubConfigPolicyContentTemplateLibrary\n description: Configures the installation of the Template Library.\n x-dcl-server-default: true\n properties:\n installation:\n type: string\n x-dcl-go-name: Installation\n x-dcl-go-type: FeatureMembershipPolicycontrollerPolicyControllerHubConfigPolicyContentTemplateLibraryInstallationEnum\n description: 'Configures the manner in which the template\n library is installed on the cluster. Possible values:\n INSTALLATION_UNSPECIFIED, NOT_INSTALLED, ALL'\n enum:\n - INSTALLATION_UNSPECIFIED\n - NOT_INSTALLED\n - ALL\n referentialRulesEnabled:\n type: boolean\n x-dcl-go-name: ReferentialRulesEnabled\n description: Enables the ability to use Constraint Templates that\n reference to objects other than the object currently being evaluated.\n version:\n type: string\n x-dcl-go-name: Version\n description: Optional. Version of Policy Controller to install. Defaults\n to the latest version.\n x-dcl-server-default: true\n project:\n type: string\n x-dcl-go-name: Project\n description: The project of the feature\n x-kubernetes-immutable: true\n x-dcl-references:\n - resource: Cloudresourcemanager/Project\n field: name\n parent: true\n x-dcl-parameter: true\n") -// 30994 bytes -// MD5: d83aee28a9edabe5c818830349b37cc5 +// 31227 bytes +// MD5: 86d6d5a05846805028382e6593dcc33f diff --git a/services/google/gkehub/alpha/feature_membership_internal.go b/services/google/gkehub/alpha/feature_membership_internal.go index c0b198d2e..3a58643cc 100755 --- a/services/google/gkehub/alpha/feature_membership_internal.go +++ b/services/google/gkehub/alpha/feature_membership_internal.go @@ -738,6 +738,11 @@ func canonicalizeFeatureMembershipConfigmanagementConfigSync(des, initial *Featu } else { cDes.Enabled = des.Enabled } + if dcl.BoolCanonicalize(des.StopSyncing, initial.StopSyncing) || dcl.IsZeroValue(des.StopSyncing) { + cDes.StopSyncing = initial.StopSyncing + } else { + cDes.StopSyncing = des.StopSyncing + } if dcl.BoolCanonicalize(des.PreventDrift, initial.PreventDrift) || dcl.IsZeroValue(des.PreventDrift) { cDes.PreventDrift = initial.PreventDrift } else { @@ -803,6 +808,9 @@ func canonicalizeNewFeatureMembershipConfigmanagementConfigSync(c *Client, des, if dcl.BoolCanonicalize(des.Enabled, nw.Enabled) { nw.Enabled = des.Enabled } + if dcl.BoolCanonicalize(des.StopSyncing, nw.StopSyncing) { + nw.StopSyncing = des.StopSyncing + } if dcl.BoolCanonicalize(des.PreventDrift, nw.PreventDrift) { nw.PreventDrift = des.PreventDrift } @@ -3362,6 +3370,13 @@ func compareFeatureMembershipConfigmanagementConfigSyncNewStyle(d, a interface{} diffs = append(diffs, ds...) } + if ds, err := dcl.Diff(desired.StopSyncing, actual.StopSyncing, dcl.DiffInfo{OperationSelector: dcl.RequiresRecreate()}, fn.AddNest("StopSyncing")); len(ds) != 0 || err != nil { + if err != nil { + return nil, err + } + diffs = append(diffs, ds...) + } + if ds, err := dcl.Diff(desired.PreventDrift, actual.PreventDrift, dcl.DiffInfo{ServerDefault: true, OperationSelector: dcl.RequiresRecreate()}, fn.AddNest("PreventDrift")); len(ds) != 0 || err != nil { if err != nil { return nil, err @@ -4649,6 +4664,9 @@ func expandFeatureMembershipConfigmanagementConfigSync(c *Client, f *FeatureMemb if v := f.Enabled; !dcl.IsEmptyValueIndirect(v) { m["enabled"] = v } + if v := f.StopSyncing; !dcl.IsEmptyValueIndirect(v) { + m["stopSyncing"] = v + } if v := f.PreventDrift; !dcl.IsEmptyValueIndirect(v) { m["preventDrift"] = v } @@ -4680,6 +4698,7 @@ func flattenFeatureMembershipConfigmanagementConfigSync(c *Client, i interface{} r.Git = flattenFeatureMembershipConfigmanagementConfigSyncGit(c, m["git"], res) r.SourceFormat = dcl.FlattenString(m["sourceFormat"]) r.Enabled = dcl.FlattenBool(m["enabled"]) + r.StopSyncing = dcl.FlattenBool(m["stopSyncing"]) r.PreventDrift = dcl.FlattenBool(m["preventDrift"]) r.MetricsGcpServiceAccountEmail = dcl.FlattenString(m["metricsGcpServiceAccountEmail"]) r.Oci = flattenFeatureMembershipConfigmanagementConfigSyncOci(c, m["oci"], res) diff --git a/services/google/gkehub/alpha/feature_membership_schema.go b/services/google/gkehub/alpha/feature_membership_schema.go index 0b60cbb96..a56c791fd 100755 --- a/services/google/gkehub/alpha/feature_membership_schema.go +++ b/services/google/gkehub/alpha/feature_membership_schema.go @@ -272,6 +272,11 @@ func DCLFeatureMembershipSchema() *dcl.Schema { GoName: "SourceFormat", Description: "Specifies whether the Config Sync Repo is in \"hierarchical\" or \"unstructured\" mode.", }, + "stopSyncing": &dcl.Property{ + Type: "boolean", + GoName: "StopSyncing", + Description: "Set to true to stop syncing configs for a single cluster. Default: false.", + }, }, }, "hierarchyController": &dcl.Property{ diff --git a/services/google/gkehub/beta/feature_membership.go b/services/google/gkehub/beta/feature_membership.go index 9b63c011f..4bc122fbb 100755 --- a/services/google/gkehub/beta/feature_membership.go +++ b/services/google/gkehub/beta/feature_membership.go @@ -369,6 +369,7 @@ type FeatureMembershipConfigmanagementConfigSync struct { Git *FeatureMembershipConfigmanagementConfigSyncGit `json:"git"` SourceFormat *string `json:"sourceFormat"` Enabled *bool `json:"enabled"` + StopSyncing *bool `json:"stopSyncing"` PreventDrift *bool `json:"preventDrift"` MetricsGcpServiceAccountEmail *string `json:"metricsGcpServiceAccountEmail"` Oci *FeatureMembershipConfigmanagementConfigSyncOci `json:"oci"` @@ -395,6 +396,8 @@ func (r *FeatureMembershipConfigmanagementConfigSync) UnmarshalJSON(data []byte) r.Enabled = res.Enabled + r.StopSyncing = res.StopSyncing + r.PreventDrift = res.PreventDrift r.MetricsGcpServiceAccountEmail = res.MetricsGcpServiceAccountEmail diff --git a/services/google/gkehub/beta/feature_membership.yaml b/services/google/gkehub/beta/feature_membership.yaml index 7a1afddf6..57653e205 100755 --- a/services/google/gkehub/beta/feature_membership.yaml +++ b/services/google/gkehub/beta/feature_membership.yaml @@ -225,6 +225,11 @@ components: x-dcl-go-name: SourceFormat description: Specifies whether the Config Sync Repo is in "hierarchical" or "unstructured" mode. + stopSyncing: + type: boolean + x-dcl-go-name: StopSyncing + description: 'Set to true to stop syncing configs for a single cluster. + Default: false.' hierarchyController: type: object x-dcl-go-name: HierarchyController diff --git a/services/google/gkehub/beta/feature_membership_beta_yaml_embed.go b/services/google/gkehub/beta/feature_membership_beta_yaml_embed.go index 535656180..004b5aeb8 100755 --- a/services/google/gkehub/beta/feature_membership_beta_yaml_embed.go +++ b/services/google/gkehub/beta/feature_membership_beta_yaml_embed.go @@ -17,7 +17,7 @@ package beta // blaze-out/k8-fastbuild/genfiles/cloud/graphite/mmv2/services/google/gkehub/beta/feature_membership.yaml -var YAML_feature_membership = []byte("info:\n title: GkeHub/FeatureMembership\n description: The GkeHub FeatureMembership resource\n x-dcl-struct-name: FeatureMembership\n x-dcl-has-iam: false\n x-dcl-mutex: '{{project}}/{{location}}/{{feature}}'\npaths:\n get:\n description: The function used to get information about a FeatureMembership\n parameters:\n - name: featureMembership\n required: true\n description: A full instance of a FeatureMembership\n apply:\n description: The function used to apply information about a FeatureMembership\n parameters:\n - name: featureMembership\n required: true\n description: A full instance of a FeatureMembership\n delete:\n description: The function used to delete a FeatureMembership\n parameters:\n - name: featureMembership\n required: true\n description: A full instance of a FeatureMembership\n deleteAll:\n description: The function used to delete all FeatureMembership\n parameters:\n - name: project\n required: true\n schema:\n type: string\n - name: location\n required: true\n schema:\n type: string\n - name: feature\n required: true\n schema:\n type: string\n list:\n description: The function used to list information about many FeatureMembership\n parameters:\n - name: project\n required: true\n schema:\n type: string\n - name: location\n required: true\n schema:\n type: string\n - name: feature\n required: true\n schema:\n type: string\ncomponents:\n schemas:\n FeatureMembership:\n title: FeatureMembership\n x-dcl-id: projects/{{project}}/locations/{{location}}/features/{{feature}}/memberships/{{membership}}\n x-dcl-parent-container: project\n x-dcl-has-create: true\n x-dcl-has-iam: false\n x-dcl-read-timeout: 0\n x-dcl-apply-timeout: 0\n x-dcl-delete-timeout: 0\n type: object\n required:\n - project\n - location\n - feature\n - membership\n properties:\n configmanagement:\n type: object\n x-dcl-go-name: Configmanagement\n x-dcl-go-type: FeatureMembershipConfigmanagement\n description: Config Management-specific spec.\n properties:\n binauthz:\n type: object\n x-dcl-go-name: Binauthz\n x-dcl-go-type: FeatureMembershipConfigmanagementBinauthz\n description: '**DEPRECATED** Binauthz configuration for the cluster.\n This field will be ignored and should not be set.'\n x-dcl-server-default: true\n properties:\n enabled:\n type: boolean\n x-dcl-go-name: Enabled\n description: Whether binauthz is enabled in this cluster.\n x-dcl-parameter: true\n configSync:\n type: object\n x-dcl-go-name: ConfigSync\n x-dcl-go-type: FeatureMembershipConfigmanagementConfigSync\n description: Config Sync configuration for the cluster.\n x-dcl-send-empty: true\n properties:\n enabled:\n type: boolean\n x-dcl-go-name: Enabled\n description: Enables the installation of ConfigSync. If set to true,\n ConfigSync resources will be created and the other ConfigSync\n fields will be applied if exist. If set to false, all other ConfigSync\n fields will be ignored, ConfigSync resources will be deleted.\n If omitted, ConfigSync resources will be managed depends on the\n presence of the git or oci field.\n git:\n type: object\n x-dcl-go-name: Git\n x-dcl-go-type: FeatureMembershipConfigmanagementConfigSyncGit\n properties:\n gcpServiceAccountEmail:\n type: string\n x-dcl-go-name: GcpServiceAccountEmail\n description: The GCP Service Account Email used for auth when\n secretType is gcpServiceAccount.\n x-dcl-references:\n - resource: Iam/ServiceAccount\n field: email\n httpsProxy:\n type: string\n x-dcl-go-name: HttpsProxy\n description: URL for the HTTPS proxy to be used when communicating\n with the Git repo.\n policyDir:\n type: string\n x-dcl-go-name: PolicyDir\n description: 'The path within the Git repository that represents\n the top level of the repo to sync. Default: the root directory\n of the repository.'\n secretType:\n type: string\n x-dcl-go-name: SecretType\n description: Type of secret configured for access to the Git\n repo. Must be one of ssh, cookiefile, gcenode, token, gcpserviceaccount\n or none. The validation of this is case-sensitive.\n syncBranch:\n type: string\n x-dcl-go-name: SyncBranch\n description: 'The branch of the repository to sync from. Default:\n master.'\n syncRepo:\n type: string\n x-dcl-go-name: SyncRepo\n description: The URL of the Git repository to use as the source\n of truth.\n syncRev:\n type: string\n x-dcl-go-name: SyncRev\n description: Git revision (tag or hash) to check out. Default\n HEAD.\n syncWaitSecs:\n type: string\n x-dcl-go-name: SyncWaitSecs\n description: 'Period in seconds between consecutive syncs. Default:\n 15.'\n metricsGcpServiceAccountEmail:\n type: string\n x-dcl-go-name: MetricsGcpServiceAccountEmail\n description: 'Deprecated: If Workload Identity Federation for GKE\n is enabled, Google Cloud Service Account is no longer needed for\n exporting Config Sync metrics: https://cloud.google.com/kubernetes-engine/enterprise/config-sync/docs/how-to/monitor-config-sync-cloud-monitoring#custom-monitoring.'\n x-dcl-references:\n - resource: Iam/ServiceAccount\n field: email\n x-dcl-deprecated: true\n oci:\n type: object\n x-dcl-go-name: Oci\n x-dcl-go-type: FeatureMembershipConfigmanagementConfigSyncOci\n properties:\n gcpServiceAccountEmail:\n type: string\n x-dcl-go-name: GcpServiceAccountEmail\n description: 'The GCP Service Account Email used for auth when\n secret_type is gcpserviceaccount. '\n x-dcl-references:\n - resource: Iam/ServiceAccount\n field: email\n policyDir:\n type: string\n x-dcl-go-name: PolicyDir\n description: 'The absolute path of the directory that contains\n the local resources. Default: the root directory of the image.'\n secretType:\n type: string\n x-dcl-go-name: SecretType\n description: Type of secret configured for access to the OCI\n Image. Must be one of gcenode, gcpserviceaccount or none.\n The validation of this is case-sensitive.\n syncRepo:\n type: string\n x-dcl-go-name: SyncRepo\n description: The OCI image repository URL for the package to\n sync from. e.g. LOCATION-docker.pkg.dev/PROJECT_ID/REPOSITORY_NAME/PACKAGE_NAME.\n syncWaitSecs:\n type: string\n x-dcl-go-name: SyncWaitSecs\n description: 'Period in seconds(int64 format) between consecutive\n syncs. Default: 15.'\n preventDrift:\n type: boolean\n x-dcl-go-name: PreventDrift\n description: Set to true to enable the Config Sync admission webhook\n to prevent drifts. If set to `false`, disables the Config Sync\n admission webhook and does not prevent drifts.\n x-dcl-server-default: true\n sourceFormat:\n type: string\n x-dcl-go-name: SourceFormat\n description: Specifies whether the Config Sync Repo is in \"hierarchical\"\n or \"unstructured\" mode.\n hierarchyController:\n type: object\n x-dcl-go-name: HierarchyController\n x-dcl-go-type: FeatureMembershipConfigmanagementHierarchyController\n description: Hierarchy Controller configuration for the cluster.\n x-dcl-send-empty: true\n properties:\n enableHierarchicalResourceQuota:\n type: boolean\n x-dcl-go-name: EnableHierarchicalResourceQuota\n description: Whether hierarchical resource quota is enabled in this\n cluster.\n x-dcl-send-empty: true\n enablePodTreeLabels:\n type: boolean\n x-dcl-go-name: EnablePodTreeLabels\n description: Whether pod tree labels are enabled in this cluster.\n x-dcl-send-empty: true\n enabled:\n type: boolean\n x-dcl-go-name: Enabled\n description: '**DEPRECATED** Configuring Hierarchy Controller through\n the configmanagement feature is no longer recommended. Use https://github.com/kubernetes-sigs/hierarchical-namespaces\n instead.'\n x-dcl-send-empty: true\n management:\n type: string\n x-dcl-go-name: Management\n x-dcl-go-type: FeatureMembershipConfigmanagementManagementEnum\n description: Set this field to MANAGEMENT_AUTOMATIC to enable Config\n Sync auto-upgrades, and set this field to MANAGEMENT_MANUAL or MANAGEMENT_UNSPECIFIED\n to disable Config Sync auto-upgrades.\n x-dcl-server-default: true\n enum:\n - MANAGEMENT_UNSPECIFIED\n - MANAGEMENT_AUTOMATIC\n - MANAGEMENT_MANUAL\n policyController:\n type: object\n x-dcl-go-name: PolicyController\n x-dcl-go-type: FeatureMembershipConfigmanagementPolicyController\n description: '**DEPRECATED** Configuring Policy Controller through the\n configmanagement feature is no longer recommended. Use the policycontroller\n feature instead.'\n properties:\n auditIntervalSeconds:\n type: string\n x-dcl-go-name: AuditIntervalSeconds\n description: Sets the interval for Policy Controller Audit Scans\n (in seconds). When set to 0, this disables audit functionality\n altogether.\n enabled:\n type: boolean\n x-dcl-go-name: Enabled\n description: Enables the installation of Policy Controller. If false,\n the rest of PolicyController fields take no effect.\n exemptableNamespaces:\n type: array\n x-dcl-go-name: ExemptableNamespaces\n description: The set of namespaces that are excluded from Policy\n Controller checks. Namespaces do not need to currently exist on\n the cluster.\n x-dcl-send-empty: true\n x-dcl-list-type: list\n items:\n type: string\n x-dcl-go-type: string\n logDeniesEnabled:\n type: boolean\n x-dcl-go-name: LogDeniesEnabled\n description: Logs all denies and dry run failures.\n monitoring:\n type: object\n x-dcl-go-name: Monitoring\n x-dcl-go-type: FeatureMembershipConfigmanagementPolicyControllerMonitoring\n description: 'Specifies the backends Policy Controller should export\n metrics to. For example, to specify metrics should be exported\n to Cloud Monitoring and Prometheus, specify backends: [\"cloudmonitoring\",\n \"prometheus\"]. Default: [\"cloudmonitoring\", \"prometheus\"]'\n x-dcl-server-default: true\n properties:\n backends:\n type: array\n x-dcl-go-name: Backends\n description: ' Specifies the list of backends Policy Controller\n will export to. Specifying an empty value `[]` disables metrics\n export.'\n x-dcl-server-default: true\n x-dcl-send-empty: true\n x-dcl-list-type: list\n items:\n type: string\n x-dcl-go-type: FeatureMembershipConfigmanagementPolicyControllerMonitoringBackendsEnum\n enum:\n - MONITORING_BACKEND_UNSPECIFIED\n - PROMETHEUS\n - CLOUD_MONITORING\n mutationEnabled:\n type: boolean\n x-dcl-go-name: MutationEnabled\n description: Enable or disable mutation in policy controller. If\n true, mutation CRDs, webhook and controller deployment will be\n deployed to the cluster.\n referentialRulesEnabled:\n type: boolean\n x-dcl-go-name: ReferentialRulesEnabled\n description: Enables the ability to use Constraint Templates that\n reference to objects other than the object currently being evaluated.\n templateLibraryInstalled:\n type: boolean\n x-dcl-go-name: TemplateLibraryInstalled\n description: Installs the default template library along with Policy\n Controller.\n version:\n type: string\n x-dcl-go-name: Version\n description: Optional. Version of ACM to install. Defaults to the latest\n version.\n x-dcl-server-default: true\n feature:\n type: string\n x-dcl-go-name: Feature\n description: The name of the feature\n x-kubernetes-immutable: true\n x-dcl-references:\n - resource: Gkehub/Feature\n field: name\n parent: true\n x-dcl-parameter: true\n location:\n type: string\n x-dcl-go-name: Location\n description: The location of the feature\n x-kubernetes-immutable: true\n x-dcl-parameter: true\n membership:\n type: string\n x-dcl-go-name: Membership\n description: The name of the membership\n x-kubernetes-immutable: true\n x-dcl-references:\n - resource: Gkehub/Membership\n field: name\n x-dcl-parameter: true\n membershipLocation:\n type: string\n x-dcl-go-name: MembershipLocation\n description: The location of the membership\n x-kubernetes-immutable: true\n x-dcl-parameter: true\n mesh:\n type: object\n x-dcl-go-name: Mesh\n x-dcl-go-type: FeatureMembershipMesh\n description: Manage Mesh Features\n properties:\n controlPlane:\n type: string\n x-dcl-go-name: ControlPlane\n x-dcl-go-type: FeatureMembershipMeshControlPlaneEnum\n description: '**DEPRECATED** Whether to automatically manage Service\n Mesh control planes. Possible values: CONTROL_PLANE_MANAGEMENT_UNSPECIFIED,\n AUTOMATIC, MANUAL'\n enum:\n - CONTROL_PLANE_MANAGEMENT_UNSPECIFIED\n - AUTOMATIC\n - MANUAL\n management:\n type: string\n x-dcl-go-name: Management\n x-dcl-go-type: FeatureMembershipMeshManagementEnum\n description: 'Whether to automatically manage Service Mesh. Possible\n values: MANAGEMENT_UNSPECIFIED, MANAGEMENT_AUTOMATIC, MANAGEMENT_MANUAL'\n enum:\n - MANAGEMENT_UNSPECIFIED\n - MANAGEMENT_AUTOMATIC\n - MANAGEMENT_MANUAL\n policycontroller:\n type: object\n x-dcl-go-name: Policycontroller\n x-dcl-go-type: FeatureMembershipPolicycontroller\n description: Policy Controller-specific spec.\n required:\n - policyControllerHubConfig\n properties:\n policyControllerHubConfig:\n type: object\n x-dcl-go-name: PolicyControllerHubConfig\n x-dcl-go-type: FeatureMembershipPolicycontrollerPolicyControllerHubConfig\n description: Policy Controller configuration for the cluster.\n properties:\n auditIntervalSeconds:\n type: integer\n format: int64\n x-dcl-go-name: AuditIntervalSeconds\n description: Sets the interval for Policy Controller Audit Scans\n (in seconds). When set to 0, this disables audit functionality\n altogether.\n constraintViolationLimit:\n type: integer\n format: int64\n x-dcl-go-name: ConstraintViolationLimit\n description: The maximum number of audit violations to be stored\n in a constraint. If not set, the internal default of 20 will be\n used.\n deploymentConfigs:\n type: object\n additionalProperties:\n type: object\n x-dcl-go-type: FeatureMembershipPolicycontrollerPolicyControllerHubConfigDeploymentConfigs\n properties:\n containerResources:\n type: object\n x-dcl-go-name: ContainerResources\n x-dcl-go-type: FeatureMembershipPolicycontrollerPolicyControllerHubConfigDeploymentConfigsContainerResources\n description: Container resource requirements.\n x-dcl-conflicts:\n - replicaCount\n - podAffinity\n - podTolerations\n properties:\n limits:\n type: object\n x-dcl-go-name: Limits\n x-dcl-go-type: FeatureMembershipPolicycontrollerPolicyControllerHubConfigDeploymentConfigsContainerResourcesLimits\n description: Limits describes the maximum amount of compute\n resources allowed for use by the running container.\n properties:\n cpu:\n type: string\n x-dcl-go-name: Cpu\n description: CPU requirement expressed in Kubernetes\n resource units.\n memory:\n type: string\n x-dcl-go-name: Memory\n description: Memory requirement expressed in Kubernetes\n resource units.\n requests:\n type: object\n x-dcl-go-name: Requests\n x-dcl-go-type: FeatureMembershipPolicycontrollerPolicyControllerHubConfigDeploymentConfigsContainerResourcesRequests\n description: Requests describes the amount of compute\n resources reserved for the container by the kube-scheduler.\n properties:\n cpu:\n type: string\n x-dcl-go-name: Cpu\n description: CPU requirement expressed in Kubernetes\n resource units.\n memory:\n type: string\n x-dcl-go-name: Memory\n description: Memory requirement expressed in Kubernetes\n resource units.\n podAffinity:\n type: string\n x-dcl-go-name: PodAffinity\n x-dcl-go-type: FeatureMembershipPolicycontrollerPolicyControllerHubConfigDeploymentConfigsPodAffinityEnum\n description: 'Pod affinity configuration. Possible values:\n AFFINITY_UNSPECIFIED, NO_AFFINITY, ANTI_AFFINITY'\n x-dcl-conflicts:\n - replicaCount\n - containerResources\n - podTolerations\n enum:\n - AFFINITY_UNSPECIFIED\n - NO_AFFINITY\n - ANTI_AFFINITY\n podTolerations:\n type: array\n x-dcl-go-name: PodTolerations\n description: Pod tolerations of node taints.\n x-dcl-conflicts:\n - replicaCount\n - containerResources\n - podAffinity\n x-dcl-send-empty: true\n x-dcl-list-type: list\n items:\n type: object\n x-dcl-go-type: FeatureMembershipPolicycontrollerPolicyControllerHubConfigDeploymentConfigsPodTolerations\n properties:\n effect:\n type: string\n x-dcl-go-name: Effect\n description: Matches a taint effect.\n key:\n type: string\n x-dcl-go-name: Key\n description: Matches a taint key (not necessarily unique).\n operator:\n type: string\n x-dcl-go-name: Operator\n description: Matches a taint operator.\n value:\n type: string\n x-dcl-go-name: Value\n description: Matches a taint value.\n replicaCount:\n type: integer\n format: int64\n x-dcl-go-name: ReplicaCount\n description: Pod replica count.\n x-dcl-conflicts:\n - containerResources\n - podAffinity\n - podTolerations\n x-dcl-go-name: DeploymentConfigs\n description: Map of deployment configs to deployments (\"admission\",\n \"audit\", \"mutation\").\n x-dcl-server-default: true\n exemptableNamespaces:\n type: array\n x-dcl-go-name: ExemptableNamespaces\n description: The set of namespaces that are excluded from Policy\n Controller checks. Namespaces do not need to currently exist on\n the cluster.\n x-dcl-send-empty: true\n x-dcl-list-type: list\n items:\n type: string\n x-dcl-go-type: string\n installSpec:\n type: string\n x-dcl-go-name: InstallSpec\n x-dcl-go-type: FeatureMembershipPolicycontrollerPolicyControllerHubConfigInstallSpecEnum\n description: 'Configures the mode of the Policy Controller installation.\n Possible values: INSTALL_SPEC_UNSPECIFIED, INSTALL_SPEC_NOT_INSTALLED,\n INSTALL_SPEC_ENABLED, INSTALL_SPEC_SUSPENDED, INSTALL_SPEC_DETACHED'\n enum:\n - INSTALL_SPEC_UNSPECIFIED\n - INSTALL_SPEC_NOT_INSTALLED\n - INSTALL_SPEC_ENABLED\n - INSTALL_SPEC_SUSPENDED\n - INSTALL_SPEC_DETACHED\n logDeniesEnabled:\n type: boolean\n x-dcl-go-name: LogDeniesEnabled\n description: Logs all denies and dry run failures.\n monitoring:\n type: object\n x-dcl-go-name: Monitoring\n x-dcl-go-type: FeatureMembershipPolicycontrollerPolicyControllerHubConfigMonitoring\n description: 'Specifies the backends Policy Controller should export\n metrics to. For example, to specify metrics should be exported\n to Cloud Monitoring and Prometheus, specify backends: [\"cloudmonitoring\",\n \"prometheus\"]. Default: [\"cloudmonitoring\", \"prometheus\"]'\n x-dcl-server-default: true\n properties:\n backends:\n type: array\n x-dcl-go-name: Backends\n description: ' Specifies the list of backends Policy Controller\n will export to. Specifying an empty value `[]` disables metrics\n export.'\n x-dcl-server-default: true\n x-dcl-send-empty: true\n x-dcl-list-type: list\n items:\n type: string\n x-dcl-go-type: FeatureMembershipPolicycontrollerPolicyControllerHubConfigMonitoringBackendsEnum\n enum:\n - MONITORING_BACKEND_UNSPECIFIED\n - PROMETHEUS\n - CLOUD_MONITORING\n mutationEnabled:\n type: boolean\n x-dcl-go-name: MutationEnabled\n description: Enables the ability to mutate resources using Policy\n Controller.\n policyContent:\n type: object\n x-dcl-go-name: PolicyContent\n x-dcl-go-type: FeatureMembershipPolicycontrollerPolicyControllerHubConfigPolicyContent\n description: Specifies the desired policy content on the cluster.\n x-dcl-server-default: true\n properties:\n bundles:\n type: object\n additionalProperties:\n type: object\n x-dcl-go-type: FeatureMembershipPolicycontrollerPolicyControllerHubConfigPolicyContentBundles\n properties:\n exemptedNamespaces:\n type: array\n x-dcl-go-name: ExemptedNamespaces\n description: The set of namespaces to be exempted from\n the bundle.\n x-dcl-send-empty: true\n x-dcl-list-type: list\n items:\n type: string\n x-dcl-go-type: string\n x-dcl-go-name: Bundles\n description: map of bundle name to BundleInstallSpec. The bundle\n name maps to the `bundleName` key in the `policycontroller.gke.io/constraintData`\n annotation on a constraint.\n templateLibrary:\n type: object\n x-dcl-go-name: TemplateLibrary\n x-dcl-go-type: FeatureMembershipPolicycontrollerPolicyControllerHubConfigPolicyContentTemplateLibrary\n description: Configures the installation of the Template Library.\n x-dcl-server-default: true\n properties:\n installation:\n type: string\n x-dcl-go-name: Installation\n x-dcl-go-type: FeatureMembershipPolicycontrollerPolicyControllerHubConfigPolicyContentTemplateLibraryInstallationEnum\n description: 'Configures the manner in which the template\n library is installed on the cluster. Possible values:\n INSTALLATION_UNSPECIFIED, NOT_INSTALLED, ALL'\n enum:\n - INSTALLATION_UNSPECIFIED\n - NOT_INSTALLED\n - ALL\n referentialRulesEnabled:\n type: boolean\n x-dcl-go-name: ReferentialRulesEnabled\n description: Enables the ability to use Constraint Templates that\n reference to objects other than the object currently being evaluated.\n version:\n type: string\n x-dcl-go-name: Version\n description: Optional. Version of Policy Controller to install. Defaults\n to the latest version.\n x-dcl-server-default: true\n project:\n type: string\n x-dcl-go-name: Project\n description: The project of the feature\n x-kubernetes-immutable: true\n x-dcl-references:\n - resource: Cloudresourcemanager/Project\n field: name\n parent: true\n x-dcl-parameter: true\n") +var YAML_feature_membership = []byte("info:\n title: GkeHub/FeatureMembership\n description: The GkeHub FeatureMembership resource\n x-dcl-struct-name: FeatureMembership\n x-dcl-has-iam: false\n x-dcl-mutex: '{{project}}/{{location}}/{{feature}}'\npaths:\n get:\n description: The function used to get information about a FeatureMembership\n parameters:\n - name: featureMembership\n required: true\n description: A full instance of a FeatureMembership\n apply:\n description: The function used to apply information about a FeatureMembership\n parameters:\n - name: featureMembership\n required: true\n description: A full instance of a FeatureMembership\n delete:\n description: The function used to delete a FeatureMembership\n parameters:\n - name: featureMembership\n required: true\n description: A full instance of a FeatureMembership\n deleteAll:\n description: The function used to delete all FeatureMembership\n parameters:\n - name: project\n required: true\n schema:\n type: string\n - name: location\n required: true\n schema:\n type: string\n - name: feature\n required: true\n schema:\n type: string\n list:\n description: The function used to list information about many FeatureMembership\n parameters:\n - name: project\n required: true\n schema:\n type: string\n - name: location\n required: true\n schema:\n type: string\n - name: feature\n required: true\n schema:\n type: string\ncomponents:\n schemas:\n FeatureMembership:\n title: FeatureMembership\n x-dcl-id: projects/{{project}}/locations/{{location}}/features/{{feature}}/memberships/{{membership}}\n x-dcl-parent-container: project\n x-dcl-has-create: true\n x-dcl-has-iam: false\n x-dcl-read-timeout: 0\n x-dcl-apply-timeout: 0\n x-dcl-delete-timeout: 0\n type: object\n required:\n - project\n - location\n - feature\n - membership\n properties:\n configmanagement:\n type: object\n x-dcl-go-name: Configmanagement\n x-dcl-go-type: FeatureMembershipConfigmanagement\n description: Config Management-specific spec.\n properties:\n binauthz:\n type: object\n x-dcl-go-name: Binauthz\n x-dcl-go-type: FeatureMembershipConfigmanagementBinauthz\n description: '**DEPRECATED** Binauthz configuration for the cluster.\n This field will be ignored and should not be set.'\n x-dcl-server-default: true\n properties:\n enabled:\n type: boolean\n x-dcl-go-name: Enabled\n description: Whether binauthz is enabled in this cluster.\n x-dcl-parameter: true\n configSync:\n type: object\n x-dcl-go-name: ConfigSync\n x-dcl-go-type: FeatureMembershipConfigmanagementConfigSync\n description: Config Sync configuration for the cluster.\n x-dcl-send-empty: true\n properties:\n enabled:\n type: boolean\n x-dcl-go-name: Enabled\n description: Enables the installation of ConfigSync. If set to true,\n ConfigSync resources will be created and the other ConfigSync\n fields will be applied if exist. If set to false, all other ConfigSync\n fields will be ignored, ConfigSync resources will be deleted.\n If omitted, ConfigSync resources will be managed depends on the\n presence of the git or oci field.\n git:\n type: object\n x-dcl-go-name: Git\n x-dcl-go-type: FeatureMembershipConfigmanagementConfigSyncGit\n properties:\n gcpServiceAccountEmail:\n type: string\n x-dcl-go-name: GcpServiceAccountEmail\n description: The GCP Service Account Email used for auth when\n secretType is gcpServiceAccount.\n x-dcl-references:\n - resource: Iam/ServiceAccount\n field: email\n httpsProxy:\n type: string\n x-dcl-go-name: HttpsProxy\n description: URL for the HTTPS proxy to be used when communicating\n with the Git repo.\n policyDir:\n type: string\n x-dcl-go-name: PolicyDir\n description: 'The path within the Git repository that represents\n the top level of the repo to sync. Default: the root directory\n of the repository.'\n secretType:\n type: string\n x-dcl-go-name: SecretType\n description: Type of secret configured for access to the Git\n repo. Must be one of ssh, cookiefile, gcenode, token, gcpserviceaccount\n or none. The validation of this is case-sensitive.\n syncBranch:\n type: string\n x-dcl-go-name: SyncBranch\n description: 'The branch of the repository to sync from. Default:\n master.'\n syncRepo:\n type: string\n x-dcl-go-name: SyncRepo\n description: The URL of the Git repository to use as the source\n of truth.\n syncRev:\n type: string\n x-dcl-go-name: SyncRev\n description: Git revision (tag or hash) to check out. Default\n HEAD.\n syncWaitSecs:\n type: string\n x-dcl-go-name: SyncWaitSecs\n description: 'Period in seconds between consecutive syncs. Default:\n 15.'\n metricsGcpServiceAccountEmail:\n type: string\n x-dcl-go-name: MetricsGcpServiceAccountEmail\n description: 'Deprecated: If Workload Identity Federation for GKE\n is enabled, Google Cloud Service Account is no longer needed for\n exporting Config Sync metrics: https://cloud.google.com/kubernetes-engine/enterprise/config-sync/docs/how-to/monitor-config-sync-cloud-monitoring#custom-monitoring.'\n x-dcl-references:\n - resource: Iam/ServiceAccount\n field: email\n x-dcl-deprecated: true\n oci:\n type: object\n x-dcl-go-name: Oci\n x-dcl-go-type: FeatureMembershipConfigmanagementConfigSyncOci\n properties:\n gcpServiceAccountEmail:\n type: string\n x-dcl-go-name: GcpServiceAccountEmail\n description: 'The GCP Service Account Email used for auth when\n secret_type is gcpserviceaccount. '\n x-dcl-references:\n - resource: Iam/ServiceAccount\n field: email\n policyDir:\n type: string\n x-dcl-go-name: PolicyDir\n description: 'The absolute path of the directory that contains\n the local resources. Default: the root directory of the image.'\n secretType:\n type: string\n x-dcl-go-name: SecretType\n description: Type of secret configured for access to the OCI\n Image. Must be one of gcenode, gcpserviceaccount or none.\n The validation of this is case-sensitive.\n syncRepo:\n type: string\n x-dcl-go-name: SyncRepo\n description: The OCI image repository URL for the package to\n sync from. e.g. LOCATION-docker.pkg.dev/PROJECT_ID/REPOSITORY_NAME/PACKAGE_NAME.\n syncWaitSecs:\n type: string\n x-dcl-go-name: SyncWaitSecs\n description: 'Period in seconds(int64 format) between consecutive\n syncs. Default: 15.'\n preventDrift:\n type: boolean\n x-dcl-go-name: PreventDrift\n description: Set to true to enable the Config Sync admission webhook\n to prevent drifts. If set to `false`, disables the Config Sync\n admission webhook and does not prevent drifts.\n x-dcl-server-default: true\n sourceFormat:\n type: string\n x-dcl-go-name: SourceFormat\n description: Specifies whether the Config Sync Repo is in \"hierarchical\"\n or \"unstructured\" mode.\n stopSyncing:\n type: boolean\n x-dcl-go-name: StopSyncing\n description: 'Set to true to stop syncing configs for a single cluster.\n Default: false.'\n hierarchyController:\n type: object\n x-dcl-go-name: HierarchyController\n x-dcl-go-type: FeatureMembershipConfigmanagementHierarchyController\n description: Hierarchy Controller configuration for the cluster.\n x-dcl-send-empty: true\n properties:\n enableHierarchicalResourceQuota:\n type: boolean\n x-dcl-go-name: EnableHierarchicalResourceQuota\n description: Whether hierarchical resource quota is enabled in this\n cluster.\n x-dcl-send-empty: true\n enablePodTreeLabels:\n type: boolean\n x-dcl-go-name: EnablePodTreeLabels\n description: Whether pod tree labels are enabled in this cluster.\n x-dcl-send-empty: true\n enabled:\n type: boolean\n x-dcl-go-name: Enabled\n description: '**DEPRECATED** Configuring Hierarchy Controller through\n the configmanagement feature is no longer recommended. Use https://github.com/kubernetes-sigs/hierarchical-namespaces\n instead.'\n x-dcl-send-empty: true\n management:\n type: string\n x-dcl-go-name: Management\n x-dcl-go-type: FeatureMembershipConfigmanagementManagementEnum\n description: Set this field to MANAGEMENT_AUTOMATIC to enable Config\n Sync auto-upgrades, and set this field to MANAGEMENT_MANUAL or MANAGEMENT_UNSPECIFIED\n to disable Config Sync auto-upgrades.\n x-dcl-server-default: true\n enum:\n - MANAGEMENT_UNSPECIFIED\n - MANAGEMENT_AUTOMATIC\n - MANAGEMENT_MANUAL\n policyController:\n type: object\n x-dcl-go-name: PolicyController\n x-dcl-go-type: FeatureMembershipConfigmanagementPolicyController\n description: '**DEPRECATED** Configuring Policy Controller through the\n configmanagement feature is no longer recommended. Use the policycontroller\n feature instead.'\n properties:\n auditIntervalSeconds:\n type: string\n x-dcl-go-name: AuditIntervalSeconds\n description: Sets the interval for Policy Controller Audit Scans\n (in seconds). When set to 0, this disables audit functionality\n altogether.\n enabled:\n type: boolean\n x-dcl-go-name: Enabled\n description: Enables the installation of Policy Controller. If false,\n the rest of PolicyController fields take no effect.\n exemptableNamespaces:\n type: array\n x-dcl-go-name: ExemptableNamespaces\n description: The set of namespaces that are excluded from Policy\n Controller checks. Namespaces do not need to currently exist on\n the cluster.\n x-dcl-send-empty: true\n x-dcl-list-type: list\n items:\n type: string\n x-dcl-go-type: string\n logDeniesEnabled:\n type: boolean\n x-dcl-go-name: LogDeniesEnabled\n description: Logs all denies and dry run failures.\n monitoring:\n type: object\n x-dcl-go-name: Monitoring\n x-dcl-go-type: FeatureMembershipConfigmanagementPolicyControllerMonitoring\n description: 'Specifies the backends Policy Controller should export\n metrics to. For example, to specify metrics should be exported\n to Cloud Monitoring and Prometheus, specify backends: [\"cloudmonitoring\",\n \"prometheus\"]. Default: [\"cloudmonitoring\", \"prometheus\"]'\n x-dcl-server-default: true\n properties:\n backends:\n type: array\n x-dcl-go-name: Backends\n description: ' Specifies the list of backends Policy Controller\n will export to. Specifying an empty value `[]` disables metrics\n export.'\n x-dcl-server-default: true\n x-dcl-send-empty: true\n x-dcl-list-type: list\n items:\n type: string\n x-dcl-go-type: FeatureMembershipConfigmanagementPolicyControllerMonitoringBackendsEnum\n enum:\n - MONITORING_BACKEND_UNSPECIFIED\n - PROMETHEUS\n - CLOUD_MONITORING\n mutationEnabled:\n type: boolean\n x-dcl-go-name: MutationEnabled\n description: Enable or disable mutation in policy controller. If\n true, mutation CRDs, webhook and controller deployment will be\n deployed to the cluster.\n referentialRulesEnabled:\n type: boolean\n x-dcl-go-name: ReferentialRulesEnabled\n description: Enables the ability to use Constraint Templates that\n reference to objects other than the object currently being evaluated.\n templateLibraryInstalled:\n type: boolean\n x-dcl-go-name: TemplateLibraryInstalled\n description: Installs the default template library along with Policy\n Controller.\n version:\n type: string\n x-dcl-go-name: Version\n description: Optional. Version of ACM to install. Defaults to the latest\n version.\n x-dcl-server-default: true\n feature:\n type: string\n x-dcl-go-name: Feature\n description: The name of the feature\n x-kubernetes-immutable: true\n x-dcl-references:\n - resource: Gkehub/Feature\n field: name\n parent: true\n x-dcl-parameter: true\n location:\n type: string\n x-dcl-go-name: Location\n description: The location of the feature\n x-kubernetes-immutable: true\n x-dcl-parameter: true\n membership:\n type: string\n x-dcl-go-name: Membership\n description: The name of the membership\n x-kubernetes-immutable: true\n x-dcl-references:\n - resource: Gkehub/Membership\n field: name\n x-dcl-parameter: true\n membershipLocation:\n type: string\n x-dcl-go-name: MembershipLocation\n description: The location of the membership\n x-kubernetes-immutable: true\n x-dcl-parameter: true\n mesh:\n type: object\n x-dcl-go-name: Mesh\n x-dcl-go-type: FeatureMembershipMesh\n description: Manage Mesh Features\n properties:\n controlPlane:\n type: string\n x-dcl-go-name: ControlPlane\n x-dcl-go-type: FeatureMembershipMeshControlPlaneEnum\n description: '**DEPRECATED** Whether to automatically manage Service\n Mesh control planes. Possible values: CONTROL_PLANE_MANAGEMENT_UNSPECIFIED,\n AUTOMATIC, MANUAL'\n enum:\n - CONTROL_PLANE_MANAGEMENT_UNSPECIFIED\n - AUTOMATIC\n - MANUAL\n management:\n type: string\n x-dcl-go-name: Management\n x-dcl-go-type: FeatureMembershipMeshManagementEnum\n description: 'Whether to automatically manage Service Mesh. Possible\n values: MANAGEMENT_UNSPECIFIED, MANAGEMENT_AUTOMATIC, MANAGEMENT_MANUAL'\n enum:\n - MANAGEMENT_UNSPECIFIED\n - MANAGEMENT_AUTOMATIC\n - MANAGEMENT_MANUAL\n policycontroller:\n type: object\n x-dcl-go-name: Policycontroller\n x-dcl-go-type: FeatureMembershipPolicycontroller\n description: Policy Controller-specific spec.\n required:\n - policyControllerHubConfig\n properties:\n policyControllerHubConfig:\n type: object\n x-dcl-go-name: PolicyControllerHubConfig\n x-dcl-go-type: FeatureMembershipPolicycontrollerPolicyControllerHubConfig\n description: Policy Controller configuration for the cluster.\n properties:\n auditIntervalSeconds:\n type: integer\n format: int64\n x-dcl-go-name: AuditIntervalSeconds\n description: Sets the interval for Policy Controller Audit Scans\n (in seconds). When set to 0, this disables audit functionality\n altogether.\n constraintViolationLimit:\n type: integer\n format: int64\n x-dcl-go-name: ConstraintViolationLimit\n description: The maximum number of audit violations to be stored\n in a constraint. If not set, the internal default of 20 will be\n used.\n deploymentConfigs:\n type: object\n additionalProperties:\n type: object\n x-dcl-go-type: FeatureMembershipPolicycontrollerPolicyControllerHubConfigDeploymentConfigs\n properties:\n containerResources:\n type: object\n x-dcl-go-name: ContainerResources\n x-dcl-go-type: FeatureMembershipPolicycontrollerPolicyControllerHubConfigDeploymentConfigsContainerResources\n description: Container resource requirements.\n x-dcl-conflicts:\n - replicaCount\n - podAffinity\n - podTolerations\n properties:\n limits:\n type: object\n x-dcl-go-name: Limits\n x-dcl-go-type: FeatureMembershipPolicycontrollerPolicyControllerHubConfigDeploymentConfigsContainerResourcesLimits\n description: Limits describes the maximum amount of compute\n resources allowed for use by the running container.\n properties:\n cpu:\n type: string\n x-dcl-go-name: Cpu\n description: CPU requirement expressed in Kubernetes\n resource units.\n memory:\n type: string\n x-dcl-go-name: Memory\n description: Memory requirement expressed in Kubernetes\n resource units.\n requests:\n type: object\n x-dcl-go-name: Requests\n x-dcl-go-type: FeatureMembershipPolicycontrollerPolicyControllerHubConfigDeploymentConfigsContainerResourcesRequests\n description: Requests describes the amount of compute\n resources reserved for the container by the kube-scheduler.\n properties:\n cpu:\n type: string\n x-dcl-go-name: Cpu\n description: CPU requirement expressed in Kubernetes\n resource units.\n memory:\n type: string\n x-dcl-go-name: Memory\n description: Memory requirement expressed in Kubernetes\n resource units.\n podAffinity:\n type: string\n x-dcl-go-name: PodAffinity\n x-dcl-go-type: FeatureMembershipPolicycontrollerPolicyControllerHubConfigDeploymentConfigsPodAffinityEnum\n description: 'Pod affinity configuration. Possible values:\n AFFINITY_UNSPECIFIED, NO_AFFINITY, ANTI_AFFINITY'\n x-dcl-conflicts:\n - replicaCount\n - containerResources\n - podTolerations\n enum:\n - AFFINITY_UNSPECIFIED\n - NO_AFFINITY\n - ANTI_AFFINITY\n podTolerations:\n type: array\n x-dcl-go-name: PodTolerations\n description: Pod tolerations of node taints.\n x-dcl-conflicts:\n - replicaCount\n - containerResources\n - podAffinity\n x-dcl-send-empty: true\n x-dcl-list-type: list\n items:\n type: object\n x-dcl-go-type: FeatureMembershipPolicycontrollerPolicyControllerHubConfigDeploymentConfigsPodTolerations\n properties:\n effect:\n type: string\n x-dcl-go-name: Effect\n description: Matches a taint effect.\n key:\n type: string\n x-dcl-go-name: Key\n description: Matches a taint key (not necessarily unique).\n operator:\n type: string\n x-dcl-go-name: Operator\n description: Matches a taint operator.\n value:\n type: string\n x-dcl-go-name: Value\n description: Matches a taint value.\n replicaCount:\n type: integer\n format: int64\n x-dcl-go-name: ReplicaCount\n description: Pod replica count.\n x-dcl-conflicts:\n - containerResources\n - podAffinity\n - podTolerations\n x-dcl-go-name: DeploymentConfigs\n description: Map of deployment configs to deployments (\"admission\",\n \"audit\", \"mutation\").\n x-dcl-server-default: true\n exemptableNamespaces:\n type: array\n x-dcl-go-name: ExemptableNamespaces\n description: The set of namespaces that are excluded from Policy\n Controller checks. Namespaces do not need to currently exist on\n the cluster.\n x-dcl-send-empty: true\n x-dcl-list-type: list\n items:\n type: string\n x-dcl-go-type: string\n installSpec:\n type: string\n x-dcl-go-name: InstallSpec\n x-dcl-go-type: FeatureMembershipPolicycontrollerPolicyControllerHubConfigInstallSpecEnum\n description: 'Configures the mode of the Policy Controller installation.\n Possible values: INSTALL_SPEC_UNSPECIFIED, INSTALL_SPEC_NOT_INSTALLED,\n INSTALL_SPEC_ENABLED, INSTALL_SPEC_SUSPENDED, INSTALL_SPEC_DETACHED'\n enum:\n - INSTALL_SPEC_UNSPECIFIED\n - INSTALL_SPEC_NOT_INSTALLED\n - INSTALL_SPEC_ENABLED\n - INSTALL_SPEC_SUSPENDED\n - INSTALL_SPEC_DETACHED\n logDeniesEnabled:\n type: boolean\n x-dcl-go-name: LogDeniesEnabled\n description: Logs all denies and dry run failures.\n monitoring:\n type: object\n x-dcl-go-name: Monitoring\n x-dcl-go-type: FeatureMembershipPolicycontrollerPolicyControllerHubConfigMonitoring\n description: 'Specifies the backends Policy Controller should export\n metrics to. For example, to specify metrics should be exported\n to Cloud Monitoring and Prometheus, specify backends: [\"cloudmonitoring\",\n \"prometheus\"]. Default: [\"cloudmonitoring\", \"prometheus\"]'\n x-dcl-server-default: true\n properties:\n backends:\n type: array\n x-dcl-go-name: Backends\n description: ' Specifies the list of backends Policy Controller\n will export to. Specifying an empty value `[]` disables metrics\n export.'\n x-dcl-server-default: true\n x-dcl-send-empty: true\n x-dcl-list-type: list\n items:\n type: string\n x-dcl-go-type: FeatureMembershipPolicycontrollerPolicyControllerHubConfigMonitoringBackendsEnum\n enum:\n - MONITORING_BACKEND_UNSPECIFIED\n - PROMETHEUS\n - CLOUD_MONITORING\n mutationEnabled:\n type: boolean\n x-dcl-go-name: MutationEnabled\n description: Enables the ability to mutate resources using Policy\n Controller.\n policyContent:\n type: object\n x-dcl-go-name: PolicyContent\n x-dcl-go-type: FeatureMembershipPolicycontrollerPolicyControllerHubConfigPolicyContent\n description: Specifies the desired policy content on the cluster.\n x-dcl-server-default: true\n properties:\n bundles:\n type: object\n additionalProperties:\n type: object\n x-dcl-go-type: FeatureMembershipPolicycontrollerPolicyControllerHubConfigPolicyContentBundles\n properties:\n exemptedNamespaces:\n type: array\n x-dcl-go-name: ExemptedNamespaces\n description: The set of namespaces to be exempted from\n the bundle.\n x-dcl-send-empty: true\n x-dcl-list-type: list\n items:\n type: string\n x-dcl-go-type: string\n x-dcl-go-name: Bundles\n description: map of bundle name to BundleInstallSpec. The bundle\n name maps to the `bundleName` key in the `policycontroller.gke.io/constraintData`\n annotation on a constraint.\n templateLibrary:\n type: object\n x-dcl-go-name: TemplateLibrary\n x-dcl-go-type: FeatureMembershipPolicycontrollerPolicyControllerHubConfigPolicyContentTemplateLibrary\n description: Configures the installation of the Template Library.\n x-dcl-server-default: true\n properties:\n installation:\n type: string\n x-dcl-go-name: Installation\n x-dcl-go-type: FeatureMembershipPolicycontrollerPolicyControllerHubConfigPolicyContentTemplateLibraryInstallationEnum\n description: 'Configures the manner in which the template\n library is installed on the cluster. Possible values:\n INSTALLATION_UNSPECIFIED, NOT_INSTALLED, ALL'\n enum:\n - INSTALLATION_UNSPECIFIED\n - NOT_INSTALLED\n - ALL\n referentialRulesEnabled:\n type: boolean\n x-dcl-go-name: ReferentialRulesEnabled\n description: Enables the ability to use Constraint Templates that\n reference to objects other than the object currently being evaluated.\n version:\n type: string\n x-dcl-go-name: Version\n description: Optional. Version of Policy Controller to install. Defaults\n to the latest version.\n x-dcl-server-default: true\n project:\n type: string\n x-dcl-go-name: Project\n description: The project of the feature\n x-kubernetes-immutable: true\n x-dcl-references:\n - resource: Cloudresourcemanager/Project\n field: name\n parent: true\n x-dcl-parameter: true\n") -// 30994 bytes -// MD5: d83aee28a9edabe5c818830349b37cc5 +// 31227 bytes +// MD5: 86d6d5a05846805028382e6593dcc33f diff --git a/services/google/gkehub/beta/feature_membership_internal.go b/services/google/gkehub/beta/feature_membership_internal.go index c46352c55..3452127a7 100755 --- a/services/google/gkehub/beta/feature_membership_internal.go +++ b/services/google/gkehub/beta/feature_membership_internal.go @@ -738,6 +738,11 @@ func canonicalizeFeatureMembershipConfigmanagementConfigSync(des, initial *Featu } else { cDes.Enabled = des.Enabled } + if dcl.BoolCanonicalize(des.StopSyncing, initial.StopSyncing) || dcl.IsZeroValue(des.StopSyncing) { + cDes.StopSyncing = initial.StopSyncing + } else { + cDes.StopSyncing = des.StopSyncing + } if dcl.BoolCanonicalize(des.PreventDrift, initial.PreventDrift) || dcl.IsZeroValue(des.PreventDrift) { cDes.PreventDrift = initial.PreventDrift } else { @@ -803,6 +808,9 @@ func canonicalizeNewFeatureMembershipConfigmanagementConfigSync(c *Client, des, if dcl.BoolCanonicalize(des.Enabled, nw.Enabled) { nw.Enabled = des.Enabled } + if dcl.BoolCanonicalize(des.StopSyncing, nw.StopSyncing) { + nw.StopSyncing = des.StopSyncing + } if dcl.BoolCanonicalize(des.PreventDrift, nw.PreventDrift) { nw.PreventDrift = des.PreventDrift } @@ -3362,6 +3370,13 @@ func compareFeatureMembershipConfigmanagementConfigSyncNewStyle(d, a interface{} diffs = append(diffs, ds...) } + if ds, err := dcl.Diff(desired.StopSyncing, actual.StopSyncing, dcl.DiffInfo{OperationSelector: dcl.RequiresRecreate()}, fn.AddNest("StopSyncing")); len(ds) != 0 || err != nil { + if err != nil { + return nil, err + } + diffs = append(diffs, ds...) + } + if ds, err := dcl.Diff(desired.PreventDrift, actual.PreventDrift, dcl.DiffInfo{ServerDefault: true, OperationSelector: dcl.RequiresRecreate()}, fn.AddNest("PreventDrift")); len(ds) != 0 || err != nil { if err != nil { return nil, err @@ -4649,6 +4664,9 @@ func expandFeatureMembershipConfigmanagementConfigSync(c *Client, f *FeatureMemb if v := f.Enabled; !dcl.IsEmptyValueIndirect(v) { m["enabled"] = v } + if v := f.StopSyncing; !dcl.IsEmptyValueIndirect(v) { + m["stopSyncing"] = v + } if v := f.PreventDrift; !dcl.IsEmptyValueIndirect(v) { m["preventDrift"] = v } @@ -4680,6 +4698,7 @@ func flattenFeatureMembershipConfigmanagementConfigSync(c *Client, i interface{} r.Git = flattenFeatureMembershipConfigmanagementConfigSyncGit(c, m["git"], res) r.SourceFormat = dcl.FlattenString(m["sourceFormat"]) r.Enabled = dcl.FlattenBool(m["enabled"]) + r.StopSyncing = dcl.FlattenBool(m["stopSyncing"]) r.PreventDrift = dcl.FlattenBool(m["preventDrift"]) r.MetricsGcpServiceAccountEmail = dcl.FlattenString(m["metricsGcpServiceAccountEmail"]) r.Oci = flattenFeatureMembershipConfigmanagementConfigSyncOci(c, m["oci"], res) diff --git a/services/google/gkehub/beta/feature_membership_schema.go b/services/google/gkehub/beta/feature_membership_schema.go index 4674208b3..6d17c6808 100755 --- a/services/google/gkehub/beta/feature_membership_schema.go +++ b/services/google/gkehub/beta/feature_membership_schema.go @@ -272,6 +272,11 @@ func DCLFeatureMembershipSchema() *dcl.Schema { GoName: "SourceFormat", Description: "Specifies whether the Config Sync Repo is in \"hierarchical\" or \"unstructured\" mode.", }, + "stopSyncing": &dcl.Property{ + Type: "boolean", + GoName: "StopSyncing", + Description: "Set to true to stop syncing configs for a single cluster. Default: false.", + }, }, }, "hierarchyController": &dcl.Property{ diff --git a/services/google/gkehub/feature_membership.go b/services/google/gkehub/feature_membership.go index f6bd091b0..fac1ac99a 100755 --- a/services/google/gkehub/feature_membership.go +++ b/services/google/gkehub/feature_membership.go @@ -369,6 +369,7 @@ type FeatureMembershipConfigmanagementConfigSync struct { Git *FeatureMembershipConfigmanagementConfigSyncGit `json:"git"` SourceFormat *string `json:"sourceFormat"` Enabled *bool `json:"enabled"` + StopSyncing *bool `json:"stopSyncing"` PreventDrift *bool `json:"preventDrift"` MetricsGcpServiceAccountEmail *string `json:"metricsGcpServiceAccountEmail"` Oci *FeatureMembershipConfigmanagementConfigSyncOci `json:"oci"` @@ -395,6 +396,8 @@ func (r *FeatureMembershipConfigmanagementConfigSync) UnmarshalJSON(data []byte) r.Enabled = res.Enabled + r.StopSyncing = res.StopSyncing + r.PreventDrift = res.PreventDrift r.MetricsGcpServiceAccountEmail = res.MetricsGcpServiceAccountEmail diff --git a/services/google/gkehub/feature_membership.yaml b/services/google/gkehub/feature_membership.yaml index 7a1afddf6..57653e205 100755 --- a/services/google/gkehub/feature_membership.yaml +++ b/services/google/gkehub/feature_membership.yaml @@ -225,6 +225,11 @@ components: x-dcl-go-name: SourceFormat description: Specifies whether the Config Sync Repo is in "hierarchical" or "unstructured" mode. + stopSyncing: + type: boolean + x-dcl-go-name: StopSyncing + description: 'Set to true to stop syncing configs for a single cluster. + Default: false.' hierarchyController: type: object x-dcl-go-name: HierarchyController diff --git a/services/google/gkehub/feature_membership_internal.go b/services/google/gkehub/feature_membership_internal.go index bb4c98986..37536bda8 100755 --- a/services/google/gkehub/feature_membership_internal.go +++ b/services/google/gkehub/feature_membership_internal.go @@ -738,6 +738,11 @@ func canonicalizeFeatureMembershipConfigmanagementConfigSync(des, initial *Featu } else { cDes.Enabled = des.Enabled } + if dcl.BoolCanonicalize(des.StopSyncing, initial.StopSyncing) || dcl.IsZeroValue(des.StopSyncing) { + cDes.StopSyncing = initial.StopSyncing + } else { + cDes.StopSyncing = des.StopSyncing + } if dcl.BoolCanonicalize(des.PreventDrift, initial.PreventDrift) || dcl.IsZeroValue(des.PreventDrift) { cDes.PreventDrift = initial.PreventDrift } else { @@ -803,6 +808,9 @@ func canonicalizeNewFeatureMembershipConfigmanagementConfigSync(c *Client, des, if dcl.BoolCanonicalize(des.Enabled, nw.Enabled) { nw.Enabled = des.Enabled } + if dcl.BoolCanonicalize(des.StopSyncing, nw.StopSyncing) { + nw.StopSyncing = des.StopSyncing + } if dcl.BoolCanonicalize(des.PreventDrift, nw.PreventDrift) { nw.PreventDrift = des.PreventDrift } @@ -3362,6 +3370,13 @@ func compareFeatureMembershipConfigmanagementConfigSyncNewStyle(d, a interface{} diffs = append(diffs, ds...) } + if ds, err := dcl.Diff(desired.StopSyncing, actual.StopSyncing, dcl.DiffInfo{OperationSelector: dcl.RequiresRecreate()}, fn.AddNest("StopSyncing")); len(ds) != 0 || err != nil { + if err != nil { + return nil, err + } + diffs = append(diffs, ds...) + } + if ds, err := dcl.Diff(desired.PreventDrift, actual.PreventDrift, dcl.DiffInfo{ServerDefault: true, OperationSelector: dcl.RequiresRecreate()}, fn.AddNest("PreventDrift")); len(ds) != 0 || err != nil { if err != nil { return nil, err @@ -4649,6 +4664,9 @@ func expandFeatureMembershipConfigmanagementConfigSync(c *Client, f *FeatureMemb if v := f.Enabled; !dcl.IsEmptyValueIndirect(v) { m["enabled"] = v } + if v := f.StopSyncing; !dcl.IsEmptyValueIndirect(v) { + m["stopSyncing"] = v + } if v := f.PreventDrift; !dcl.IsEmptyValueIndirect(v) { m["preventDrift"] = v } @@ -4680,6 +4698,7 @@ func flattenFeatureMembershipConfigmanagementConfigSync(c *Client, i interface{} r.Git = flattenFeatureMembershipConfigmanagementConfigSyncGit(c, m["git"], res) r.SourceFormat = dcl.FlattenString(m["sourceFormat"]) r.Enabled = dcl.FlattenBool(m["enabled"]) + r.StopSyncing = dcl.FlattenBool(m["stopSyncing"]) r.PreventDrift = dcl.FlattenBool(m["preventDrift"]) r.MetricsGcpServiceAccountEmail = dcl.FlattenString(m["metricsGcpServiceAccountEmail"]) r.Oci = flattenFeatureMembershipConfigmanagementConfigSyncOci(c, m["oci"], res) diff --git a/services/google/gkehub/feature_membership_schema.go b/services/google/gkehub/feature_membership_schema.go index 8500ffcc0..d99c204a5 100755 --- a/services/google/gkehub/feature_membership_schema.go +++ b/services/google/gkehub/feature_membership_schema.go @@ -272,6 +272,11 @@ func DCLFeatureMembershipSchema() *dcl.Schema { GoName: "SourceFormat", Description: "Specifies whether the Config Sync Repo is in \"hierarchical\" or \"unstructured\" mode.", }, + "stopSyncing": &dcl.Property{ + Type: "boolean", + GoName: "StopSyncing", + Description: "Set to true to stop syncing configs for a single cluster. Default: false.", + }, }, }, "hierarchyController": &dcl.Property{ diff --git a/services/google/gkehub/feature_membership_yaml_embed.go b/services/google/gkehub/feature_membership_yaml_embed.go index 7d264b752..f0e00103b 100755 --- a/services/google/gkehub/feature_membership_yaml_embed.go +++ b/services/google/gkehub/feature_membership_yaml_embed.go @@ -17,7 +17,7 @@ package gkehub // blaze-out/k8-fastbuild/genfiles/cloud/graphite/mmv2/services/google/gkehub/feature_membership.yaml -var YAML_feature_membership = []byte("info:\n title: GkeHub/FeatureMembership\n description: The GkeHub FeatureMembership resource\n x-dcl-struct-name: FeatureMembership\n x-dcl-has-iam: false\n x-dcl-mutex: '{{project}}/{{location}}/{{feature}}'\npaths:\n get:\n description: The function used to get information about a FeatureMembership\n parameters:\n - name: featureMembership\n required: true\n description: A full instance of a FeatureMembership\n apply:\n description: The function used to apply information about a FeatureMembership\n parameters:\n - name: featureMembership\n required: true\n description: A full instance of a FeatureMembership\n delete:\n description: The function used to delete a FeatureMembership\n parameters:\n - name: featureMembership\n required: true\n description: A full instance of a FeatureMembership\n deleteAll:\n description: The function used to delete all FeatureMembership\n parameters:\n - name: project\n required: true\n schema:\n type: string\n - name: location\n required: true\n schema:\n type: string\n - name: feature\n required: true\n schema:\n type: string\n list:\n description: The function used to list information about many FeatureMembership\n parameters:\n - name: project\n required: true\n schema:\n type: string\n - name: location\n required: true\n schema:\n type: string\n - name: feature\n required: true\n schema:\n type: string\ncomponents:\n schemas:\n FeatureMembership:\n title: FeatureMembership\n x-dcl-id: projects/{{project}}/locations/{{location}}/features/{{feature}}/memberships/{{membership}}\n x-dcl-parent-container: project\n x-dcl-has-create: true\n x-dcl-has-iam: false\n x-dcl-read-timeout: 0\n x-dcl-apply-timeout: 0\n x-dcl-delete-timeout: 0\n type: object\n required:\n - project\n - location\n - feature\n - membership\n properties:\n configmanagement:\n type: object\n x-dcl-go-name: Configmanagement\n x-dcl-go-type: FeatureMembershipConfigmanagement\n description: Config Management-specific spec.\n properties:\n binauthz:\n type: object\n x-dcl-go-name: Binauthz\n x-dcl-go-type: FeatureMembershipConfigmanagementBinauthz\n description: '**DEPRECATED** Binauthz configuration for the cluster.\n This field will be ignored and should not be set.'\n x-dcl-server-default: true\n properties:\n enabled:\n type: boolean\n x-dcl-go-name: Enabled\n description: Whether binauthz is enabled in this cluster.\n x-dcl-parameter: true\n configSync:\n type: object\n x-dcl-go-name: ConfigSync\n x-dcl-go-type: FeatureMembershipConfigmanagementConfigSync\n description: Config Sync configuration for the cluster.\n x-dcl-send-empty: true\n properties:\n enabled:\n type: boolean\n x-dcl-go-name: Enabled\n description: Enables the installation of ConfigSync. If set to true,\n ConfigSync resources will be created and the other ConfigSync\n fields will be applied if exist. If set to false, all other ConfigSync\n fields will be ignored, ConfigSync resources will be deleted.\n If omitted, ConfigSync resources will be managed depends on the\n presence of the git or oci field.\n git:\n type: object\n x-dcl-go-name: Git\n x-dcl-go-type: FeatureMembershipConfigmanagementConfigSyncGit\n properties:\n gcpServiceAccountEmail:\n type: string\n x-dcl-go-name: GcpServiceAccountEmail\n description: The GCP Service Account Email used for auth when\n secretType is gcpServiceAccount.\n x-dcl-references:\n - resource: Iam/ServiceAccount\n field: email\n httpsProxy:\n type: string\n x-dcl-go-name: HttpsProxy\n description: URL for the HTTPS proxy to be used when communicating\n with the Git repo.\n policyDir:\n type: string\n x-dcl-go-name: PolicyDir\n description: 'The path within the Git repository that represents\n the top level of the repo to sync. Default: the root directory\n of the repository.'\n secretType:\n type: string\n x-dcl-go-name: SecretType\n description: Type of secret configured for access to the Git\n repo. Must be one of ssh, cookiefile, gcenode, token, gcpserviceaccount\n or none. The validation of this is case-sensitive.\n syncBranch:\n type: string\n x-dcl-go-name: SyncBranch\n description: 'The branch of the repository to sync from. Default:\n master.'\n syncRepo:\n type: string\n x-dcl-go-name: SyncRepo\n description: The URL of the Git repository to use as the source\n of truth.\n syncRev:\n type: string\n x-dcl-go-name: SyncRev\n description: Git revision (tag or hash) to check out. Default\n HEAD.\n syncWaitSecs:\n type: string\n x-dcl-go-name: SyncWaitSecs\n description: 'Period in seconds between consecutive syncs. Default:\n 15.'\n metricsGcpServiceAccountEmail:\n type: string\n x-dcl-go-name: MetricsGcpServiceAccountEmail\n description: 'Deprecated: If Workload Identity Federation for GKE\n is enabled, Google Cloud Service Account is no longer needed for\n exporting Config Sync metrics: https://cloud.google.com/kubernetes-engine/enterprise/config-sync/docs/how-to/monitor-config-sync-cloud-monitoring#custom-monitoring.'\n x-dcl-references:\n - resource: Iam/ServiceAccount\n field: email\n x-dcl-deprecated: true\n oci:\n type: object\n x-dcl-go-name: Oci\n x-dcl-go-type: FeatureMembershipConfigmanagementConfigSyncOci\n properties:\n gcpServiceAccountEmail:\n type: string\n x-dcl-go-name: GcpServiceAccountEmail\n description: 'The GCP Service Account Email used for auth when\n secret_type is gcpserviceaccount. '\n x-dcl-references:\n - resource: Iam/ServiceAccount\n field: email\n policyDir:\n type: string\n x-dcl-go-name: PolicyDir\n description: 'The absolute path of the directory that contains\n the local resources. Default: the root directory of the image.'\n secretType:\n type: string\n x-dcl-go-name: SecretType\n description: Type of secret configured for access to the OCI\n Image. Must be one of gcenode, gcpserviceaccount or none.\n The validation of this is case-sensitive.\n syncRepo:\n type: string\n x-dcl-go-name: SyncRepo\n description: The OCI image repository URL for the package to\n sync from. e.g. LOCATION-docker.pkg.dev/PROJECT_ID/REPOSITORY_NAME/PACKAGE_NAME.\n syncWaitSecs:\n type: string\n x-dcl-go-name: SyncWaitSecs\n description: 'Period in seconds(int64 format) between consecutive\n syncs. Default: 15.'\n preventDrift:\n type: boolean\n x-dcl-go-name: PreventDrift\n description: Set to true to enable the Config Sync admission webhook\n to prevent drifts. If set to `false`, disables the Config Sync\n admission webhook and does not prevent drifts.\n x-dcl-server-default: true\n sourceFormat:\n type: string\n x-dcl-go-name: SourceFormat\n description: Specifies whether the Config Sync Repo is in \"hierarchical\"\n or \"unstructured\" mode.\n hierarchyController:\n type: object\n x-dcl-go-name: HierarchyController\n x-dcl-go-type: FeatureMembershipConfigmanagementHierarchyController\n description: Hierarchy Controller configuration for the cluster.\n x-dcl-send-empty: true\n properties:\n enableHierarchicalResourceQuota:\n type: boolean\n x-dcl-go-name: EnableHierarchicalResourceQuota\n description: Whether hierarchical resource quota is enabled in this\n cluster.\n x-dcl-send-empty: true\n enablePodTreeLabels:\n type: boolean\n x-dcl-go-name: EnablePodTreeLabels\n description: Whether pod tree labels are enabled in this cluster.\n x-dcl-send-empty: true\n enabled:\n type: boolean\n x-dcl-go-name: Enabled\n description: '**DEPRECATED** Configuring Hierarchy Controller through\n the configmanagement feature is no longer recommended. Use https://github.com/kubernetes-sigs/hierarchical-namespaces\n instead.'\n x-dcl-send-empty: true\n management:\n type: string\n x-dcl-go-name: Management\n x-dcl-go-type: FeatureMembershipConfigmanagementManagementEnum\n description: Set this field to MANAGEMENT_AUTOMATIC to enable Config\n Sync auto-upgrades, and set this field to MANAGEMENT_MANUAL or MANAGEMENT_UNSPECIFIED\n to disable Config Sync auto-upgrades.\n x-dcl-server-default: true\n enum:\n - MANAGEMENT_UNSPECIFIED\n - MANAGEMENT_AUTOMATIC\n - MANAGEMENT_MANUAL\n policyController:\n type: object\n x-dcl-go-name: PolicyController\n x-dcl-go-type: FeatureMembershipConfigmanagementPolicyController\n description: '**DEPRECATED** Configuring Policy Controller through the\n configmanagement feature is no longer recommended. Use the policycontroller\n feature instead.'\n properties:\n auditIntervalSeconds:\n type: string\n x-dcl-go-name: AuditIntervalSeconds\n description: Sets the interval for Policy Controller Audit Scans\n (in seconds). When set to 0, this disables audit functionality\n altogether.\n enabled:\n type: boolean\n x-dcl-go-name: Enabled\n description: Enables the installation of Policy Controller. If false,\n the rest of PolicyController fields take no effect.\n exemptableNamespaces:\n type: array\n x-dcl-go-name: ExemptableNamespaces\n description: The set of namespaces that are excluded from Policy\n Controller checks. Namespaces do not need to currently exist on\n the cluster.\n x-dcl-send-empty: true\n x-dcl-list-type: list\n items:\n type: string\n x-dcl-go-type: string\n logDeniesEnabled:\n type: boolean\n x-dcl-go-name: LogDeniesEnabled\n description: Logs all denies and dry run failures.\n monitoring:\n type: object\n x-dcl-go-name: Monitoring\n x-dcl-go-type: FeatureMembershipConfigmanagementPolicyControllerMonitoring\n description: 'Specifies the backends Policy Controller should export\n metrics to. For example, to specify metrics should be exported\n to Cloud Monitoring and Prometheus, specify backends: [\"cloudmonitoring\",\n \"prometheus\"]. Default: [\"cloudmonitoring\", \"prometheus\"]'\n x-dcl-server-default: true\n properties:\n backends:\n type: array\n x-dcl-go-name: Backends\n description: ' Specifies the list of backends Policy Controller\n will export to. Specifying an empty value `[]` disables metrics\n export.'\n x-dcl-server-default: true\n x-dcl-send-empty: true\n x-dcl-list-type: list\n items:\n type: string\n x-dcl-go-type: FeatureMembershipConfigmanagementPolicyControllerMonitoringBackendsEnum\n enum:\n - MONITORING_BACKEND_UNSPECIFIED\n - PROMETHEUS\n - CLOUD_MONITORING\n mutationEnabled:\n type: boolean\n x-dcl-go-name: MutationEnabled\n description: Enable or disable mutation in policy controller. If\n true, mutation CRDs, webhook and controller deployment will be\n deployed to the cluster.\n referentialRulesEnabled:\n type: boolean\n x-dcl-go-name: ReferentialRulesEnabled\n description: Enables the ability to use Constraint Templates that\n reference to objects other than the object currently being evaluated.\n templateLibraryInstalled:\n type: boolean\n x-dcl-go-name: TemplateLibraryInstalled\n description: Installs the default template library along with Policy\n Controller.\n version:\n type: string\n x-dcl-go-name: Version\n description: Optional. Version of ACM to install. Defaults to the latest\n version.\n x-dcl-server-default: true\n feature:\n type: string\n x-dcl-go-name: Feature\n description: The name of the feature\n x-kubernetes-immutable: true\n x-dcl-references:\n - resource: Gkehub/Feature\n field: name\n parent: true\n x-dcl-parameter: true\n location:\n type: string\n x-dcl-go-name: Location\n description: The location of the feature\n x-kubernetes-immutable: true\n x-dcl-parameter: true\n membership:\n type: string\n x-dcl-go-name: Membership\n description: The name of the membership\n x-kubernetes-immutable: true\n x-dcl-references:\n - resource: Gkehub/Membership\n field: name\n x-dcl-parameter: true\n membershipLocation:\n type: string\n x-dcl-go-name: MembershipLocation\n description: The location of the membership\n x-kubernetes-immutable: true\n x-dcl-parameter: true\n mesh:\n type: object\n x-dcl-go-name: Mesh\n x-dcl-go-type: FeatureMembershipMesh\n description: Manage Mesh Features\n properties:\n controlPlane:\n type: string\n x-dcl-go-name: ControlPlane\n x-dcl-go-type: FeatureMembershipMeshControlPlaneEnum\n description: '**DEPRECATED** Whether to automatically manage Service\n Mesh control planes. Possible values: CONTROL_PLANE_MANAGEMENT_UNSPECIFIED,\n AUTOMATIC, MANUAL'\n enum:\n - CONTROL_PLANE_MANAGEMENT_UNSPECIFIED\n - AUTOMATIC\n - MANUAL\n management:\n type: string\n x-dcl-go-name: Management\n x-dcl-go-type: FeatureMembershipMeshManagementEnum\n description: 'Whether to automatically manage Service Mesh. Possible\n values: MANAGEMENT_UNSPECIFIED, MANAGEMENT_AUTOMATIC, MANAGEMENT_MANUAL'\n enum:\n - MANAGEMENT_UNSPECIFIED\n - MANAGEMENT_AUTOMATIC\n - MANAGEMENT_MANUAL\n policycontroller:\n type: object\n x-dcl-go-name: Policycontroller\n x-dcl-go-type: FeatureMembershipPolicycontroller\n description: Policy Controller-specific spec.\n required:\n - policyControllerHubConfig\n properties:\n policyControllerHubConfig:\n type: object\n x-dcl-go-name: PolicyControllerHubConfig\n x-dcl-go-type: FeatureMembershipPolicycontrollerPolicyControllerHubConfig\n description: Policy Controller configuration for the cluster.\n properties:\n auditIntervalSeconds:\n type: integer\n format: int64\n x-dcl-go-name: AuditIntervalSeconds\n description: Sets the interval for Policy Controller Audit Scans\n (in seconds). When set to 0, this disables audit functionality\n altogether.\n constraintViolationLimit:\n type: integer\n format: int64\n x-dcl-go-name: ConstraintViolationLimit\n description: The maximum number of audit violations to be stored\n in a constraint. If not set, the internal default of 20 will be\n used.\n deploymentConfigs:\n type: object\n additionalProperties:\n type: object\n x-dcl-go-type: FeatureMembershipPolicycontrollerPolicyControllerHubConfigDeploymentConfigs\n properties:\n containerResources:\n type: object\n x-dcl-go-name: ContainerResources\n x-dcl-go-type: FeatureMembershipPolicycontrollerPolicyControllerHubConfigDeploymentConfigsContainerResources\n description: Container resource requirements.\n x-dcl-conflicts:\n - replicaCount\n - podAffinity\n - podTolerations\n properties:\n limits:\n type: object\n x-dcl-go-name: Limits\n x-dcl-go-type: FeatureMembershipPolicycontrollerPolicyControllerHubConfigDeploymentConfigsContainerResourcesLimits\n description: Limits describes the maximum amount of compute\n resources allowed for use by the running container.\n properties:\n cpu:\n type: string\n x-dcl-go-name: Cpu\n description: CPU requirement expressed in Kubernetes\n resource units.\n memory:\n type: string\n x-dcl-go-name: Memory\n description: Memory requirement expressed in Kubernetes\n resource units.\n requests:\n type: object\n x-dcl-go-name: Requests\n x-dcl-go-type: FeatureMembershipPolicycontrollerPolicyControllerHubConfigDeploymentConfigsContainerResourcesRequests\n description: Requests describes the amount of compute\n resources reserved for the container by the kube-scheduler.\n properties:\n cpu:\n type: string\n x-dcl-go-name: Cpu\n description: CPU requirement expressed in Kubernetes\n resource units.\n memory:\n type: string\n x-dcl-go-name: Memory\n description: Memory requirement expressed in Kubernetes\n resource units.\n podAffinity:\n type: string\n x-dcl-go-name: PodAffinity\n x-dcl-go-type: FeatureMembershipPolicycontrollerPolicyControllerHubConfigDeploymentConfigsPodAffinityEnum\n description: 'Pod affinity configuration. Possible values:\n AFFINITY_UNSPECIFIED, NO_AFFINITY, ANTI_AFFINITY'\n x-dcl-conflicts:\n - replicaCount\n - containerResources\n - podTolerations\n enum:\n - AFFINITY_UNSPECIFIED\n - NO_AFFINITY\n - ANTI_AFFINITY\n podTolerations:\n type: array\n x-dcl-go-name: PodTolerations\n description: Pod tolerations of node taints.\n x-dcl-conflicts:\n - replicaCount\n - containerResources\n - podAffinity\n x-dcl-send-empty: true\n x-dcl-list-type: list\n items:\n type: object\n x-dcl-go-type: FeatureMembershipPolicycontrollerPolicyControllerHubConfigDeploymentConfigsPodTolerations\n properties:\n effect:\n type: string\n x-dcl-go-name: Effect\n description: Matches a taint effect.\n key:\n type: string\n x-dcl-go-name: Key\n description: Matches a taint key (not necessarily unique).\n operator:\n type: string\n x-dcl-go-name: Operator\n description: Matches a taint operator.\n value:\n type: string\n x-dcl-go-name: Value\n description: Matches a taint value.\n replicaCount:\n type: integer\n format: int64\n x-dcl-go-name: ReplicaCount\n description: Pod replica count.\n x-dcl-conflicts:\n - containerResources\n - podAffinity\n - podTolerations\n x-dcl-go-name: DeploymentConfigs\n description: Map of deployment configs to deployments (\"admission\",\n \"audit\", \"mutation\").\n x-dcl-server-default: true\n exemptableNamespaces:\n type: array\n x-dcl-go-name: ExemptableNamespaces\n description: The set of namespaces that are excluded from Policy\n Controller checks. Namespaces do not need to currently exist on\n the cluster.\n x-dcl-send-empty: true\n x-dcl-list-type: list\n items:\n type: string\n x-dcl-go-type: string\n installSpec:\n type: string\n x-dcl-go-name: InstallSpec\n x-dcl-go-type: FeatureMembershipPolicycontrollerPolicyControllerHubConfigInstallSpecEnum\n description: 'Configures the mode of the Policy Controller installation.\n Possible values: INSTALL_SPEC_UNSPECIFIED, INSTALL_SPEC_NOT_INSTALLED,\n INSTALL_SPEC_ENABLED, INSTALL_SPEC_SUSPENDED, INSTALL_SPEC_DETACHED'\n enum:\n - INSTALL_SPEC_UNSPECIFIED\n - INSTALL_SPEC_NOT_INSTALLED\n - INSTALL_SPEC_ENABLED\n - INSTALL_SPEC_SUSPENDED\n - INSTALL_SPEC_DETACHED\n logDeniesEnabled:\n type: boolean\n x-dcl-go-name: LogDeniesEnabled\n description: Logs all denies and dry run failures.\n monitoring:\n type: object\n x-dcl-go-name: Monitoring\n x-dcl-go-type: FeatureMembershipPolicycontrollerPolicyControllerHubConfigMonitoring\n description: 'Specifies the backends Policy Controller should export\n metrics to. For example, to specify metrics should be exported\n to Cloud Monitoring and Prometheus, specify backends: [\"cloudmonitoring\",\n \"prometheus\"]. Default: [\"cloudmonitoring\", \"prometheus\"]'\n x-dcl-server-default: true\n properties:\n backends:\n type: array\n x-dcl-go-name: Backends\n description: ' Specifies the list of backends Policy Controller\n will export to. Specifying an empty value `[]` disables metrics\n export.'\n x-dcl-server-default: true\n x-dcl-send-empty: true\n x-dcl-list-type: list\n items:\n type: string\n x-dcl-go-type: FeatureMembershipPolicycontrollerPolicyControllerHubConfigMonitoringBackendsEnum\n enum:\n - MONITORING_BACKEND_UNSPECIFIED\n - PROMETHEUS\n - CLOUD_MONITORING\n mutationEnabled:\n type: boolean\n x-dcl-go-name: MutationEnabled\n description: Enables the ability to mutate resources using Policy\n Controller.\n policyContent:\n type: object\n x-dcl-go-name: PolicyContent\n x-dcl-go-type: FeatureMembershipPolicycontrollerPolicyControllerHubConfigPolicyContent\n description: Specifies the desired policy content on the cluster.\n x-dcl-server-default: true\n properties:\n bundles:\n type: object\n additionalProperties:\n type: object\n x-dcl-go-type: FeatureMembershipPolicycontrollerPolicyControllerHubConfigPolicyContentBundles\n properties:\n exemptedNamespaces:\n type: array\n x-dcl-go-name: ExemptedNamespaces\n description: The set of namespaces to be exempted from\n the bundle.\n x-dcl-send-empty: true\n x-dcl-list-type: list\n items:\n type: string\n x-dcl-go-type: string\n x-dcl-go-name: Bundles\n description: map of bundle name to BundleInstallSpec. The bundle\n name maps to the `bundleName` key in the `policycontroller.gke.io/constraintData`\n annotation on a constraint.\n templateLibrary:\n type: object\n x-dcl-go-name: TemplateLibrary\n x-dcl-go-type: FeatureMembershipPolicycontrollerPolicyControllerHubConfigPolicyContentTemplateLibrary\n description: Configures the installation of the Template Library.\n x-dcl-server-default: true\n properties:\n installation:\n type: string\n x-dcl-go-name: Installation\n x-dcl-go-type: FeatureMembershipPolicycontrollerPolicyControllerHubConfigPolicyContentTemplateLibraryInstallationEnum\n description: 'Configures the manner in which the template\n library is installed on the cluster. Possible values:\n INSTALLATION_UNSPECIFIED, NOT_INSTALLED, ALL'\n enum:\n - INSTALLATION_UNSPECIFIED\n - NOT_INSTALLED\n - ALL\n referentialRulesEnabled:\n type: boolean\n x-dcl-go-name: ReferentialRulesEnabled\n description: Enables the ability to use Constraint Templates that\n reference to objects other than the object currently being evaluated.\n version:\n type: string\n x-dcl-go-name: Version\n description: Optional. Version of Policy Controller to install. Defaults\n to the latest version.\n x-dcl-server-default: true\n project:\n type: string\n x-dcl-go-name: Project\n description: The project of the feature\n x-kubernetes-immutable: true\n x-dcl-references:\n - resource: Cloudresourcemanager/Project\n field: name\n parent: true\n x-dcl-parameter: true\n") +var YAML_feature_membership = []byte("info:\n title: GkeHub/FeatureMembership\n description: The GkeHub FeatureMembership resource\n x-dcl-struct-name: FeatureMembership\n x-dcl-has-iam: false\n x-dcl-mutex: '{{project}}/{{location}}/{{feature}}'\npaths:\n get:\n description: The function used to get information about a FeatureMembership\n parameters:\n - name: featureMembership\n required: true\n description: A full instance of a FeatureMembership\n apply:\n description: The function used to apply information about a FeatureMembership\n parameters:\n - name: featureMembership\n required: true\n description: A full instance of a FeatureMembership\n delete:\n description: The function used to delete a FeatureMembership\n parameters:\n - name: featureMembership\n required: true\n description: A full instance of a FeatureMembership\n deleteAll:\n description: The function used to delete all FeatureMembership\n parameters:\n - name: project\n required: true\n schema:\n type: string\n - name: location\n required: true\n schema:\n type: string\n - name: feature\n required: true\n schema:\n type: string\n list:\n description: The function used to list information about many FeatureMembership\n parameters:\n - name: project\n required: true\n schema:\n type: string\n - name: location\n required: true\n schema:\n type: string\n - name: feature\n required: true\n schema:\n type: string\ncomponents:\n schemas:\n FeatureMembership:\n title: FeatureMembership\n x-dcl-id: projects/{{project}}/locations/{{location}}/features/{{feature}}/memberships/{{membership}}\n x-dcl-parent-container: project\n x-dcl-has-create: true\n x-dcl-has-iam: false\n x-dcl-read-timeout: 0\n x-dcl-apply-timeout: 0\n x-dcl-delete-timeout: 0\n type: object\n required:\n - project\n - location\n - feature\n - membership\n properties:\n configmanagement:\n type: object\n x-dcl-go-name: Configmanagement\n x-dcl-go-type: FeatureMembershipConfigmanagement\n description: Config Management-specific spec.\n properties:\n binauthz:\n type: object\n x-dcl-go-name: Binauthz\n x-dcl-go-type: FeatureMembershipConfigmanagementBinauthz\n description: '**DEPRECATED** Binauthz configuration for the cluster.\n This field will be ignored and should not be set.'\n x-dcl-server-default: true\n properties:\n enabled:\n type: boolean\n x-dcl-go-name: Enabled\n description: Whether binauthz is enabled in this cluster.\n x-dcl-parameter: true\n configSync:\n type: object\n x-dcl-go-name: ConfigSync\n x-dcl-go-type: FeatureMembershipConfigmanagementConfigSync\n description: Config Sync configuration for the cluster.\n x-dcl-send-empty: true\n properties:\n enabled:\n type: boolean\n x-dcl-go-name: Enabled\n description: Enables the installation of ConfigSync. If set to true,\n ConfigSync resources will be created and the other ConfigSync\n fields will be applied if exist. If set to false, all other ConfigSync\n fields will be ignored, ConfigSync resources will be deleted.\n If omitted, ConfigSync resources will be managed depends on the\n presence of the git or oci field.\n git:\n type: object\n x-dcl-go-name: Git\n x-dcl-go-type: FeatureMembershipConfigmanagementConfigSyncGit\n properties:\n gcpServiceAccountEmail:\n type: string\n x-dcl-go-name: GcpServiceAccountEmail\n description: The GCP Service Account Email used for auth when\n secretType is gcpServiceAccount.\n x-dcl-references:\n - resource: Iam/ServiceAccount\n field: email\n httpsProxy:\n type: string\n x-dcl-go-name: HttpsProxy\n description: URL for the HTTPS proxy to be used when communicating\n with the Git repo.\n policyDir:\n type: string\n x-dcl-go-name: PolicyDir\n description: 'The path within the Git repository that represents\n the top level of the repo to sync. Default: the root directory\n of the repository.'\n secretType:\n type: string\n x-dcl-go-name: SecretType\n description: Type of secret configured for access to the Git\n repo. Must be one of ssh, cookiefile, gcenode, token, gcpserviceaccount\n or none. The validation of this is case-sensitive.\n syncBranch:\n type: string\n x-dcl-go-name: SyncBranch\n description: 'The branch of the repository to sync from. Default:\n master.'\n syncRepo:\n type: string\n x-dcl-go-name: SyncRepo\n description: The URL of the Git repository to use as the source\n of truth.\n syncRev:\n type: string\n x-dcl-go-name: SyncRev\n description: Git revision (tag or hash) to check out. Default\n HEAD.\n syncWaitSecs:\n type: string\n x-dcl-go-name: SyncWaitSecs\n description: 'Period in seconds between consecutive syncs. Default:\n 15.'\n metricsGcpServiceAccountEmail:\n type: string\n x-dcl-go-name: MetricsGcpServiceAccountEmail\n description: 'Deprecated: If Workload Identity Federation for GKE\n is enabled, Google Cloud Service Account is no longer needed for\n exporting Config Sync metrics: https://cloud.google.com/kubernetes-engine/enterprise/config-sync/docs/how-to/monitor-config-sync-cloud-monitoring#custom-monitoring.'\n x-dcl-references:\n - resource: Iam/ServiceAccount\n field: email\n x-dcl-deprecated: true\n oci:\n type: object\n x-dcl-go-name: Oci\n x-dcl-go-type: FeatureMembershipConfigmanagementConfigSyncOci\n properties:\n gcpServiceAccountEmail:\n type: string\n x-dcl-go-name: GcpServiceAccountEmail\n description: 'The GCP Service Account Email used for auth when\n secret_type is gcpserviceaccount. '\n x-dcl-references:\n - resource: Iam/ServiceAccount\n field: email\n policyDir:\n type: string\n x-dcl-go-name: PolicyDir\n description: 'The absolute path of the directory that contains\n the local resources. Default: the root directory of the image.'\n secretType:\n type: string\n x-dcl-go-name: SecretType\n description: Type of secret configured for access to the OCI\n Image. Must be one of gcenode, gcpserviceaccount or none.\n The validation of this is case-sensitive.\n syncRepo:\n type: string\n x-dcl-go-name: SyncRepo\n description: The OCI image repository URL for the package to\n sync from. e.g. LOCATION-docker.pkg.dev/PROJECT_ID/REPOSITORY_NAME/PACKAGE_NAME.\n syncWaitSecs:\n type: string\n x-dcl-go-name: SyncWaitSecs\n description: 'Period in seconds(int64 format) between consecutive\n syncs. Default: 15.'\n preventDrift:\n type: boolean\n x-dcl-go-name: PreventDrift\n description: Set to true to enable the Config Sync admission webhook\n to prevent drifts. If set to `false`, disables the Config Sync\n admission webhook and does not prevent drifts.\n x-dcl-server-default: true\n sourceFormat:\n type: string\n x-dcl-go-name: SourceFormat\n description: Specifies whether the Config Sync Repo is in \"hierarchical\"\n or \"unstructured\" mode.\n stopSyncing:\n type: boolean\n x-dcl-go-name: StopSyncing\n description: 'Set to true to stop syncing configs for a single cluster.\n Default: false.'\n hierarchyController:\n type: object\n x-dcl-go-name: HierarchyController\n x-dcl-go-type: FeatureMembershipConfigmanagementHierarchyController\n description: Hierarchy Controller configuration for the cluster.\n x-dcl-send-empty: true\n properties:\n enableHierarchicalResourceQuota:\n type: boolean\n x-dcl-go-name: EnableHierarchicalResourceQuota\n description: Whether hierarchical resource quota is enabled in this\n cluster.\n x-dcl-send-empty: true\n enablePodTreeLabels:\n type: boolean\n x-dcl-go-name: EnablePodTreeLabels\n description: Whether pod tree labels are enabled in this cluster.\n x-dcl-send-empty: true\n enabled:\n type: boolean\n x-dcl-go-name: Enabled\n description: '**DEPRECATED** Configuring Hierarchy Controller through\n the configmanagement feature is no longer recommended. Use https://github.com/kubernetes-sigs/hierarchical-namespaces\n instead.'\n x-dcl-send-empty: true\n management:\n type: string\n x-dcl-go-name: Management\n x-dcl-go-type: FeatureMembershipConfigmanagementManagementEnum\n description: Set this field to MANAGEMENT_AUTOMATIC to enable Config\n Sync auto-upgrades, and set this field to MANAGEMENT_MANUAL or MANAGEMENT_UNSPECIFIED\n to disable Config Sync auto-upgrades.\n x-dcl-server-default: true\n enum:\n - MANAGEMENT_UNSPECIFIED\n - MANAGEMENT_AUTOMATIC\n - MANAGEMENT_MANUAL\n policyController:\n type: object\n x-dcl-go-name: PolicyController\n x-dcl-go-type: FeatureMembershipConfigmanagementPolicyController\n description: '**DEPRECATED** Configuring Policy Controller through the\n configmanagement feature is no longer recommended. Use the policycontroller\n feature instead.'\n properties:\n auditIntervalSeconds:\n type: string\n x-dcl-go-name: AuditIntervalSeconds\n description: Sets the interval for Policy Controller Audit Scans\n (in seconds). When set to 0, this disables audit functionality\n altogether.\n enabled:\n type: boolean\n x-dcl-go-name: Enabled\n description: Enables the installation of Policy Controller. If false,\n the rest of PolicyController fields take no effect.\n exemptableNamespaces:\n type: array\n x-dcl-go-name: ExemptableNamespaces\n description: The set of namespaces that are excluded from Policy\n Controller checks. Namespaces do not need to currently exist on\n the cluster.\n x-dcl-send-empty: true\n x-dcl-list-type: list\n items:\n type: string\n x-dcl-go-type: string\n logDeniesEnabled:\n type: boolean\n x-dcl-go-name: LogDeniesEnabled\n description: Logs all denies and dry run failures.\n monitoring:\n type: object\n x-dcl-go-name: Monitoring\n x-dcl-go-type: FeatureMembershipConfigmanagementPolicyControllerMonitoring\n description: 'Specifies the backends Policy Controller should export\n metrics to. For example, to specify metrics should be exported\n to Cloud Monitoring and Prometheus, specify backends: [\"cloudmonitoring\",\n \"prometheus\"]. Default: [\"cloudmonitoring\", \"prometheus\"]'\n x-dcl-server-default: true\n properties:\n backends:\n type: array\n x-dcl-go-name: Backends\n description: ' Specifies the list of backends Policy Controller\n will export to. Specifying an empty value `[]` disables metrics\n export.'\n x-dcl-server-default: true\n x-dcl-send-empty: true\n x-dcl-list-type: list\n items:\n type: string\n x-dcl-go-type: FeatureMembershipConfigmanagementPolicyControllerMonitoringBackendsEnum\n enum:\n - MONITORING_BACKEND_UNSPECIFIED\n - PROMETHEUS\n - CLOUD_MONITORING\n mutationEnabled:\n type: boolean\n x-dcl-go-name: MutationEnabled\n description: Enable or disable mutation in policy controller. If\n true, mutation CRDs, webhook and controller deployment will be\n deployed to the cluster.\n referentialRulesEnabled:\n type: boolean\n x-dcl-go-name: ReferentialRulesEnabled\n description: Enables the ability to use Constraint Templates that\n reference to objects other than the object currently being evaluated.\n templateLibraryInstalled:\n type: boolean\n x-dcl-go-name: TemplateLibraryInstalled\n description: Installs the default template library along with Policy\n Controller.\n version:\n type: string\n x-dcl-go-name: Version\n description: Optional. Version of ACM to install. Defaults to the latest\n version.\n x-dcl-server-default: true\n feature:\n type: string\n x-dcl-go-name: Feature\n description: The name of the feature\n x-kubernetes-immutable: true\n x-dcl-references:\n - resource: Gkehub/Feature\n field: name\n parent: true\n x-dcl-parameter: true\n location:\n type: string\n x-dcl-go-name: Location\n description: The location of the feature\n x-kubernetes-immutable: true\n x-dcl-parameter: true\n membership:\n type: string\n x-dcl-go-name: Membership\n description: The name of the membership\n x-kubernetes-immutable: true\n x-dcl-references:\n - resource: Gkehub/Membership\n field: name\n x-dcl-parameter: true\n membershipLocation:\n type: string\n x-dcl-go-name: MembershipLocation\n description: The location of the membership\n x-kubernetes-immutable: true\n x-dcl-parameter: true\n mesh:\n type: object\n x-dcl-go-name: Mesh\n x-dcl-go-type: FeatureMembershipMesh\n description: Manage Mesh Features\n properties:\n controlPlane:\n type: string\n x-dcl-go-name: ControlPlane\n x-dcl-go-type: FeatureMembershipMeshControlPlaneEnum\n description: '**DEPRECATED** Whether to automatically manage Service\n Mesh control planes. Possible values: CONTROL_PLANE_MANAGEMENT_UNSPECIFIED,\n AUTOMATIC, MANUAL'\n enum:\n - CONTROL_PLANE_MANAGEMENT_UNSPECIFIED\n - AUTOMATIC\n - MANUAL\n management:\n type: string\n x-dcl-go-name: Management\n x-dcl-go-type: FeatureMembershipMeshManagementEnum\n description: 'Whether to automatically manage Service Mesh. Possible\n values: MANAGEMENT_UNSPECIFIED, MANAGEMENT_AUTOMATIC, MANAGEMENT_MANUAL'\n enum:\n - MANAGEMENT_UNSPECIFIED\n - MANAGEMENT_AUTOMATIC\n - MANAGEMENT_MANUAL\n policycontroller:\n type: object\n x-dcl-go-name: Policycontroller\n x-dcl-go-type: FeatureMembershipPolicycontroller\n description: Policy Controller-specific spec.\n required:\n - policyControllerHubConfig\n properties:\n policyControllerHubConfig:\n type: object\n x-dcl-go-name: PolicyControllerHubConfig\n x-dcl-go-type: FeatureMembershipPolicycontrollerPolicyControllerHubConfig\n description: Policy Controller configuration for the cluster.\n properties:\n auditIntervalSeconds:\n type: integer\n format: int64\n x-dcl-go-name: AuditIntervalSeconds\n description: Sets the interval for Policy Controller Audit Scans\n (in seconds). When set to 0, this disables audit functionality\n altogether.\n constraintViolationLimit:\n type: integer\n format: int64\n x-dcl-go-name: ConstraintViolationLimit\n description: The maximum number of audit violations to be stored\n in a constraint. If not set, the internal default of 20 will be\n used.\n deploymentConfigs:\n type: object\n additionalProperties:\n type: object\n x-dcl-go-type: FeatureMembershipPolicycontrollerPolicyControllerHubConfigDeploymentConfigs\n properties:\n containerResources:\n type: object\n x-dcl-go-name: ContainerResources\n x-dcl-go-type: FeatureMembershipPolicycontrollerPolicyControllerHubConfigDeploymentConfigsContainerResources\n description: Container resource requirements.\n x-dcl-conflicts:\n - replicaCount\n - podAffinity\n - podTolerations\n properties:\n limits:\n type: object\n x-dcl-go-name: Limits\n x-dcl-go-type: FeatureMembershipPolicycontrollerPolicyControllerHubConfigDeploymentConfigsContainerResourcesLimits\n description: Limits describes the maximum amount of compute\n resources allowed for use by the running container.\n properties:\n cpu:\n type: string\n x-dcl-go-name: Cpu\n description: CPU requirement expressed in Kubernetes\n resource units.\n memory:\n type: string\n x-dcl-go-name: Memory\n description: Memory requirement expressed in Kubernetes\n resource units.\n requests:\n type: object\n x-dcl-go-name: Requests\n x-dcl-go-type: FeatureMembershipPolicycontrollerPolicyControllerHubConfigDeploymentConfigsContainerResourcesRequests\n description: Requests describes the amount of compute\n resources reserved for the container by the kube-scheduler.\n properties:\n cpu:\n type: string\n x-dcl-go-name: Cpu\n description: CPU requirement expressed in Kubernetes\n resource units.\n memory:\n type: string\n x-dcl-go-name: Memory\n description: Memory requirement expressed in Kubernetes\n resource units.\n podAffinity:\n type: string\n x-dcl-go-name: PodAffinity\n x-dcl-go-type: FeatureMembershipPolicycontrollerPolicyControllerHubConfigDeploymentConfigsPodAffinityEnum\n description: 'Pod affinity configuration. Possible values:\n AFFINITY_UNSPECIFIED, NO_AFFINITY, ANTI_AFFINITY'\n x-dcl-conflicts:\n - replicaCount\n - containerResources\n - podTolerations\n enum:\n - AFFINITY_UNSPECIFIED\n - NO_AFFINITY\n - ANTI_AFFINITY\n podTolerations:\n type: array\n x-dcl-go-name: PodTolerations\n description: Pod tolerations of node taints.\n x-dcl-conflicts:\n - replicaCount\n - containerResources\n - podAffinity\n x-dcl-send-empty: true\n x-dcl-list-type: list\n items:\n type: object\n x-dcl-go-type: FeatureMembershipPolicycontrollerPolicyControllerHubConfigDeploymentConfigsPodTolerations\n properties:\n effect:\n type: string\n x-dcl-go-name: Effect\n description: Matches a taint effect.\n key:\n type: string\n x-dcl-go-name: Key\n description: Matches a taint key (not necessarily unique).\n operator:\n type: string\n x-dcl-go-name: Operator\n description: Matches a taint operator.\n value:\n type: string\n x-dcl-go-name: Value\n description: Matches a taint value.\n replicaCount:\n type: integer\n format: int64\n x-dcl-go-name: ReplicaCount\n description: Pod replica count.\n x-dcl-conflicts:\n - containerResources\n - podAffinity\n - podTolerations\n x-dcl-go-name: DeploymentConfigs\n description: Map of deployment configs to deployments (\"admission\",\n \"audit\", \"mutation\").\n x-dcl-server-default: true\n exemptableNamespaces:\n type: array\n x-dcl-go-name: ExemptableNamespaces\n description: The set of namespaces that are excluded from Policy\n Controller checks. Namespaces do not need to currently exist on\n the cluster.\n x-dcl-send-empty: true\n x-dcl-list-type: list\n items:\n type: string\n x-dcl-go-type: string\n installSpec:\n type: string\n x-dcl-go-name: InstallSpec\n x-dcl-go-type: FeatureMembershipPolicycontrollerPolicyControllerHubConfigInstallSpecEnum\n description: 'Configures the mode of the Policy Controller installation.\n Possible values: INSTALL_SPEC_UNSPECIFIED, INSTALL_SPEC_NOT_INSTALLED,\n INSTALL_SPEC_ENABLED, INSTALL_SPEC_SUSPENDED, INSTALL_SPEC_DETACHED'\n enum:\n - INSTALL_SPEC_UNSPECIFIED\n - INSTALL_SPEC_NOT_INSTALLED\n - INSTALL_SPEC_ENABLED\n - INSTALL_SPEC_SUSPENDED\n - INSTALL_SPEC_DETACHED\n logDeniesEnabled:\n type: boolean\n x-dcl-go-name: LogDeniesEnabled\n description: Logs all denies and dry run failures.\n monitoring:\n type: object\n x-dcl-go-name: Monitoring\n x-dcl-go-type: FeatureMembershipPolicycontrollerPolicyControllerHubConfigMonitoring\n description: 'Specifies the backends Policy Controller should export\n metrics to. For example, to specify metrics should be exported\n to Cloud Monitoring and Prometheus, specify backends: [\"cloudmonitoring\",\n \"prometheus\"]. Default: [\"cloudmonitoring\", \"prometheus\"]'\n x-dcl-server-default: true\n properties:\n backends:\n type: array\n x-dcl-go-name: Backends\n description: ' Specifies the list of backends Policy Controller\n will export to. Specifying an empty value `[]` disables metrics\n export.'\n x-dcl-server-default: true\n x-dcl-send-empty: true\n x-dcl-list-type: list\n items:\n type: string\n x-dcl-go-type: FeatureMembershipPolicycontrollerPolicyControllerHubConfigMonitoringBackendsEnum\n enum:\n - MONITORING_BACKEND_UNSPECIFIED\n - PROMETHEUS\n - CLOUD_MONITORING\n mutationEnabled:\n type: boolean\n x-dcl-go-name: MutationEnabled\n description: Enables the ability to mutate resources using Policy\n Controller.\n policyContent:\n type: object\n x-dcl-go-name: PolicyContent\n x-dcl-go-type: FeatureMembershipPolicycontrollerPolicyControllerHubConfigPolicyContent\n description: Specifies the desired policy content on the cluster.\n x-dcl-server-default: true\n properties:\n bundles:\n type: object\n additionalProperties:\n type: object\n x-dcl-go-type: FeatureMembershipPolicycontrollerPolicyControllerHubConfigPolicyContentBundles\n properties:\n exemptedNamespaces:\n type: array\n x-dcl-go-name: ExemptedNamespaces\n description: The set of namespaces to be exempted from\n the bundle.\n x-dcl-send-empty: true\n x-dcl-list-type: list\n items:\n type: string\n x-dcl-go-type: string\n x-dcl-go-name: Bundles\n description: map of bundle name to BundleInstallSpec. The bundle\n name maps to the `bundleName` key in the `policycontroller.gke.io/constraintData`\n annotation on a constraint.\n templateLibrary:\n type: object\n x-dcl-go-name: TemplateLibrary\n x-dcl-go-type: FeatureMembershipPolicycontrollerPolicyControllerHubConfigPolicyContentTemplateLibrary\n description: Configures the installation of the Template Library.\n x-dcl-server-default: true\n properties:\n installation:\n type: string\n x-dcl-go-name: Installation\n x-dcl-go-type: FeatureMembershipPolicycontrollerPolicyControllerHubConfigPolicyContentTemplateLibraryInstallationEnum\n description: 'Configures the manner in which the template\n library is installed on the cluster. Possible values:\n INSTALLATION_UNSPECIFIED, NOT_INSTALLED, ALL'\n enum:\n - INSTALLATION_UNSPECIFIED\n - NOT_INSTALLED\n - ALL\n referentialRulesEnabled:\n type: boolean\n x-dcl-go-name: ReferentialRulesEnabled\n description: Enables the ability to use Constraint Templates that\n reference to objects other than the object currently being evaluated.\n version:\n type: string\n x-dcl-go-name: Version\n description: Optional. Version of Policy Controller to install. Defaults\n to the latest version.\n x-dcl-server-default: true\n project:\n type: string\n x-dcl-go-name: Project\n description: The project of the feature\n x-kubernetes-immutable: true\n x-dcl-references:\n - resource: Cloudresourcemanager/Project\n field: name\n parent: true\n x-dcl-parameter: true\n") -// 30994 bytes -// MD5: d83aee28a9edabe5c818830349b37cc5 +// 31227 bytes +// MD5: 86d6d5a05846805028382e6593dcc33f diff --git a/services/google/gkehub/samples/acm.feature_membership.json b/services/google/gkehub/samples/acm.feature_membership.json index d7176d403..90e682071 100755 --- a/services/google/gkehub/samples/acm.feature_membership.json +++ b/services/google/gkehub/samples/acm.feature_membership.json @@ -17,7 +17,8 @@ }, "metricsGcpServiceAccountEmail": "{{ref:first.iam.service_account.json:email}}", "sourceFormat": "hierarchy", - "preventDrift": true + "preventDrift": true, + "stopSyncing": false }, "policyController": { "enabled": true, diff --git a/services/google/gkehub/samples/update_1_acm.feature_membership.json b/services/google/gkehub/samples/update_1_acm.feature_membership.json index 9170cfaa8..4b449f411 100755 --- a/services/google/gkehub/samples/update_1_acm.feature_membership.json +++ b/services/google/gkehub/samples/update_1_acm.feature_membership.json @@ -17,7 +17,8 @@ }, "metricsGcpServiceAccountEmail": "{{ref:second.iam.service_account.json:email}}", "sourceFormat": "unstructured", - "preventDrift": true + "preventDrift": true, + "stopSyncing": true }, "policyController": { "enabled": false, diff --git a/unstructured/google/gkehub/alpha/feature_membership.go b/unstructured/google/gkehub/alpha/feature_membership.go index 1d3360a2a..943bb1258 100755 --- a/unstructured/google/gkehub/alpha/feature_membership.go +++ b/unstructured/google/gkehub/alpha/feature_membership.go @@ -102,6 +102,9 @@ func FeatureMembershipToUnstructured(r *dclService.FeatureMembership) *unstructu if r.Configmanagement.ConfigSync.SourceFormat != nil { rConfigmanagementConfigSync["sourceFormat"] = *r.Configmanagement.ConfigSync.SourceFormat } + if r.Configmanagement.ConfigSync.StopSyncing != nil { + rConfigmanagementConfigSync["stopSyncing"] = *r.Configmanagement.ConfigSync.StopSyncing + } rConfigmanagement["configSync"] = rConfigmanagementConfigSync } if r.Configmanagement.HierarchyController != nil && r.Configmanagement.HierarchyController != dclService.EmptyFeatureMembershipConfigmanagementHierarchyController { @@ -467,6 +470,13 @@ func UnstructuredToFeatureMembership(u *unstructured.Resource) (*dclService.Feat return nil, fmt.Errorf("r.Configmanagement.ConfigSync.SourceFormat: expected string") } } + if _, ok := rConfigmanagementConfigSync["stopSyncing"]; ok { + if b, ok := rConfigmanagementConfigSync["stopSyncing"].(bool); ok { + r.Configmanagement.ConfigSync.StopSyncing = dcl.Bool(b) + } else { + return nil, fmt.Errorf("r.Configmanagement.ConfigSync.StopSyncing: expected bool") + } + } } else { return nil, fmt.Errorf("r.Configmanagement.ConfigSync: expected map[string]interface{}") } diff --git a/unstructured/google/gkehub/beta/feature_membership.go b/unstructured/google/gkehub/beta/feature_membership.go index c7c26e48a..a05addca1 100755 --- a/unstructured/google/gkehub/beta/feature_membership.go +++ b/unstructured/google/gkehub/beta/feature_membership.go @@ -102,6 +102,9 @@ func FeatureMembershipToUnstructured(r *dclService.FeatureMembership) *unstructu if r.Configmanagement.ConfigSync.SourceFormat != nil { rConfigmanagementConfigSync["sourceFormat"] = *r.Configmanagement.ConfigSync.SourceFormat } + if r.Configmanagement.ConfigSync.StopSyncing != nil { + rConfigmanagementConfigSync["stopSyncing"] = *r.Configmanagement.ConfigSync.StopSyncing + } rConfigmanagement["configSync"] = rConfigmanagementConfigSync } if r.Configmanagement.HierarchyController != nil && r.Configmanagement.HierarchyController != dclService.EmptyFeatureMembershipConfigmanagementHierarchyController { @@ -467,6 +470,13 @@ func UnstructuredToFeatureMembership(u *unstructured.Resource) (*dclService.Feat return nil, fmt.Errorf("r.Configmanagement.ConfigSync.SourceFormat: expected string") } } + if _, ok := rConfigmanagementConfigSync["stopSyncing"]; ok { + if b, ok := rConfigmanagementConfigSync["stopSyncing"].(bool); ok { + r.Configmanagement.ConfigSync.StopSyncing = dcl.Bool(b) + } else { + return nil, fmt.Errorf("r.Configmanagement.ConfigSync.StopSyncing: expected bool") + } + } } else { return nil, fmt.Errorf("r.Configmanagement.ConfigSync: expected map[string]interface{}") } diff --git a/unstructured/google/gkehub/feature_membership.go b/unstructured/google/gkehub/feature_membership.go index 7438c5d1c..d5ed8af16 100755 --- a/unstructured/google/gkehub/feature_membership.go +++ b/unstructured/google/gkehub/feature_membership.go @@ -102,6 +102,9 @@ func FeatureMembershipToUnstructured(r *dclService.FeatureMembership) *unstructu if r.Configmanagement.ConfigSync.SourceFormat != nil { rConfigmanagementConfigSync["sourceFormat"] = *r.Configmanagement.ConfigSync.SourceFormat } + if r.Configmanagement.ConfigSync.StopSyncing != nil { + rConfigmanagementConfigSync["stopSyncing"] = *r.Configmanagement.ConfigSync.StopSyncing + } rConfigmanagement["configSync"] = rConfigmanagementConfigSync } if r.Configmanagement.HierarchyController != nil && r.Configmanagement.HierarchyController != dclService.EmptyFeatureMembershipConfigmanagementHierarchyController { @@ -467,6 +470,13 @@ func UnstructuredToFeatureMembership(u *unstructured.Resource) (*dclService.Feat return nil, fmt.Errorf("r.Configmanagement.ConfigSync.SourceFormat: expected string") } } + if _, ok := rConfigmanagementConfigSync["stopSyncing"]; ok { + if b, ok := rConfigmanagementConfigSync["stopSyncing"].(bool); ok { + r.Configmanagement.ConfigSync.StopSyncing = dcl.Bool(b) + } else { + return nil, fmt.Errorf("r.Configmanagement.ConfigSync.StopSyncing: expected bool") + } + } } else { return nil, fmt.Errorf("r.Configmanagement.ConfigSync: expected map[string]interface{}") }