update discovery labels#28917
Merged
GavinFrazar merged 8 commits intomasterfrom Jul 18, 2023
Merged
Conversation
* move all labels into api/types/constants.go * add name override labels for GKE and AKS that are allowed tag names in GCP and Azure
tigrato
reviewed
Jul 12, 2023
fspmarshall
approved these changes
Jul 12, 2023
ptgott
approved these changes
Jul 14, 2023
Contributor
ptgott
left a comment
There was a problem hiding this comment.
Good to go from a docs standpoint
mdwn
approved these changes
Jul 18, 2023
|
@GavinFrazar See the table below for backport results.
|
GavinFrazar
added a commit
that referenced
this pull request
Jul 18, 2023
Backport #28917 to branch/v12 * update discovery labels and name overrides * move all labels into api/types/constants.go * add name override labels for GKE and AKS that are allowed tag names in GCP and Azure * support legacy and cloud-agnostic name override labels for AWS * add tests for creating kube clusters from cloud kube clusters
github-merge-queue Bot
pushed a commit
that referenced
this pull request
Jul 19, 2023
Backport #28917 to branch/v12 * update discovery labels and name overrides * move all labels into api/types/constants.go * add name override labels for GKE and AKS that are allowed tag names in GCP and Azure * support legacy and cloud-agnostic name override labels for AWS * add tests for creating kube clusters from cloud kube clusters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR fixes:
It also moves all the labels created by discovery services into
api/constants.go.This is to make these labels visible and accessible elsewhere in the code, and hopefully to prevent further redundant labels from being created.
For instance, we are adding the label
teleport.dev/aws-regionfor discovered EC2 instances, but for kube clusters and databases we are adding the labelregionfor the AWS region they are discovered in. Likewise for AWS account ID. I think keeping these labels all in the constants file will make it easier to keep track of them, reference them, and reuse them in code.The changes relevant to #28803 are:
"TeleportKubernetesName"setDBNameandsetKubeNamein lib/services to be cloud-specific and pass through a commonsetResourceNamehelper func that takes the override label to check for as an arg.