Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
139 changes: 118 additions & 21 deletions api/platformd/workload/v1alpha2/api.pb.go

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

8 changes: 8 additions & 0 deletions api/platformd/workload/v1alpha2/api.proto
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ option go_package = "github.com/spacechunks/explorer/api/platformd/workload/v1al

service WorkloadService {
rpc WorkloadStatus(WorkloadStatusRequest) returns (WorkloadStatusResponse);
rpc StopWorkload(WorkloadStopRequest) returns (WorkloadStopResponse);
}

message WorkloadStatusRequest {
Expand All @@ -35,4 +36,11 @@ message WorkloadStatusRequest {

message WorkloadStatusResponse {
platformd.workload.v1alpha2.WorkloadStatus status = 1;
}

message WorkloadStopRequest {
string id = 1;
}

message WorkloadStopResponse {
}
38 changes: 38 additions & 0 deletions api/platformd/workload/v1alpha2/api_grpc.pb.go

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

74 changes: 74 additions & 0 deletions internal/mock/v1alpha2_workload_service_client.go

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

2 changes: 1 addition & 1 deletion platformd/reconciler.go
Original file line number Diff line number Diff line change
Expand Up @@ -256,7 +256,7 @@ func (r *reconciler) handleInstanceCreation(ctx context.Context, instance *insta
if st := r.store.Get(id); st != nil &&
st.WorkloadStatus != nil &&
st.WorkloadStatus.State != status.WorkloadStateCreating {
r.logger.InfoContext(ctx, "skip")
r.logger.InfoContext(ctx, "skip", "instance_id", id)
return nil
}

Expand Down
2 changes: 1 addition & 1 deletion platformd/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ func (s *Server) Run(ctx context.Context, cfg Config) error {
)

proxyServer = proxy.NewServer(proxySvc)
wlServer = workload.NewServer(statusStore)
wlServer = workload.NewServer(statusStore, wlSvc)
checkServer = checkpoint.NewServer(checkSvc)
reconciler = newReconciler(s.logger, reconcilerConfig{
MaxAttempts: cfg.MaxAttempts,
Expand Down
Loading
Loading