Documentation
¶
Index ¶
- func BuildClusterMetadata(cluster *kafscalev1.KafscaleCluster, topics []kafscalev1.KafscaleTopic) metadata.ClusterMetadata
- func BuildClusterMetadataForBrokers(cluster *kafscalev1.KafscaleCluster, topics []kafscalev1.KafscaleTopic, ...) metadata.ClusterMetadata
- func PublishMetadataSnapshot(ctx context.Context, endpoints []string, snapshot metadata.ClusterMetadata) error
- func SecretCacheOptions() cache.Options
- func SecretClientOptions() client.Options
- func SecretWatchTransform(object interface{}) (interface{}, error)
- type ClusterReconciler
- type EtcdResolution
- type SnapshotPublisher
- type TopicReconciler
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 ¶
SecretCacheOptions applies metadata stripping only to Secret watches.
func SecretClientOptions ¶
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 ¶
Reconcile ensures broker workloads exist for every KafscaleCluster spec.
func (*ClusterReconciler) SetupWithManager ¶
func (r *ClusterReconciler) SetupWithManager(mgr ctrl.Manager) error
type EtcdResolution ¶
func EnsureEtcd ¶
func EnsureEtcd(ctx context.Context, c client.Client, scheme *runtime.Scheme, cluster *kafscalev1.KafscaleCluster) (EtcdResolution, error)
type SnapshotPublisher ¶
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) SetupWithManager ¶
func (r *TopicReconciler) SetupWithManager(mgr ctrl.Manager) error