Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Improve discovery service name conflict error log (#52023)
Check for an edge case that lead to a confusing error log when the discovery service tries to create a resource that already exists and came from a different origin. The discovery service only has permissions to read/write Teleport resources with the label teleport.dev/origin: "cloud". Additionally, the discovery service tries to resolve an AlreadyExists error by checking that the existing resource has "cloud" origin and is in the same discovery_group as the discovery service. However, it checks the existing resource by consulting its cache, which may not contain the existing resource if the discovery service is not allowed to read it. The error log might say something like "failed to create X ... X doesn't exist", which was confusing. This fixes that error log.
- Loading branch information