-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
Add tctl resource commands for AutoUpdateConfig and AutoUpdateVersion #46771
Conversation
…-resource-command
tool/tctl/common/resource_command.go
Outdated
serviceClient := autoupdatev1pb.NewAutoUpdateServiceClient(client.GetConnection()) | ||
config, err := serviceClient.GetAutoUpdateConfig(ctx, &autoupdatev1pb.GetAutoUpdateConfigRequest{}) |
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.
serviceClient := autoupdatev1pb.NewAutoUpdateServiceClient(client.GetConnection()) | |
config, err := serviceClient.GetAutoUpdateConfig(ctx, &autoupdatev1pb.GetAutoUpdateConfigRequest{}) | |
config, err := client.GetAutoUpdateConfig(ctx) |
tool/tctl/common/resource_command.go
Outdated
serviceClient := autoupdatev1pb.NewAutoUpdateServiceClient(client.GetConnection()) | ||
version, err := serviceClient.GetAutoUpdateVersion(ctx, &autoupdatev1pb.GetAutoUpdateVersionRequest{}) |
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.
serviceClient := autoupdatev1pb.NewAutoUpdateServiceClient(client.GetConnection()) | |
version, err := serviceClient.GetAutoUpdateVersion(ctx, &autoupdatev1pb.GetAutoUpdateVersionRequest{}) | |
version, err := client.GetAutoUpdateVersion(ctx) |
tool/tctl/common/resource_command.go
Outdated
return trace.Wrap(err) | ||
} | ||
|
||
serviceClient := autoupdatev1pb.NewAutoUpdateServiceClient(client.GetConnection()) |
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.
Should the api.Client implement Create/Update/Upsert like it does Get so that users don't need to construct the additional client manually?
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.
Not sure if this is necessary, since from proxy side we going to read-only these resources
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.
The RPCs are exposed via Auth though and any user that has permissions to create/update/get the resource kinds will be able to interact with them via the API client.
…#46771) * Add autoupdate command for resource * Reuse client methods * Implement all exposed auto update methods for service client * Fix linter
…#46771) * Add autoupdate command for resource * Reuse client methods * Implement all exposed auto update methods for service client * Fix linter
…#46771) * Add autoupdate command for resource * Reuse client methods * Implement all exposed auto update methods for service client * Fix linter
In this PR added tctl resource commands for receiving, editing, updating and deleting auto update resources (config and version)