controller

package
v0.0.0-...-094a5c3 Latest Latest
Warning

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

Go to latest
Published: May 21, 2024 License: Apache-2.0 Imports: 27 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ResourceReconcileErrTemp = "Reconcile %s %s failed"
)

Variables

Functions

func ApiServerScheduler

func ApiServerScheduler(instance *stackv1alpha1.Airbyte, dep *appsv1.Deployment, group rolegroup.RoleConfigObject)

func ConnectorBuilderServerScheduler

func ConnectorBuilderServerScheduler(instance *stackv1alpha1.Airbyte, dep *appsv1.Deployment, group rolegroup.RoleConfigObject)

func CreateOrUpdate

func CreateOrUpdate(ctx context.Context, c client.Client, obj client.Object) error

func CronScheduler

func CronScheduler(instance *stackv1alpha1.Airbyte, dep *appsv1.Deployment, group rolegroup.RoleConfigObject)

func GetRoleGroupEx

func GetRoleGroupEx(clusterCfg any, roleCfg any, groupCfg any, roleFields []string,
	configFields []string) client.Object

func ReconcileTasks

func ReconcileTasks[T client.Object](tasks *[]ReconcileTask[T], params TaskReconcilePara[T]) error

func ServerScheduler

func ServerScheduler(instance *stackv1alpha1.Airbyte, dep *appsv1.Deployment, group rolegroup.RoleConfigObject)

func WorkerScheduler

func WorkerScheduler(instance *stackv1alpha1.Airbyte, dep *appsv1.Deployment, group rolegroup.RoleConfigObject)

Types

type AirByteRole

type AirByteRole string
const (
	Cluster                AirByteRole = "Cluster"
	Bootloader             AirByteRole = "Bootloader"
	Server                 AirByteRole = "Server"
	Cron                   AirByteRole = "Cron"
	ApiServer              AirByteRole = "ApiServer"
	ConnectorBuilderServer AirByteRole = "ConnectorBuilderServer"
	PodSweeper             AirByteRole = "PodSweeper"
	Temporal               AirByteRole = "Temporal"
	Webapp                 AirByteRole = "Webapp"
	Worker                 AirByteRole = "Worker"
	LogStorage             AirByteRole = "LogStorage"
)

type AirByteRoleReconcileTask

type AirByteRoleReconcileTask struct {
	Role AirByteRole
	// contains filtered or unexported fields
}

type AirbyteReconciler

type AirbyteReconciler struct {
	client.Client
	Scheme *runtime.Scheme
	Log    logr.Logger
}

AirbyteReconciler reconciles an Airbyte object

func (*AirbyteReconciler) Reconcile

func (r *AirbyteReconciler) 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. TODO(user): Modify the Reconcile function to compare the state specified by the Airbyte object against the actual cluster state, and then perform operations to make the cluster state reflect the state specified by the user.

For more details, check Reconcile and its Result here: - https://pkg.go.dev/sigs.k8s.io/controller-runtime@v0.14.1/pkg/reconcile

func (*AirbyteReconciler) ReconcilePod

func (r *AirbyteReconciler) ReconcilePod(ctx context.Context, instance *stackv1alpha1.Airbyte) error

func (*AirbyteReconciler) SetupWithManager

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

SetupWithManager sets up the controller with the Manager.

type ExtractorParams

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

ExtractorParams Params of extract resource function for role group

type Map

type Map map[string]string

func (*Map) MapMerge

func (m *Map) MapMerge(source map[string]string, replace bool)

type ReconcileParams

type ReconcileParams struct {
	client.Client
	// contains filtered or unexported fields
}

ReconcileParams Params of reconcile resource

type ReconcileTask

type ReconcileTask[T client.Object] struct {
	// contains filtered or unexported fields
}

type ResourceRequest

type ResourceRequest struct {
	Ctx context.Context
	client.Client
	Namespace string
	Log       logr.Logger
}

ResourceRequest Params of fetch resource from k8s cluster

func (*ResourceRequest) FetchDb

func (r *ResourceRequest) FetchDb(database *opgo.Database) (*opgo.DatabaseConnection, error)

FetchDb fetch database connection by database reference, while database is fetched by resource request

func (*ResourceRequest) FetchDbByReference

func (r *ResourceRequest) FetchDbByReference(reference string) (*opgo.Database, *opgo.DatabaseConnection, error)

FetchDbByReference fetch database and database connection by database reference

func (*ResourceRequest) FetchS3

func (r *ResourceRequest) FetchS3(s3 *opgo.S3Bucket) (*opgo.S3Connection, error)

FetchS3 fetch s3 connection by s3 reference, while s3 is fetched by resource request

func (*ResourceRequest) FetchS3ByReference

func (r *ResourceRequest) FetchS3ByReference(reference string) (*opgo.S3Bucket, *opgo.S3Connection, error)

FetchS3ByReference fetch s3 s3Bucket and s3 connection by s3 reference

func (*ResourceRequest) FetchSecretByReference

func (r *ResourceRequest) FetchSecretByReference(secretRef string) (*corev1.Secret, error)

FetchSecretByReference fetch secret by reference

type ResourceType

type ResourceType string
const (
	Pod            ResourceType = "Pod"
	Deployment     ResourceType = "Deployment"
	Service        ResourceType = "Service"
	Secret         ResourceType = "Secret"
	ConfigMap      ResourceType = "ConfigMap"
	Pvc            ResourceType = "Pvc"
	Ingress        ResourceType = "Ingress"
	ServiceAccount ResourceType = "ServiceAccount"
	Role           ResourceType = "Role"
	RoleBinding                 = "RoleBinding"
)

type TaskReconcilePara

type TaskReconcilePara[T client.Object] struct {
	// contains filtered or unexported fields
}

Jump to

Keyboard shortcuts

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