Skip to main content

NewSetupContext

Creates a SetupContext implementation for the executor.

def NewSetupContext(
kubeClient: pluginsCore.KubeClient,
secretManager: pluginsCore.SecretManager,
resourceRegistrar: pluginsCore.ResourceRegistrar,
enqueueOwner: pluginsCore.EnqueueOwner,
enqueueLabels: []string,
ownerKind: string,
metricsScope: promutils.Scope
) - > pluginsCore.SetupContext

Creates a SetupContext implementation for the executor.

Parameters

NameTypeDescription
kubeClientpluginsCore.KubeClientThe Kubernetes client to interact with the Kubernetes API.
secretManagerpluginsCore.SecretManagerThe secret manager to handle secrets.
resourceRegistrarpluginsCore.ResourceRegistrarThe resource registrar to register resources.
enqueueOwnerpluginsCore.EnqueueOwnerThe mechanism to enqueue owner objects for processing.
enqueueLabels[]stringA slice of labels used for enqueuing owner objects.
ownerKindstringThe kind of the owner object.
metricsScopepromutils.ScopeThe Prometheus metrics scope for reporting metrics.

Returns

TypeDescription
pluginsCore.SetupContextA new SetupContext implementation.