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

Commit

Permalink
Add support for custom KubeClient
Browse files Browse the repository at this point in the history
Signed-off-by: Filipe Regadas <[email protected]>
  • Loading branch information
regadas committed Mar 9, 2021
1 parent 8211c56 commit ca00149
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions go/tasks/pluginmachinery/k8s/plugin.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,14 @@ type PluginEntry struct {
// support the same task type. This must be a subset of RegisteredTaskTypes and at most one default per task type
// is supported.
DefaultForTaskTypes []pluginsCore.TaskType
// Returns a new KubeClient to be used instead of the internal controller-runtime client.
NewKubeClient func(ctx context.Context) (pluginsCore.KubeClient, error)
// Boolean that indicates if kubernetes resources that this plugin is responsible for should include OwnerReferences.
// Ingoring is only useful if resources will be created in a remote cluster.
OverrideInjectOwnerReferences *bool
// Boolean flag that indicates if a finalizer should be injected.
// This will override the `inject-finalizer` set under k8s config.
OverrideInjectFinalizer *bool
}

// Special context passed in to plugins when checking task phase
Expand Down

0 comments on commit ca00149

Please sign in to comment.