Skip to content

Commit 6866536

Browse files
committed
feat: add mgmt endpoint & cli command for infra machine reboot
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]>
1 parent 7052e8b commit 6866536

File tree

12 files changed

+922
-142
lines changed

12 files changed

+922
-142
lines changed

client/api/omni/management/management.pb.go

+260-139
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

client/api/omni/management/management.pb.gw.go

+63
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

client/api/omni/management/management.proto

+10
Original file line numberDiff line numberDiff line change
@@ -172,6 +172,15 @@ message ReadAuditLogResponse {
172172
bytes audit_log = 1;
173173
}
174174

175+
message RebootMachineRequest {
176+
string machine_id = 1;
177+
}
178+
179+
message RebootMachineResponse {
180+
string reboot_id = 1;
181+
google.protobuf.Timestamp last_reboot_timestamp = 3;
182+
}
183+
175184
service ManagementService {
176185
rpc Kubeconfig(KubeconfigRequest) returns (KubeconfigResponse);
177186
rpc Talosconfig(TalosconfigRequest) returns (TalosconfigResponse);
@@ -187,4 +196,5 @@ service ManagementService {
187196
rpc CreateSchematic(CreateSchematicRequest) returns (CreateSchematicResponse);
188197
rpc GetSupportBundle(GetSupportBundleRequest) returns (stream GetSupportBundleResponse);
189198
rpc ReadAuditLog(ReadAuditLogRequest) returns (stream ReadAuditLogResponse);
199+
rpc RebootMachine(RebootMachineRequest) returns (RebootMachineResponse);
190200
}

client/api/omni/management/management_grpc.pb.go

+38
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)