Skip to content

Commit

Permalink
PMM-8172 Add rpc CheckForOperatorUpdate (#746)
Browse files Browse the repository at this point in the history
* Add rpc CheckForOperatorUpdate
  • Loading branch information
Jan Prukner authored Jul 12, 2021
1 parent 72e6eca commit d22a601
Show file tree
Hide file tree
Showing 9 changed files with 1,254 additions and 88 deletions.
513 changes: 425 additions & 88 deletions api/managementpb/dbaas/components.pb.go

Large diffs are not rendered by default.

81 changes: 81 additions & 0 deletions api/managementpb/dbaas/components.pb.gw.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

26 changes: 26 additions & 0 deletions api/managementpb/dbaas/components.proto
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,25 @@ message ChangePXCComponentsRequest {

message ChangePXCComponentsResponse {}

message CheckForOperatorUpdateRequest {}

// ComponentUpdateInformation contains version we can update to for certain component.
message ComponentUpdateInformation {
string available_version = 1;
}

// ComponentsUpdateInformation contains info about components and their available latest versions.
message ComponentsUpdateInformation {
// component_to_update_information stores, under the name of the component, information about the update.
// "pxc-operator", "psmdb-operator" are names used by backend for our operators.
map<string, ComponentUpdateInformation> component_to_update_information = 1;
}

message CheckForOperatorUpdateResponse {
// The cluster name is used as a key for this map, value contains components and their inforamtion about update.
map<string, ComponentsUpdateInformation> cluster_to_components = 1;
}

// Components service provides public methods for managing components.
service Components {
// GetPSMDBComponents returns list of available components for PSMDB Clusters.
Expand Down Expand Up @@ -132,4 +151,11 @@ service Components {
body: "*"
};
}
// CheckForOperatorUpdate checks if a new version of an operator is available.
rpc CheckForOperatorUpdate(CheckForOperatorUpdateRequest) returns (CheckForOperatorUpdateResponse) {
option (google.api.http) = {
post: "/v1/management/DBaaS/Components/CheckForOperatorUpdate"
body: "*"
};
}
}
14 changes: 14 additions & 0 deletions api/managementpb/dbaas/components.validator.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit d22a601

Please sign in to comment.