operator

package
v2.1.0 Latest Latest
Warning

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

Go to latest
Published: Nov 26, 2026 License: Apache-2.0 Imports: 44 Imported by: 1 module, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BuildClusterMetadata

func BuildClusterMetadata(cluster *kafscalev1.KafscaleCluster, topics []kafscalev1.KafscaleTopic) metadata.ClusterMetadata

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

func BuildClusterMetadataForBrokers

func BuildClusterMetadataForBrokers(cluster *kafscalev1.KafscaleCluster, topics []kafscalev1.KafscaleTopic, brokerCount int32) metadata.ClusterMetadata

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.

func SecretCacheOptions

func SecretCacheOptions() cache.Options

SecretCacheOptions applies metadata stripping only to Secret watches.

func SecretClientOptions

func SecretClientOptions() client.Options

SecretClientOptions prevents typed Secret reads from creating a second, namespace-wide cache alongside the metadata-only event watch.

func SecretWatchTransform

func SecretWatchTransform(object interface{}) (interface{}, error)

SecretWatchTransform keeps names and resource versions for ACL event routing. Annotations can contain a full last-applied Secret, so discard them too.

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
}

func EnsureEtcd

func EnsureEtcd(ctx context.Context, c client.Client, scheme *runtime.Scheme, cluster *kafscalev1.KafscaleCluster) (EtcdResolution, error)

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 *kafscalev1.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