controller

package
v0.0.0-...-ebe3fe6 Latest Latest
Warning

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

Go to latest
Published: Dec 10, 2024 License: Apache-2.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrListenerNotFound          = errors.New("listener resource not found")
	ErrListenerAddressesNotFound = errors.New("listener addresses not found")
)

Functions

This section is empty.

Types

type ClusterReconciler

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

func NewClusterReconciler

func NewClusterReconciler(client client.Client, scheme *runtime.Scheme, cr *hdfsv1alpha1.HdfsCluster) *ClusterReconciler

func (*ClusterReconciler) ReconcileCluster

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

func (*ClusterReconciler) ReconcileDiscovery

func (c *ClusterReconciler) ReconcileDiscovery(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 Discovery

func NewDiscovery

func NewDiscovery(
	scheme *runtime.Scheme,
	instance *hdfsv1alpha1.HdfsCluster,
	client client.Client,
) *Discovery

func (*Discovery) Build

func (d *Discovery) Build(ctx context.Context) (client.Object, error)

Build implements the ResourceBuilder interface

type HdfsClusterInstance

type HdfsClusterInstance struct {
	Instance *hdfsv1alpha1.HdfsCluster
}

func (*HdfsClusterInstance) GetClusterConfig

func (h *HdfsClusterInstance) GetClusterConfig() any

func (*HdfsClusterInstance) GetInstanceName

func (h *HdfsClusterInstance) GetInstanceName() string

func (*HdfsClusterInstance) GetNamespace

func (h *HdfsClusterInstance) GetNamespace() string

func (*HdfsClusterInstance) GetRoleConfigSpec

func (h *HdfsClusterInstance) GetRoleConfigSpec(role common.Role) (any, error)

type HdfsClusterReconciler

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

HdfsClusterReconciler reconciles a HdfsCluster object

func (*HdfsClusterReconciler) Reconcile

func (r *HdfsClusterReconciler) 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 HdfsCluster 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.15.0/pkg/reconcile

func (*HdfsClusterReconciler) SetupWithManager

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

SetupWithManager sets up the controller with the Manager.

type ServiceAccountReconciler

type ServiceAccountReconciler struct {
	common.GeneralResourceStyleReconciler[*hdfsv1alpha1.HdfsCluster, any]
}

func NewServiceAccount

func NewServiceAccount(
	scheme *runtime.Scheme,
	instance *hdfsv1alpha1.HdfsCluster,
	client client.Client,
	groupName string,
	mergedLabels map[string]string,
	mergedCfg any,
) *ServiceAccountReconciler

NewServiceAccount new a ServiceAccountReconciler

func (*ServiceAccountReconciler) Build

Build implements the ResourceBuilder interface

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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