operator

package
v1.4.2 Latest Latest
Warning

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

Go to latest
Published: Jan 19, 2026 License: Apache-2.0 Imports: 31 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BuildClusterMetadata

BuildClusterMetadata converts CRD state into the metadata snapshot consumed by brokers.

func PublishMetadataSnapshot

func PublishMetadataSnapshot(ctx context.Context, endpoints []string, snapshot metadata.ClusterMetadata) error

PublishMetadataSnapshot writes the provided metadata snapshot into etcd so brokers can consume it.

Types

type ClusterReconciler

type ClusterReconciler struct {
	Client    client.Client
	Scheme    *runtime.Scheme
	Publisher *SnapshotPublisher
}

ClusterReconciler reconciles KafscaleCluster resources into Deployments/Services.

func NewClusterReconciler

func NewClusterReconciler(mgr ctrl.Manager, publisher *SnapshotPublisher) *ClusterReconciler

func (*ClusterReconciler) Reconcile

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

Reconcile ensures broker workloads exist for every KafscaleCluster spec.

func (*ClusterReconciler) SetupWithManager

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

type EtcdResolution

type EtcdResolution struct {
	Endpoints []string
	Managed   bool
}

type SnapshotPublisher

type SnapshotPublisher struct {
	Client client.Client
}

SnapshotPublisher translates KafscaleCluster/KafscaleTopic resources into the metadata snapshot read by brokers.

func NewSnapshotPublisher

func NewSnapshotPublisher(c client.Client) *SnapshotPublisher

NewSnapshotPublisher creates a publisher backed by the provided controller-runtime client.

func (*SnapshotPublisher) Publish

func (p *SnapshotPublisher) Publish(ctx context.Context, cluster *kafscalev1alpha1.KafscaleCluster, endpoints []string) error

Publish renders the current metadata for the cluster and puts it into etcd.

type TopicReconciler

type TopicReconciler struct {
	client.Client
	Scheme    *runtime.Scheme
	Publisher *SnapshotPublisher
}

TopicReconciler ensures topic metadata is reflected in the etcd snapshot.

func NewTopicReconciler

func NewTopicReconciler(mgr ctrl.Manager, publisher *SnapshotPublisher) *TopicReconciler

func (*TopicReconciler) Reconcile

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

func (*TopicReconciler) SetupWithManager

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

Jump to

Keyboard shortcuts

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