-
Notifications
You must be signed in to change notification settings - Fork 1.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
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
web/packages/teleterm/src/ui/uri.ts
Outdated
return generatePath( | ||
paths.kubeResourceNamespaceLeaf, | ||
params as any | ||
) as string; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
) as string; | |
) as LeafClusterKubeResourceNamespaceUri; |
web/packages/teleterm/src/ui/uri.ts
Outdated
params as any | ||
) as string; | ||
} else { | ||
return generatePath(paths.kubeResourceNamespace, params as any) as string; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
think you meant RootClusterKubeResourceNamespaceUri
, so i went with that
lib/teleterm/api/uri/uri.go
Outdated
@@ -189,6 +206,12 @@ func (r ResourceURI) AppendKube(name string) ResourceURI { | |||
return r | |||
} | |||
|
|||
// 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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
lib/teleterm/daemon/daemon.go
Outdated
return nil, trace.Wrap(err) | ||
} | ||
|
||
var proxyGRPCClient kubeproto.KubeServiceClient |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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