controller

package
v0.0.0-...-3c344cc 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: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ClusterConfigMapReconciler

func NewClusterConfigMap

func NewClusterConfigMap(
	scheme *runtime.Scheme,
	instance *trinov1alpha1.TrinoCluster,
	client client.Client,
	groupName string,
	labels map[string]string,
	mergedCfg *trinov1alpha1.RoleGroupSpec,

) *ClusterConfigMapReconciler

NewClusterConfigMap new a ClusterConfigMapReconcile

func (*ClusterConfigMapReconciler) Build

Build implements the MultiResourceReconcilerBuilder interface

type ClusterReconciler

type ClusterReconciler struct {
	Log logr.Logger
	// contains filtered or unexported fields
}

func NewClusterReconciler

func NewClusterReconciler(client client.Client, scheme *runtime.Scheme, cr *stackv1alpha1.TrinoCluster) *ClusterReconciler

func (*ClusterReconciler) ReconcileCluster

func (c *ClusterReconciler) ReconcileCluster(ctx context.Context) (ctrl.Result, error)

func (*ClusterReconciler) RegisterResource

func (c *ClusterReconciler) RegisterResource()

func (*ClusterReconciler) RegisterRole

func (c *ClusterReconciler) RegisterRole()

RegisterRole register role reconciler

type GeneralConfigMapReconciler

type GeneralConfigMapReconciler struct {
	common.GeneralResourceStyleReconciler[*trinov1alpha1.TrinoCluster, *trinov1alpha1.RoleGroupSpec]
	// contains filtered or unexported fields
}

GeneralConfigMapReconciler general config map reconciler generator it can be used to generate config map reconciler for simple config map such as trino catalog, schema config map parameters: 1. resourceBuilerFunc: a function to create a new resource

func NewGeneralConfigMap

func NewGeneralConfigMap(
	scheme *runtime.Scheme,
	instance *trinov1alpha1.TrinoCluster,
	client client.Client,
	groupName string,
	mergedLabels map[string]string,
	mergedCfg *trinov1alpha1.RoleGroupSpec,
	resourceBuilderFunc func() client.Object,

) *GeneralConfigMapReconciler

NewGeneralConfigMap new a GeneralConfigMapReconciler

func (*GeneralConfigMapReconciler) Build

Build implements the ResourceBuilder interface

type TrinoInstance

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

func (*TrinoInstance) GetClusterConfig

func (t *TrinoInstance) GetClusterConfig() any

GetClusterConfig implement InstanceAttributes interface

func (*TrinoInstance) GetRoleConfigSpec

func (t *TrinoInstance) GetRoleConfigSpec(role common.Role) (any, error)

type TrinoReconciler

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

TrinoReconciler reconciles a TrinoCluster object

func (*TrinoReconciler) Reconcile

func (r *TrinoReconciler) 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 TrinoCluster 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 (*TrinoReconciler) SetupWithManager

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

func (*TrinoReconciler) UpdateStatus

func (r *TrinoReconciler) UpdateStatus(ctx context.Context, instance *trinov1alpha1.TrinoCluster) error

UpdateStatus updates the status of the TrinoCluster resource https://stackoverflow.com/questions/76388004/k8s-controller-update-status-and-condition

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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