plugins

package
v0.0.0-...-5ee5d88 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 18, 2024 License: Apache-2.0 Imports: 20 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IsJobFinishedWithFailed

func IsJobFinishedWithFailed(jobStatus *batchv1.JobStatus) bool

IsJobFinishedWithFailed checks whether the given Job has finished execution with failed condition.

Types

type DeploymentPlugin

type DeploymentPlugin struct{}

func NewDeploymentPlugin

func NewDeploymentPlugin() *DeploymentPlugin

func (*DeploymentPlugin) AggregateStatuses

func (receiver *DeploymentPlugin) AggregateStatuses(
	ctx context.Context,
	sourceObject *unstructured.Unstructured,
	fedObject fedcorev1a1.GenericFederatedObject,
	clusterObjs map[string]interface{},
	clusterObjsUpToDate bool,
) (*unstructured.Unstructured, bool, error)

type JobPlugin

type JobPlugin struct{}

func NewJobPlugin

func NewJobPlugin() *JobPlugin

func (*JobPlugin) AggregateStatuses

func (receiver *JobPlugin) AggregateStatuses(
	ctx context.Context,
	sourceObject *unstructured.Unstructured,
	fedObject fedcorev1a1.GenericFederatedObject,
	clusterObjs map[string]interface{},
	clusterObjsUpToDate bool,
) (*unstructured.Unstructured, bool, error)

type Plugin

type Plugin interface {
	// AggregateStatuses aggregates member cluster object statues to source object status and returns the latter
	AggregateStatuses(
		ctx context.Context,
		sourceObject *unstructured.Unstructured,
		fedObject fedcorev1a1.GenericFederatedObject,
		clusterObjs map[string]interface{},
		clusterObjsUpToDate bool,
	) (*unstructured.Unstructured, bool, error)
}

func GetPlugin

func GetPlugin(gvk schema.GroupVersionKind) Plugin

type PodPlugin

type PodPlugin struct{}

func NewPodPlugin

func NewPodPlugin() *PodPlugin

func (*PodPlugin) AggregateStatuses

func (receiver *PodPlugin) AggregateStatuses(
	ctx context.Context,
	sourceObject *unstructured.Unstructured,
	fedObject fedcorev1a1.GenericFederatedObject,
	clusterObjs map[string]interface{},
	clusterObjsUpToDate bool,
) (*unstructured.Unstructured, bool, error)

type SingleClusterPlugin

type SingleClusterPlugin struct{}

func NewSingleClusterPlugin

func NewSingleClusterPlugin() *SingleClusterPlugin

NewSingleClusterPlugin aggregates status for resources that are only dispatched to a single cluster, such as Job, StatefulSet.

func (*SingleClusterPlugin) AggregateStatuses

func (receiver *SingleClusterPlugin) AggregateStatuses(
	ctx context.Context,
	sourceObject *unstructured.Unstructured,
	fedObject fedcorev1a1.GenericFederatedObject,
	clusterObjs map[string]interface{},
	clusterObjsUpToDate bool,
) (*unstructured.Unstructured, bool, error)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL