Skip to content
This repository has been archived by the owner on Oct 9, 2023. It is now read-only.

Commit

Permalink
add composable PluginCleanupPolicy
Browse files Browse the repository at this point in the history
Signed-off-by: Claire McGinty <[email protected]>
  • Loading branch information
clairemcginty committed Aug 23, 2021
1 parent 892f35e commit e3c19e5
Show file tree
Hide file tree
Showing 2 changed files with 35 additions and 0 deletions.
30 changes: 30 additions & 0 deletions go/tasks/pluginmachinery/k8s/mocks/plugin_cleanup_policy.go

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

5 changes: 5 additions & 0 deletions go/tasks/pluginmachinery/k8s/plugin.go
Original file line number Diff line number Diff line change
Expand Up @@ -91,3 +91,8 @@ type Plugin interface {
// Properties desired by the plugin
GetProperties() PluginProperties
}

// Defines functions to clean up the resource object after the task has been completed or cancelled.
type PluginCleanupPolicy interface {
OnAbort(ctx context.Context, kubeClient client.Client, resource client.Object) error
}

0 comments on commit e3c19e5

Please sign in to comment.