controllers

package
v0.0.0-...-038639a Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetCustomDataConfigMapName

func GetCustomDataConfigMapName(instance interface{}, workflowStepNum int) string

func GetEnvVarsConfigMapName

func GetEnvVarsConfigMapName(instance interface{}, workflowStepNum int) string

Types

type Reconciler

type Reconciler struct {
	Client  client.Client
	Kclient kubernetes.Interface
	Log     logr.Logger
	Scheme  *runtime.Scheme
}

func (*Reconciler) AcquireLock

func (r *Reconciler) AcquireLock(ctx context.Context, instance client.Object, h *helper.Helper, parallel bool) bool

func (*Reconciler) CheckSecretExists

func (r *Reconciler) CheckSecretExists(ctx context.Context, instance client.Object, secretName string) bool

func (*Reconciler) CompletedJobExists

func (r *Reconciler) CompletedJobExists(ctx context.Context, instance client.Object, workflowStepNum int) bool

func (*Reconciler) EnsureLogsPVCExists

func (r *Reconciler) EnsureLogsPVCExists(
	ctx context.Context,
	instance client.Object,
	helper *helper.Helper,
	NamePVC string,
	labels map[string]string,
	StorageClassName string) (ctrl.Result, error)

func (*Reconciler) GetClient

func (r *Reconciler) GetClient() client.Client

func (*Reconciler) GetDefaultBool

func (r *Reconciler) GetDefaultBool(variable bool) string

func (*Reconciler) GetDefaultInt

func (r *Reconciler) GetDefaultInt(variable int64) string

func (*Reconciler) GetJobName

func (r *Reconciler) GetJobName(instance interface{}, workflowStepNum int) string

func (*Reconciler) GetLogDirName

func (r *Reconciler) GetLogDirName(frameworkName string, instance client.Object, workflowStepNum int) string

func (*Reconciler) GetLogger

func (r *Reconciler) GetLogger() logr.Logger

func (*Reconciler) GetScheme

func (r *Reconciler) GetScheme() *runtime.Scheme

func (*Reconciler) GetWorkflowConfigMapName

func (r *Reconciler) GetWorkflowConfigMapName(instance client.Object) string

func (*Reconciler) JobExists

func (r *Reconciler) JobExists(ctx context.Context, instance client.Object, workflowStepNum int) bool

func (*Reconciler) OverwriteValueWithWorkflow

func (r *Reconciler) OverwriteValueWithWorkflow(
	ctx context.Context,
	instance v1beta1.TobikoSpec,
	sectionName string,
	workflowValueType string,
	workflowStepNum int,
) interface{}

func (*Reconciler) ReleaseLock

func (r *Reconciler) ReleaseLock(ctx context.Context, instance client.Object) bool

func (*Reconciler) WorkflowStepCounterCreate

func (r *Reconciler) WorkflowStepCounterCreate(ctx context.Context, instance client.Object, h *helper.Helper) bool

func (*Reconciler) WorkflowStepCounterIncrease

func (r *Reconciler) WorkflowStepCounterIncrease(ctx context.Context, instance client.Object, h *helper.Helper) bool

func (*Reconciler) WorkflowStepCounterRead

func (r *Reconciler) WorkflowStepCounterRead(ctx context.Context, instance client.Object, h *helper.Helper) int

type TempestReconciler

type TempestReconciler struct {
	Reconciler
}

func (*TempestReconciler) Reconcile

func (r *TempestReconciler) Reconcile(ctx context.Context, req ctrl.Request) (result ctrl.Result, _err error)

Reconcile - Tempest

func (*TempestReconciler) SetupWithManager

func (r *TempestReconciler) SetupWithManager(mgr ctrl.Manager) error

SetupWithManager sets up the controller with the Manager.

type TobikoReconciler

type TobikoReconciler struct {
	Reconciler
}

TobikoReconciler reconciles a Tobiko object

func (*TobikoReconciler) EnsureTobikoCloudsYAML

func (r *TobikoReconciler) EnsureTobikoCloudsYAML(ctx context.Context, instance client.Object, helper *helper.Helper, labels map[string]string) (ctrl.Result, error)

Tobiko requires password value to be present in clouds.yaml This code ensures that we set a default value of 12345678 when password value is missing in the clouds.yaml

func (*TobikoReconciler) PrepareTobikoEnvVars

func (r *TobikoReconciler) PrepareTobikoEnvVars(
	ctx context.Context,
	labels map[string]string,
	instance *testv1beta1.Tobiko,
	helper *helper.Helper,
	step int,
) map[string]env.Setter

This function prepares env variables for a single workflow step.

func (*TobikoReconciler) Reconcile

func (r *TobikoReconciler) Reconcile(ctx context.Context, req ctrl.Request) (ctrl.Result, error)

Reconcile is part of the main kubernetes reconciliation loop which aims to move the current state of the cluster closer to the desired state. For more details, check Reconcile and its Result here: - https://pkg.go.dev/sigs.k8s.io/controller-runtime@v0.14.1/pkg/reconcile

func (*TobikoReconciler) SetupWithManager

func (r *TobikoReconciler) SetupWithManager(mgr ctrl.Manager) error

SetupWithManager sets up the controller with the Manager.

Jump to

Keyboard shortcuts

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