taskrun

package
v0.0.0-...-7fa3f60 Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const (
	SecretPrefix   = "multi-platform-ssh-"
	ConfigMapLabel = "build.appstudio.redhat.com/multi-platform-config"

	MultiPlatformSecretLabel = "build.appstudio.redhat.com/multi-platform-secret"

	AssignedHost           = "build.appstudio.redhat.com/assigned-host"
	FailedHosts            = "build.appstudio.redhat.com/failed-hosts"
	CloudInstanceId        = "build.appstudio.redhat.com/cloud-instance-id"
	CloudFailures          = "build.appstudio.redhat.com/cloud-failure-count"
	CloudAddress           = "build.appstudio.redhat.com/cloud-address"
	CloudDynamicPlatform   = "build.appstudio.redhat.com/cloud-dynamic-platform"
	ProvisionTaskProcessed = "build.appstudio.redhat.com/provision-task-processed"
	ProvisionTaskFinalizer = "build.appstudio.redhat.com/provision-task-finalizer"

	//AllocationStartTimeAnnotation Some allocations can take multiple calls, we track the actual start time in this annotation
	AllocationStartTimeAnnotation = "build.appstudio.redhat.com/allocation-start-time"
	//BuildStartTimeAnnotation The time the build actually starts
	BuildStartTimeAnnotation = "build.appstudio.redhat.com/build-start-time"

	UserTaskName      = "build.appstudio.redhat.com/user-task-name"
	UserTaskNamespace = "build.appstudio.redhat.com/user-task-namespace"

	WaitingForPlatformLabel = "build.appstudio.redhat.com/waiting-for-platform"
	PipelineFinalizer       = "appstudio.io/multi-platform-finalizer"
	HostConfig              = "host-config"

	TaskTypeLabel                = "build.appstudio.redhat.com/task-type"
	TaskTargetPlatformAnnotation = "build.appstudio.redhat.com/task-platform"
	TaskTypeProvision            = "provision"
	TaskTypeUpdate               = "update"
	TaskTypeClean                = "clean"

	ServiceAccountName = "multi-platform-controller"

	PlatformParam          = "PLATFORM"
	DynamicPlatforms       = "dynamic-platforms"
	DynamicPoolPlatforms   = "dynamic-pool-platforms"
	AllowedNamespaces      = "allowed-namespaces"
	MultiPlatformSubsystem = "multi_platform_controller"
)

Variables

This section is empty.

Functions

func SetupNewReconcilerWithManager

func SetupNewReconcilerWithManager(mgr ctrl.Manager, operatorNamespace string) error

func UpdateHostPools

func UpdateHostPools(operatorNamespace string, client client.Client, log *logr.Logger)

UpdateHostPools Run the host update task periodically

Types

type DynamicHostPool

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

func (DynamicHostPool) Allocate

func (a DynamicHostPool) Allocate(r *ReconcileTaskRun, ctx context.Context, log *logr.Logger, tr *v1.TaskRun, secretName string) (reconcile.Result, error)

func (DynamicHostPool) Deallocate

func (a DynamicHostPool) Deallocate(r *ReconcileTaskRun, ctx context.Context, log *logr.Logger, tr *v1.TaskRun, secretName string, selectedHost string) error

func (DynamicHostPool) InstanceTag

func (a DynamicHostPool) InstanceTag() string

type DynamicResolver

type DynamicResolver struct {
	cloud.CloudProvider
	// contains filtered or unexported fields
}

func (DynamicResolver) Allocate

func (r DynamicResolver) Allocate(taskRun *ReconcileTaskRun, ctx context.Context, log *logr.Logger, tr *v1.TaskRun, secretName string) (reconcile.Result, error)

func (DynamicResolver) Deallocate

func (r DynamicResolver) Deallocate(taskRun *ReconcileTaskRun, ctx context.Context, log *logr.Logger, tr *v1.TaskRun, secretName string, selectedHost string) error

type Host

type Host struct {
	Address     string
	Name        string
	User        string
	Concurrency int
	Platform    string
	Secret      string
	StartTime   *time.Time // Only used for the dynamic pool
}

type HostPool

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

func (HostPool) Allocate

func (hp HostPool) Allocate(r *ReconcileTaskRun, ctx context.Context, log *logr.Logger, tr *v1.TaskRun, secretName string) (reconcile.Result, error)

func (HostPool) Deallocate

func (hp HostPool) Deallocate(r *ReconcileTaskRun, ctx context.Context, log *logr.Logger, tr *v1.TaskRun, secretName string, selectedHost string) error

type PlatformConfig

type PlatformConfig interface {
	Allocate(r *ReconcileTaskRun, ctx context.Context, log *logr.Logger, tr *v1.TaskRun, secretName string) (reconcile.Result, error)
	Deallocate(r *ReconcileTaskRun, ctx context.Context, log *logr.Logger, tr *v1.TaskRun, secretName string, selectedHost string) error
}

type PlatformMetrics

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

type ReconcileTaskRun

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

func (*ReconcileTaskRun) Reconcile

func (r *ReconcileTaskRun) Reconcile(ctx context.Context, request reconcile.Request) (reconcile.Result, error)

Jump to

Keyboard shortcuts

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