Teleterm: Add listing kube resources endpoint#46753
Conversation
This comment was marked as resolved.
This comment was marked as resolved.
86815ca to
5ee774f
Compare
34aadea to
ecc4409
Compare
724eb86 to
6251b55
Compare
| return generatePath( | ||
| paths.kubeResourceNamespaceLeaf, | ||
| params as any | ||
| ) as string; |
There was a problem hiding this comment.
| ) as string; | |
| ) as LeafClusterKubeResourceNamespaceUri; |
| params as any | ||
| ) as string; | ||
| } else { | ||
| return generatePath(paths.kubeResourceNamespace, params as any) as string; |
There was a problem hiding this comment.
| return generatePath(paths.kubeResourceNamespace, params as any) as string; | |
| return generatePath(paths.kubeResourceNamespace, params as any) as KubeResourceNamespaceUri; |
There was a problem hiding this comment.
think you meant RootClusterKubeResourceNamespaceUri, so i went with that
| } | ||
|
|
||
| // AppendKubeResourceNamespace appends kube resource namespace segment to the URI. | ||
| func (r ResourceURI) AppendKubeResourceNamespace(kubeClusterName string, kubeNamespaceName string) ResourceURI { |
There was a problem hiding this comment.
I think this should accept just kubeNameSpaceName string as an argument, with the intention that if you want to make a URI to a kube namespace, you'd do something like uri.NewClusterURI(profileName).AppendKube(kubeClusterName).AppendKubeNamespace(kubeNamespaceName).
AppendLeafCluster already follows a similar approach, though AppendKubeResourceNamespace does not need to handle that extra case with name == "" like AppendLeafCluster does.
| return nil, trace.Wrap(err) | ||
| } | ||
|
|
||
| var proxyGRPCClient kubeproto.KubeServiceClient |
There was a problem hiding this comment.
This is no longer needed, as in the client can just stay defined within AddMetadataToRetryableError. Maybe we could also name it kubenetesServiceClient or something along those lines? proxyGRPCClient makes it sound like it's used for more than just k8s, but it's actually heavily focused on k8s only.
6251b55 to
21bed0c
Compare
|
/excludeflake * |
4dda04e to
e4c646e
Compare
* Rename makeLabels into MakeUILabelsWithoutInternalPrefixes * Teleterm: add listing kube resource endpoint * Teleterm pb updates * Renames, moves test, fix imports, address CRS
* Rename makeLabels into MakeUILabelsWithoutInternalPrefixes * Teleterm: add listing kube resource endpoint * Teleterm pb updates * Renames, moves test, fix imports, address CRS
* Teleterm: Add listing kube resources endpoint (#46753) * Rename makeLabels into MakeUILabelsWithoutInternalPrefixes * Teleterm: add listing kube resource endpoint * Teleterm pb updates * Renames, moves test, fix imports, address CRS * Straggling file from make grpc
part of #46742
easier to review by commit
Adds a new grpc endpoint and related boilerplates for listing kube resources
if confused what is the difference between the other endpoint where we list kubes, kube resources refers to kube_cluster's sub resources:
teleport/api/types/constants.go
Line 1233 in 110b23a