diff --git a/lib/auth/auth_with_roles_test.go b/lib/auth/auth_with_roles_test.go index cc6749df9bdb4..d117c4b46a0bd 100644 --- a/lib/auth/auth_with_roles_test.go +++ b/lib/auth/auth_with_roles_test.go @@ -2050,6 +2050,7 @@ func TestKubernetesClusterCRUD_DiscoveryService(t *testing.T) { Status: aws.String(eks.ClusterStatusActive), }) require.NoError(t, err) + eksCluster.SetOrigin(types.OriginCloud) // Discovery service must not have access to non-cloud cluster (cluster // without "cloud" origin label). @@ -2069,6 +2070,7 @@ func TestKubernetesClusterCRUD_DiscoveryService(t *testing.T) { Status: aws.String(eks.ClusterStatusActive), }) require.NoError(t, err) + clusterWithDynamicLabels.SetOrigin(types.OriginCloud) clusterWithDynamicLabels.SetDynamicLabels(map[string]types.CommandLabel{ "hostname": &types.CommandLabelV2{ Period: types.Duration(time.Hour), @@ -2084,7 +2086,7 @@ func TestKubernetesClusterCRUD_DiscoveryService(t *testing.T) { t.Run("Read", func(t *testing.T) { clusters, err := discoveryClt.GetKubernetesClusters(ctx) require.NoError(t, err) - require.Equal(t, clusters, []types.KubeCluster{eksCluster}) + require.Empty(t, cmp.Diff([]types.KubeCluster{eksCluster}, clusters)) }) t.Run("Update", func(t *testing.T) { require.NoError(t, discoveryClt.UpdateKubernetesCluster(ctx, eksCluster)) diff --git a/lib/integrations/awsoidc/listdatabases_test.go b/lib/integrations/awsoidc/listdatabases_test.go index e963bd2090019..44e413bbd0180 100644 --- a/lib/integrations/awsoidc/listdatabases_test.go +++ b/lib/integrations/awsoidc/listdatabases_test.go @@ -189,14 +189,13 @@ func TestListDatabases(t *testing.T) { Name: "my-db", Description: "RDS instance in ", Labels: map[string]string{ - "account-id": "123456789012", - "endpoint-type": "instance", - "engine": "postgres", - "engine-version": "", - "region": "", - "status": "available", - "teleport.dev/cloud": "AWS", - "teleport.dev/origin": "cloud", + "account-id": "123456789012", + "endpoint-type": "instance", + "engine": "postgres", + "engine-version": "", + "region": "", + "status": "available", + "teleport.dev/cloud": "AWS", }, }, types.DatabaseSpecV3{ @@ -254,14 +253,13 @@ func TestListDatabases(t *testing.T) { Name: "my-db", Description: "RDS instance in ", Labels: map[string]string{ - "account-id": "123456789012", - "endpoint-type": "instance", - "engine": "postgres", - "engine-version": "", - "region": "", - "status": "available", - "teleport.dev/cloud": "AWS", - "teleport.dev/origin": "cloud", + "account-id": "123456789012", + "endpoint-type": "instance", + "engine": "postgres", + "engine-version": "", + "region": "", + "status": "available", + "teleport.dev/cloud": "AWS", }, }, types.DatabaseSpecV3{ @@ -312,14 +310,13 @@ func TestListDatabases(t *testing.T) { Name: "my-dbc", Description: "Aurora cluster in ", Labels: map[string]string{ - "account-id": "123456789012", - "endpoint-type": "primary", - "engine": "aurora-postgresql", - "engine-version": "", - "region": "", - "status": "available", - "teleport.dev/cloud": "AWS", - "teleport.dev/origin": "cloud", + "account-id": "123456789012", + "endpoint-type": "primary", + "engine": "aurora-postgresql", + "engine-version": "", + "region": "", + "status": "available", + "teleport.dev/cloud": "AWS", }, }, types.DatabaseSpecV3{ diff --git a/lib/services/database.go b/lib/services/database.go index 69acad8b644dd..16afd115de278 100644 --- a/lib/services/database.go +++ b/lib/services/database.go @@ -1619,7 +1619,6 @@ func labelsFromAWSMetadata(meta *types.AWS) map[string]string { labels[types.DiscoveryLabelAccountID] = meta.AccountID labels[types.DiscoveryLabelRegion] = meta.Region } - labels[types.OriginLabel] = types.OriginCloud labels[types.CloudLabel] = types.CloudAWS return labels } @@ -1640,7 +1639,6 @@ func labelsFromMetaAndEndpointType(meta *types.AWS, endpointType string, extraLa // azureTagsToLabels converts Azure tags to a labels map. func azureTagsToLabels(tags map[string]string) map[string]string { labels := make(map[string]string) - labels[types.OriginLabel] = types.OriginCloud labels[types.CloudLabel] = types.CloudAzure return addLabels(labels, tags) } diff --git a/lib/services/database_test.go b/lib/services/database_test.go index 3600073c85aaa..16665994dfed1 100644 --- a/lib/services/database_test.go +++ b/lib/services/database_test.go @@ -483,7 +483,6 @@ func TestDatabaseFromAzureDBServer(t *testing.T) { types.DiscoveryLabelEngine: "Microsoft.DBforMySQL/servers", types.DiscoveryLabelEngineVersion: "5.7", types.DiscoveryLabelAzureResourceGroup: "defaultRG", - types.OriginLabel: types.OriginCloud, types.CloudLabel: types.CloudAzure, types.DiscoveryLabelAzureSubscriptionID: "sub1", "foo": "bar", @@ -532,7 +531,6 @@ func TestDatabaseFromAzureRedis(t *testing.T) { types.DiscoveryLabelEngine: "Microsoft.Cache/Redis", types.DiscoveryLabelEngineVersion: "6.0", types.DiscoveryLabelAzureResourceGroup: group, - types.OriginLabel: types.OriginCloud, types.CloudLabel: types.CloudAzure, types.DiscoveryLabelAzureSubscriptionID: subscription, "foo": "bar", @@ -591,7 +589,6 @@ func TestDatabaseFromAzureRedisEnterprise(t *testing.T) { types.DiscoveryLabelEngine: "Microsoft.Cache/redisEnterprise", types.DiscoveryLabelEngineVersion: "6.0", types.DiscoveryLabelAzureResourceGroup: group, - types.OriginLabel: types.OriginCloud, types.CloudLabel: types.CloudAzure, types.DiscoveryLabelAzureSubscriptionID: subscription, types.DiscoveryLabelEndpointType: "OSSCluster", @@ -639,7 +636,6 @@ func TestDatabaseFromRDSInstance(t *testing.T) { Description: "RDS instance in us-west-1", Labels: map[string]string{ types.DiscoveryLabelAccountID: "123456789012", - types.OriginLabel: types.OriginCloud, types.CloudLabel: types.CloudAWS, types.DiscoveryLabelRegion: "us-west-1", types.DiscoveryLabelEngine: RDSEnginePostgres, @@ -701,7 +697,6 @@ func TestDatabaseFromRDSV2Instance(t *testing.T) { Description: "RDS instance in us-west-1", Labels: map[string]string{ types.DiscoveryLabelAccountID: "123456789012", - types.OriginLabel: types.OriginCloud, types.CloudLabel: types.CloudAWS, types.DiscoveryLabelRegion: "us-west-1", types.DiscoveryLabelEngine: RDSEnginePostgres, @@ -780,7 +775,6 @@ func TestDatabaseFromRDSInstanceNameOverride(t *testing.T) { Description: "RDS instance in us-west-1", Labels: map[string]string{ types.DiscoveryLabelAccountID: "123456789012", - types.OriginLabel: types.OriginCloud, types.CloudLabel: types.CloudAWS, types.DiscoveryLabelRegion: "us-west-1", types.DiscoveryLabelEngine: RDSEnginePostgres, @@ -849,7 +843,6 @@ func TestDatabaseFromRDSCluster(t *testing.T) { Description: "Aurora cluster in us-east-1", Labels: map[string]string{ types.DiscoveryLabelAccountID: "123456789012", - types.OriginLabel: types.OriginCloud, types.CloudLabel: types.CloudAWS, types.DiscoveryLabelRegion: "us-east-1", types.DiscoveryLabelEngine: RDSEngineAuroraMySQL, @@ -874,7 +867,6 @@ func TestDatabaseFromRDSCluster(t *testing.T) { Description: "Aurora cluster in us-east-1 (reader endpoint)", Labels: map[string]string{ types.DiscoveryLabelAccountID: "123456789012", - types.OriginLabel: types.OriginCloud, types.CloudLabel: types.CloudAWS, types.DiscoveryLabelRegion: "us-east-1", types.DiscoveryLabelEngine: RDSEngineAuroraMySQL, @@ -896,7 +888,6 @@ func TestDatabaseFromRDSCluster(t *testing.T) { t.Run("custom endpoints", func(t *testing.T) { expectedLabels := map[string]string{ types.DiscoveryLabelAccountID: "123456789012", - types.OriginLabel: types.OriginCloud, types.CloudLabel: types.CloudAWS, types.DiscoveryLabelRegion: "us-east-1", types.DiscoveryLabelEngine: RDSEngineAuroraMySQL, @@ -989,7 +980,6 @@ func TestDatabaseFromRDSV2Cluster(t *testing.T) { Description: "Aurora cluster in us-east-1", Labels: map[string]string{ types.DiscoveryLabelAccountID: "123456789012", - types.OriginLabel: types.OriginCloud, types.CloudLabel: types.CloudAWS, types.DiscoveryLabelRegion: "us-east-1", types.DiscoveryLabelEngine: RDSEngineAuroraMySQL, @@ -1046,7 +1036,6 @@ func TestDatabaseFromRDSV2Cluster(t *testing.T) { "teleport.dev/database_name": "override-1", types.DiscoveryLabelAccountID: "123456789012", types.CloudLabel: types.CloudAWS, - types.OriginLabel: types.OriginCloud, types.DiscoveryLabelRegion: "us-east-1", types.DiscoveryLabelEngine: RDSEngineAuroraMySQL, types.DiscoveryLabelEngineVersion: "8.0.0", @@ -1115,7 +1104,6 @@ func TestDatabaseFromRDSClusterNameOverride(t *testing.T) { Description: "Aurora cluster in us-east-1", Labels: map[string]string{ types.DiscoveryLabelAccountID: "123456789012", - types.OriginLabel: types.OriginCloud, types.CloudLabel: types.CloudAWS, types.DiscoveryLabelRegion: "us-east-1", types.DiscoveryLabelEngine: RDSEngineAuroraMySQL, @@ -1141,7 +1129,6 @@ func TestDatabaseFromRDSClusterNameOverride(t *testing.T) { Description: "Aurora cluster in us-east-1 (reader endpoint)", Labels: map[string]string{ types.DiscoveryLabelAccountID: "123456789012", - types.OriginLabel: types.OriginCloud, types.CloudLabel: types.CloudAWS, types.DiscoveryLabelRegion: "us-east-1", types.DiscoveryLabelEngine: RDSEngineAuroraMySQL, @@ -1164,7 +1151,6 @@ func TestDatabaseFromRDSClusterNameOverride(t *testing.T) { t.Run("custom endpoints", func(t *testing.T) { expectedLabels := map[string]string{ types.DiscoveryLabelAccountID: "123456789012", - types.OriginLabel: types.OriginCloud, types.CloudLabel: types.CloudAWS, types.DiscoveryLabelRegion: "us-east-1", types.DiscoveryLabelEngine: RDSEngineAuroraMySQL, @@ -1249,7 +1235,6 @@ func TestDatabaseFromRDSProxy(t *testing.T) { Labels: map[string]string{ "key": "val", types.DiscoveryLabelAccountID: "123456789012", - types.OriginLabel: types.OriginCloud, types.CloudLabel: types.CloudAWS, types.DiscoveryLabelRegion: "ca-central-1", types.DiscoveryLabelEngine: "MYSQL", @@ -1281,7 +1266,6 @@ func TestDatabaseFromRDSProxy(t *testing.T) { Labels: map[string]string{ "key": "val", types.DiscoveryLabelAccountID: "123456789012", - types.OriginLabel: types.OriginCloud, types.CloudLabel: types.CloudAWS, types.DiscoveryLabelRegion: "ca-central-1", types.DiscoveryLabelEngine: "MYSQL", @@ -1444,11 +1428,10 @@ func TestAzureTagsToLabels(t *testing.T) { } labels := azureTagsToLabels(azureTags) wantLabels := map[string]string{ - "Name": "test", - "Env": "dev", - "foo:bar": "some-id", - types.OriginLabel: types.OriginCloud, - types.CloudLabel: types.CloudAzure, + "Name": "test", + "Env": "dev", + "foo:bar": "some-id", + types.CloudLabel: types.CloudAzure, } require.Equal(t, wantLabels, labels) } @@ -1479,7 +1462,6 @@ func TestDatabaseFromRedshiftCluster(t *testing.T) { Description: "Redshift cluster in us-east-1", Labels: map[string]string{ types.DiscoveryLabelAccountID: "123456789012", - types.OriginLabel: types.OriginCloud, types.CloudLabel: types.CloudAWS, types.DiscoveryLabelRegion: "us-east-1", "key": "val", @@ -1533,7 +1515,6 @@ func TestDatabaseFromRedshiftCluster(t *testing.T) { Description: "Redshift cluster in us-east-1", Labels: map[string]string{ types.DiscoveryLabelAccountID: "123456789012", - types.OriginLabel: types.OriginCloud, types.CloudLabel: types.CloudAWS, types.DiscoveryLabelRegion: "us-east-1", overrideLabel: "mycluster-override-2", @@ -1613,7 +1594,6 @@ func TestDatabaseFromElastiCacheConfigurationEndpoint(t *testing.T) { Description: "ElastiCache cluster in us-east-1 (configuration endpoint)", Labels: map[string]string{ types.DiscoveryLabelAccountID: "123456789012", - types.OriginLabel: types.OriginCloud, types.CloudLabel: types.CloudAWS, types.DiscoveryLabelRegion: "us-east-1", types.DiscoveryLabelEndpointType: "configuration", @@ -1689,7 +1669,6 @@ func TestDatabaseFromElastiCacheConfigurationEndpointNameOverride(t *testing.T) Description: "ElastiCache cluster in us-east-1 (configuration endpoint)", Labels: map[string]string{ types.DiscoveryLabelAccountID: "123456789012", - types.OriginLabel: types.OriginCloud, types.CloudLabel: types.CloudAWS, types.DiscoveryLabelRegion: "us-east-1", types.DiscoveryLabelEndpointType: "configuration", @@ -1748,7 +1727,6 @@ func TestDatabaseFromElastiCacheNodeGroups(t *testing.T) { Description: "ElastiCache cluster in us-east-1 (primary endpoint)", Labels: map[string]string{ types.DiscoveryLabelAccountID: "123456789012", - types.OriginLabel: types.OriginCloud, types.CloudLabel: types.CloudAWS, types.DiscoveryLabelRegion: "us-east-1", types.DiscoveryLabelEndpointType: "primary", @@ -1775,7 +1753,6 @@ func TestDatabaseFromElastiCacheNodeGroups(t *testing.T) { Description: "ElastiCache cluster in us-east-1 (reader endpoint)", Labels: map[string]string{ types.DiscoveryLabelAccountID: "123456789012", - types.OriginLabel: types.OriginCloud, types.CloudLabel: types.CloudAWS, types.DiscoveryLabelRegion: "us-east-1", types.DiscoveryLabelEndpointType: "reader", @@ -1836,7 +1813,6 @@ func TestDatabaseFromElastiCacheNodeGroupsNameOverride(t *testing.T) { Description: "ElastiCache cluster in us-east-1 (primary endpoint)", Labels: map[string]string{ types.DiscoveryLabelAccountID: "123456789012", - types.OriginLabel: types.OriginCloud, types.CloudLabel: types.CloudAWS, types.DiscoveryLabelRegion: "us-east-1", types.DiscoveryLabelEndpointType: "primary", @@ -1864,7 +1840,6 @@ func TestDatabaseFromElastiCacheNodeGroupsNameOverride(t *testing.T) { Description: "ElastiCache cluster in us-east-1 (reader endpoint)", Labels: map[string]string{ types.DiscoveryLabelAccountID: "123456789012", - types.OriginLabel: types.OriginCloud, types.CloudLabel: types.CloudAWS, types.DiscoveryLabelRegion: "us-east-1", types.DiscoveryLabelEndpointType: "reader", @@ -1913,7 +1888,6 @@ func TestDatabaseFromMemoryDBCluster(t *testing.T) { Description: "MemoryDB cluster in us-east-1", Labels: map[string]string{ types.DiscoveryLabelAccountID: "123456789012", - types.OriginLabel: types.OriginCloud, types.CloudLabel: types.CloudAWS, types.DiscoveryLabelRegion: "us-east-1", types.DiscoveryLabelEndpointType: "cluster", @@ -1948,7 +1922,6 @@ func TestDatabaseFromRedshiftServerlessWorkgroup(t *testing.T) { Description: "Redshift Serverless workgroup in eu-west-2", Labels: map[string]string{ types.DiscoveryLabelAccountID: "123456789012", - types.OriginLabel: types.OriginCloud, types.CloudLabel: types.CloudAWS, types.DiscoveryLabelRegion: "eu-west-2", types.DiscoveryLabelEndpointType: "workgroup", @@ -1984,7 +1957,6 @@ func TestDatabaseFromRedshiftServerlessVPCEndpoint(t *testing.T) { Description: "Redshift Serverless endpoint in eu-west-2", Labels: map[string]string{ types.DiscoveryLabelAccountID: "123456789012", - types.OriginLabel: types.OriginCloud, types.CloudLabel: types.CloudAWS, types.DiscoveryLabelRegion: "eu-west-2", types.DiscoveryLabelEndpointType: "vpc-endpoint", @@ -2040,7 +2012,6 @@ func TestDatabaseFromMemoryDBClusterNameOverride(t *testing.T) { Description: "MemoryDB cluster in us-east-1", Labels: map[string]string{ types.DiscoveryLabelAccountID: "123456789012", - types.OriginLabel: types.OriginCloud, types.CloudLabel: types.CloudAWS, types.DiscoveryLabelRegion: "us-east-1", types.DiscoveryLabelEndpointType: "cluster", @@ -2434,7 +2405,6 @@ func TestDatabaseFromAzureMySQLFlexServer(t *testing.T) { types.DiscoveryLabelEngine: provider, types.DiscoveryLabelEngineVersion: "8.0.21", types.DiscoveryLabelAzureResourceGroup: group, - types.OriginLabel: types.OriginCloud, types.CloudLabel: types.CloudAzure, types.DiscoveryLabelAzureSubscriptionID: subID, "foo": "bar", @@ -2511,7 +2481,6 @@ func TestDatabaseFromAzurePostgresFlexServer(t *testing.T) { types.DiscoveryLabelEngine: provider, types.DiscoveryLabelEngineVersion: "14", types.DiscoveryLabelAzureResourceGroup: group, - types.OriginLabel: types.OriginCloud, types.CloudLabel: types.CloudAzure, types.DiscoveryLabelAzureSubscriptionID: subID, "foo": "bar", @@ -2609,7 +2578,6 @@ func TestMakeAzureDatabaseLoginUsername(t *testing.T) { types.DiscoveryLabelEngine: tt.engine, types.DiscoveryLabelEngineVersion: "1.2.3", types.DiscoveryLabelAzureResourceGroup: group, - types.OriginLabel: types.OriginCloud, types.CloudLabel: types.CloudAzure, types.DiscoveryLabelAzureSubscriptionID: subID, "foo": "bar", diff --git a/lib/services/kubernetes.go b/lib/services/kubernetes.go index 63fad6c8e92bf..dc971740035ea 100644 --- a/lib/services/kubernetes.go +++ b/lib/services/kubernetes.go @@ -213,7 +213,6 @@ func NewKubeClusterFromAzureAKS(cluster *azure.AKSCluster) (types.KubeCluster, e // labelsFromAzureKubeCluster creates kube cluster labels. func labelsFromAzureKubeCluster(cluster *azure.AKSCluster) map[string]string { labels := azureTagsToLabels(cluster.Tags) - labels[types.OriginLabel] = types.OriginCloud labels[types.CloudLabel] = types.CloudAzure labels[types.DiscoveryLabelRegion] = cluster.Location @@ -253,7 +252,6 @@ func getOrSetDefaultGCPDescription(cluster gcp.GKECluster) string { func labelsFromGCPKubeCluster(cluster gcp.GKECluster) map[string]string { labels := make(map[string]string) maps.Copy(labels, cluster.Labels) - labels[types.OriginLabel] = types.OriginCloud labels[types.CloudLabel] = types.CloudGCP labels[types.DiscoveryLabelGCPLocation] = cluster.Location @@ -289,7 +287,6 @@ func NewKubeClusterFromAWSEKS(cluster *eks.Cluster) (types.KubeCluster, error) { // labelsFromAWSKubeCluster creates kube cluster labels. func labelsFromAWSKubeCluster(cluster *eks.Cluster, parsedARN arn.ARN) map[string]string { labels := awsEKSTagsToLabels(cluster.Tags) - labels[types.OriginLabel] = types.OriginCloud labels[types.CloudLabel] = types.CloudAWS labels[types.DiscoveryLabelRegion] = parsedARN.Region diff --git a/lib/services/kubernetes_test.go b/lib/services/kubernetes_test.go index a32c9964aa20c..0364fda10bd3f 100644 --- a/lib/services/kubernetes_test.go +++ b/lib/services/kubernetes_test.go @@ -92,7 +92,6 @@ func TestNewKubeClusterFromAWSEKS(t *testing.T) { Labels: map[string]string{ types.DiscoveryLabelAccountID: "123456789012", types.DiscoveryLabelRegion: "eu-west-1", - types.OriginLabel: types.OriginCloud, types.CloudLabel: types.CloudAWS, overrideLabel: "override-1", "env": "prod", @@ -135,7 +134,6 @@ func TestNewKubeClusterFromAzureAKS(t *testing.T) { types.DiscoveryLabelRegion: "uswest1", types.DiscoveryLabelAzureResourceGroup: "group1", types.DiscoveryLabelAzureSubscriptionID: "subID", - types.OriginLabel: types.OriginCloud, types.CloudLabel: types.CloudAzure, overrideLabel: "override-1", "env": "prod", @@ -179,7 +177,6 @@ func TestNewKubeClusterFromGCPGKE(t *testing.T) { Labels: map[string]string{ types.DiscoveryLabelGCPLocation: "central-1", types.DiscoveryLabelGCPProjectID: "p1", - types.OriginLabel: types.OriginCloud, types.CloudLabel: types.CloudGCP, overrideLabel: "override-1", "env": "prod", @@ -221,7 +218,6 @@ func TestNewKubeClusterFromGCPGKEWithoutLabels(t *testing.T) { types.DiscoveryLabelGCPLocation: "central-1", types.DiscoveryLabelGCPProjectID: "p1", types.CloudLabel: types.CloudGCP, - types.OriginLabel: types.OriginCloud, }, }, types.KubernetesClusterSpecV3{ GCP: types.KubeGCP{ diff --git a/lib/srv/discovery/common/watcher.go b/lib/srv/discovery/common/watcher.go index 858431377d316..858e5b9a6d310 100644 --- a/lib/srv/discovery/common/watcher.go +++ b/lib/srv/discovery/common/watcher.go @@ -148,6 +148,7 @@ func (w *Watcher) fetchAndSend() { // Set the origin to Cloud indicating that the resource was imported from a cloud provider. staticLabels[types.OriginLabel] = types.OriginCloud + staticLabels[types.CloudLabel] = lFetcher.Cloud() r.SetStaticLabels(staticLabels) } diff --git a/lib/srv/discovery/discovery_test.go b/lib/srv/discovery/discovery_test.go index 1186b184f4088..75cd99f1038cb 100644 --- a/lib/srv/discovery/discovery_test.go +++ b/lib/srv/discovery/discovery_test.go @@ -929,6 +929,7 @@ func mustConvertEKSToKubeCluster(t *testing.T, eksCluster *eks.Cluster, discover cluster, err := services.NewKubeClusterFromAWSEKS(eksCluster) require.NoError(t, err) cluster.GetStaticLabels()[types.TeleportInternalDiscoveryGroupName] = discoveryGroup + cluster.SetOrigin(types.OriginCloud) return cluster } @@ -936,6 +937,7 @@ func mustConvertAKSToKubeCluster(t *testing.T, azureCluster *azure.AKSCluster, d cluster, err := services.NewKubeClusterFromAzureAKS(azureCluster) require.NoError(t, err) cluster.GetStaticLabels()[types.TeleportInternalDiscoveryGroupName] = discoveryGroup + cluster.SetOrigin(types.OriginCloud) return cluster } @@ -1009,6 +1011,7 @@ func mustConvertGKEToKubeCluster(t *testing.T, gkeCluster gcp.GKECluster, discov cluster, err := services.NewKubeClusterFromGCPGKE(gkeCluster) require.NoError(t, err) cluster.GetStaticLabels()[types.TeleportInternalDiscoveryGroupName] = discoveryGroup + cluster.SetOrigin(types.OriginCloud) return cluster }