tasks

package
v0.1.4 Latest Latest
Warning

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

Go to latest
Published: Nov 28, 2024 License: Apache-2.0 Imports: 33 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// TaskCollectAll is a meta task, which enqueues all
	// relevant Gardener tasks.
	TaskCollectAll = "g:task:collect-all"

	// TaskLinkAll is the task type for linking all Gardener
	// related objects.
	TaskLinkAll = "g:task:link-all"
)
View Source
const (
	// TaskCollectAWSMachineImages is the name of the task for collecting
	// Machine Images for AWS Cloud Profile type.
	TaskCollectAWSMachineImages = "g:task:collect-aws-machine-images"
)
View Source
const (
	// TaskCollectAzureMachineImages is the name of the task for collecting
	// Machine Images for Azure Cloud Profile type.
	TaskCollectAzureMachineImages = "g:task:collect-azure-machine-images"
)
View Source
const (
	// TaskCollectBackupBuckets is the name of the task for collecting
	// Gardener BackupBuckets resources.
	TaskCollectBackupBuckets = "g:task:collect-backup-buckets"
)
View Source
const (
	// TaskCollectCloudProfiles is the name of the task for collecting
	// Gardener Cloud Profiles.
	TaskCollectCloudProfiles = "g:task:collect-cloud-profiles"
)
View Source
const (
	// TaskCollectGCPMachineImages is the name of the task for collecting
	// Machine Images for GCP Cloud Profile type.
	TaskCollectGCPMachineImages = "g:task:collect-gcp-machine-images"
)
View Source
const (
	// TaskCollectMachines is the name of the task for collecting Gardener
	// Machines.
	TaskCollectMachines = "g:task:collect-machines"
)
View Source
const (
	// TaskCollectPersistentVolumes is the name of the task for collecting Gardener
	// PVs.
	TaskCollectPersistentVolumes = "g:task:collect-persistent-volumes"
)
View Source
const (
	// TaskCollectProjects is the name of the task for collecting Gardener
	// Projects.
	TaskCollectProjects = "g:task:collect-projects"
)
View Source
const (
	// TaskCollectSeeds is the name of the task for collecting Gardener
	// Seeds.
	TaskCollectSeeds = "g:task:collect-seeds"
)
View Source
const (
	// TaskCollectShoots is the name of the task for collecting Shoots.
	TaskCollectShoots = "g:task:collect-shoots"
)

Variables

View Source
var ErrDriverNotSupported = errors.New("driver not supported")

ErrDriverNotSupported is an error, which is returned when the an unknown CSI driver is parsed.

View Source
var ErrNoCloudProfileName = errors.New("no cloud profile name specified")

ErrMissingCloudProfileName is returned when an expected cloud profile name is missing from the payload.

View Source
var ErrNoPayload = errors.New("no payload specified")

ErrNoPayload is an error, which is returned by task handlers, which expect payload, but none was provided.

View Source
var ErrNoProviderConfig = errors.New("no provider config specified")

ErrMissingProviderConfig is returned when an expected provider config is missing from the payload.

View Source
var ErrNoSeedCluster = errors.New("no seed cluster specified")

ErrNoSeedCluster is an error, which is returned when an expected Seed Cluster was not specified.

View Source
var ErrNoVirtualGardenClientFound = errors.New("no virtual garden client found")

ErrNoVirtualGardenClientFound is an error, which is returned when no Virtual Garden client was found.

Functions

func DriverNotSupported added in v0.1.4

func DriverNotSupported(driver string) error

DriverNotSupported wraps ErrDriverNotSupported with the given driver name.

func HandleCollectAWSMachineImagesTask

func HandleCollectAWSMachineImagesTask(ctx context.Context, t *asynq.Task) error

HandleCollectAWSMachineImagesTask is the handler for collecting Machine Images for AWS Cloud Profile type.

func HandleCollectAllTask

func HandleCollectAllTask(ctx context.Context, t *asynq.Task) error

HandleCollectAllTask is the handler, which enqueues tasks for collecting all known Gardener resources.

func HandleCollectAzureMachineImagesTask added in v0.1.1

func HandleCollectAzureMachineImagesTask(ctx context.Context, t *asynq.Task) error

HandleCollectAzureMachineImagesTask is the handler for collecting Machine Images for Azure Cloud Profile type.

func HandleCollectBackupBucketsTask

func HandleCollectBackupBucketsTask(ctx context.Context, t *asynq.Task) error

HandleCollectBackupBucketsTask is the handler for collecting BackupBuckets.

func HandleCollectCloudProfilesTask

func HandleCollectCloudProfilesTask(ctx context.Context, t *asynq.Task) error

HandleCollectCloudProfilesTask is the handler for collecting Gardener Cloud Profiles. This handler will also enqueue tasks for collecting and persisting the machine images for each supported Cloud Profile type.

func HandleCollectGCPMachineImagesTask

func HandleCollectGCPMachineImagesTask(ctx context.Context, t *asynq.Task) error

HandleCollectGCPMachineImagesTask is the handler for collecting Machine Images for GCP Cloud Profile type.

