Skip to content

Commit

Permalink
feat: add mgmt endpoint & cli command for infra machine reboot
Browse files Browse the repository at this point in the history
Introduce a new mgmt endpoint to reboot an infra machine and wait for the reboot request to be processed by the respective infra provider. It does the heavy lifting of modifying/waiting for the resources.

Additionally:
- In the `InfraMachineController`, to verify that the machine info was collected before powering it off, check the `TalosVersion` on the `MachineStatus` instead of `SecureBootStatus`. It is a more suitable field to check this.
- Rename the infra provider label prefix format from being `omni.sidero.dev/infra-provider[provider-id]/key=value` to be `omni.sidero.dev/infra-provider/provider-id/key=value`.

Signed-off-by: Utku Ozdemir <[email protected]>
  • Loading branch information
utkuozdemir committed Jan 10, 2025
1 parent 7052e8b commit 6866536
Show file tree
Hide file tree
Showing 12 changed files with 922 additions and 142 deletions.
399 changes: 260 additions & 139 deletions client/api/omni/management/management.pb.go

Large diffs are not rendered by default.

63 changes: 63 additions & 0 deletions client/api/omni/management/management.pb.gw.go

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

10 changes: 10 additions & 0 deletions client/api/omni/management/management.proto
Original file line number Diff line number Diff line change
Expand Up @@ -172,6 +172,15 @@ message ReadAuditLogResponse {
bytes audit_log = 1;
}

message RebootMachineRequest {
string machine_id = 1;
}

message RebootMachineResponse {
string reboot_id = 1;
google.protobuf.Timestamp last_reboot_timestamp = 3;
}

service ManagementService {
rpc Kubeconfig(KubeconfigRequest) returns (KubeconfigResponse);
rpc Talosconfig(TalosconfigRequest) returns (TalosconfigResponse);
Expand All @@ -187,4 +196,5 @@ service ManagementService {
rpc CreateSchematic(CreateSchematicRequest) returns (CreateSchematicResponse);
rpc GetSupportBundle(GetSupportBundleRequest) returns (stream GetSupportBundleResponse);
rpc ReadAuditLog(ReadAuditLogRequest) returns (stream ReadAuditLogResponse);
rpc RebootMachine(RebootMachineRequest) returns (RebootMachineResponse);
}
38 changes: 38 additions & 0 deletions client/api/omni/management/management_grpc.pb.go

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

Loading

0 comments on commit 6866536

Please sign in to comment.