moduleensurecrds

package
v1.24.3 Latest Latest
Warning

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

Go to latest
Published: Jul 16, 2026 License: Apache-2.0 Imports: 16 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RegisterTaskHandler

func RegisterTaskHandler(svc TaskDependencies) func(t sh_task.Task, logger *log.Logger) task.Task

RegisterTaskHandler creates a factory function for ModuleEnsureCRDs tasks

Types

type Task

type Task struct {
	// contains filtered or unexported fields
}

Task handles ensuring CRDs for modules

func NewTask

func NewTask(
	shellTask sh_task.Task,
	kubeClient *klient.Client,
	moduleManager *module_manager.ModuleManager,
	convergeState *converge.ConvergeState,
	queueService *taskqueue.Service,
	crdExtraLabels map[string]string,
	discoveredGVKs *discovercrds.DiscoveredGVKs,
	logger *log.Logger,
) *Task

NewTask creates a new task handler for ensuring module CRDs

func (*Task) CheckCRDsEnsured

func (s *Task) CheckCRDsEnsured(t sh_task.Task)

CheckCRDsEnsured checks if there any other ModuleEnsureCRDs tasks in the queue and if there aren't, sets ConvergeState.CRDsEnsured to true and applies global values patch with the discovered GVKs

func (*Task) EnsureCRDs

func (s *Task) EnsureCRDs(module *modules.BasicModule) ([]string, error)

func (*Task) Handle

func (s *Task) Handle(ctx context.Context) queue.TaskResult

type TaskDependencies

type TaskDependencies interface {
	GetKubeClient() *klient.Client
	GetModuleManager() *module_manager.ModuleManager
	GetConvergeState() *converge.ConvergeState
	GetCRDExtraLabels() map[string]string
	GetQueueService() *taskqueue.Service
	GetDiscoveredGVKs() *discovercrds.DiscoveredGVKs
}

TaskDependencies defines the interface for accessing necessary components

Jump to

Keyboard shortcuts

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