func HandleCollectMachinesTask

func HandleCollectMachinesTask(ctx context.Context, t *asynq.Task) error

HandleCollectMachinesTask is the handler for collecting Gardener Machines.

func HandleCollectPersistentVolumesTask added in v0.1.4

func HandleCollectPersistentVolumesTask(ctx context.Context, t *asynq.Task) error

HandleCollectPersistentVolumesTask is the handler for collecting Gardener PVs.

func HandleCollectProjectsTask

func HandleCollectProjectsTask(ctx context.Context, t *asynq.Task) error

HandleCollectProjectsTask is the handler that collects Gardener projects.

func HandleCollectSeedsTask

func HandleCollectSeedsTask(ctx context.Context, t *asynq.Task) error

HandleCollectSeedsTask is the handler for collecting Gardener Seeds.

func HandleCollectShootsTask

func HandleCollectShootsTask(ctx context.Context, t *asynq.Task) error

HandleCollectShootsTask is a handler that collects Gardener Shoots.

func HandleLinkAllTask

func HandleLinkAllTask(ctx context.Context, r *asynq.Task) error

HandleLinkAllTask is the handler, which establishes relationships between the various Gardener models.

func LinkAWSImageWithCloudProfile

func LinkAWSImageWithCloudProfile(ctx context.Context, db *bun.DB) error

LinkAWSImageWithCloudProfile creates the relationship between the CloudProfileAWSImage and CloudProfile

func LinkAzureImageWithCloudProfile added in v0.1.1

func LinkAzureImageWithCloudProfile(ctx context.Context, db *bun.DB) error

LinkAzureImageWithCloudProfile creates the relationship between the CloudProfileAzureImage and CloudProfile

func LinkGCPImageWithCloudProfile

func LinkGCPImageWithCloudProfile(ctx context.Context, db *bun.DB) error

LinkGCPImageWithCloudProfile creates the relationship between the CloudProfileGCPImage and CloudProfile

func LinkMachineWithShoot

func LinkMachineWithShoot(ctx context.Context, db *bun.DB) error

LinkMachineWithShoot creates the relationship between the Machine and Shoot

func LinkShootWithProject

func LinkShootWithProject(ctx context.Context, db *bun.DB) error

LinkShootWithProject creates the relationship between the Gardener Shoot and Project.

func LinkShootWithSeed

func LinkShootWithSeed(ctx context.Context, db *bun.DB) error

LinkShootWithSeed creates the relationship between the Shoot and Seed

func NewCollectBackupBucketsTask

func NewCollectBackupBucketsTask() *asynq.Task

NewCollectBackupBucketsTask creates a new asynq.Task for collecting Gardener BackupBuckets, without specifying a payload.

func NewCollectCloudProfilesTask

func NewCollectCloudProfilesTask() *asynq.Task

NewCollectCloudProfilesTask creates a new asynq.Task for collecting Gardener Cloud Profiles., without specifying a payload.

func NewCollectMachinesTask

func NewCollectMachinesTask() *asynq.Task

NewCollectMachinesTask creates a new asynq.Task for collecting Gardener Machines, without specifying a payload.

func NewCollectPersistentVolumesTask added in v0.1.4

func NewCollectPersistentVolumesTask() *asynq.Task

NewCollectPersistentVolumesTask creates a new asynq.Task for collecting Gardener PVs, without specifying a payload.

func NewCollectProjectsTask

func NewCollectProjectsTask() *asynq.Task

NewCollectProjectsTask creates a new asynq.Task for collecting Gardener projects, without specifying a payload.

func NewCollectSeedsTask

func NewCollectSeedsTask() *asynq.Task

NewCollectSeedsTask creates a new asynq.Task for collecting Gardener Seeds, without specifying a payload.

func NewCollectShootsTask

func NewCollectShootsTask() *asynq.Task

NewCollectShootsTask creates a new asynq.Task for collecting Gardener shoots, without specifying a payload.

Types

type CollectCPMachineImagesPayload

type CollectCPMachineImagesPayload struct {
	// ProviderConfig is the raw config, which is specific for each Cloud
	// Profile.
	ProviderConfig []byte `json:"provider_config" yaml:"provider_config"`

	// CloudProfileName is the name of the Cloud Profile.
	CloudProfileName string `json:"cloud_profile_name" yaml:"cloud_profile_name"`
}

CollectCPMachineImagesPayload is the payload for collecting the Machine Images for a given Cloud Profile.

type CollectMachinesPayload

type CollectMachinesPayload struct {
	// Seed is the name of the seed cluster from which to collect Gardener
	// Machines.
	Seed string `json:"seed" yaml:"seed"`
}

CollectMachinesPayload is the payload, which is used for collecting Gardener Machines.

type CollectPersistentVolumesPayload added in v0.1.4

type CollectPersistentVolumesPayload struct {
	// Seed is the name of the seed cluster from which to collect Gardener
	// PVs.
	Seed string `json:"seed" yaml:"seed"`
}

CollectPersistentVolumesPayload is the payload, which is used for collecting Gardener PVs.

Jump to

Keyboard shortcuts

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