sandbox: add update api for controller

Signed-off-by: Abel Feng <fshb1988@gmail.com>
This commit is contained in:
Abel Feng
2024-02-28 10:39:57 +08:00
committed by f00589305
parent e49d3fd1bc
commit 15887d7efc
20 changed files with 1216 additions and 752 deletions

View File

@@ -111,6 +111,9 @@ type Controller interface {
Shutdown(ctx context.Context, sandboxID string) error
// Metrics queries the sandbox for metrics.
Metrics(ctx context.Context, sandboxID string) (*types.Metric, error)
// Update changes a part of sandbox, such as extensions/annotations/labels/spec of
// Sandbox object, controllers may have to update the running sandbox according to the changes.
Update(ctx context.Context, sandboxID string, sandbox Sandbox, fields ...string) error
}
type ControllerInstance struct {