Skip to content

Commit

Permalink
feat: Mark VM as deleted
Browse files Browse the repository at this point in the history
Mark the VM in the spec as deleted and let the reconciliation loop
handle it.

For mocking purpose, I introduced a Clock in ports.Collection.

Changed the event to Update event from Delete event. For the
reconciliation loop, they are the same. Let me know if we still want to
use the Delete event.

fixes #74
  • Loading branch information
yitsushi committed Oct 8, 2021
1 parent 7b5ff28 commit dca8227
Show file tree
Hide file tree
Showing 16 changed files with 257 additions and 167 deletions.
44 changes: 20 additions & 24 deletions api/services/microvm/v1alpha1/microvms.pb.go

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

44 changes: 35 additions & 9 deletions api/services/microvm/v1alpha1/microvms.pb.gw.go

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

2 changes: 1 addition & 1 deletion api/services/microvm/v1alpha1/microvms.proto
Original file line number Diff line number Diff line change
Expand Up @@ -93,4 +93,4 @@ message ListMicroVMsResponse {

message ListMessage {
reignite.types.MicroVMSpec microvm = 1;
}
}
5 changes: 5 additions & 0 deletions api/services/microvm/v1alpha1/microvms.swagger.json
Original file line number Diff line number Diff line change
Expand Up @@ -323,6 +323,11 @@
"type": "string",
"format": "date-time",
"description": "UpdatedAt indicates the time the microvm was last updated."
},
"deletedAt": {
"type": "string",
"format": "date-time",
"description": "DeletedAt indicates the time the microvm was marked as deleted."
}
},
"description": "MicroVMSpec represents the specification for a microvm."
Expand Down
9 changes: 2 additions & 7 deletions api/services/microvm/v1alpha1/microvms_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 dca8227

Please sign in to comment.