base

package
v0.41.0 Latest Latest
Warning

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

Go to latest
Published: Apr 30, 2024 License: Apache-2.0 Imports: 28 Imported by: 0

Documentation

Overview

receiver_condition_set.go contains Broker and Kafka Sink logic for status conditions handling.

Index

Constants

View Source
const (
	ConditionAddressable             apis.ConditionType = "Addressable"
	ConditionDataPlaneAvailable      apis.ConditionType = "DataPlaneAvailable"
	ConditionTopicReady              apis.ConditionType = "TopicReady"
	ConditionConfigMapUpdated        apis.ConditionType = "ConfigMapUpdated"
	ConditionConfigParsed            apis.ConditionType = "ConfigParsed"
	ConditionInitialOffsetsCommitted apis.ConditionType = "InitialOffsetsCommitted"
	ConditionProbeSucceeded          apis.ConditionType = "ProbeSucceeded"
)
View Source
const (
	TopicOwnerAnnotation = "eventing.knative.dev/topic.owner"

	ReasonDataPlaneNotAvailable  = "Data plane not available"
	MessageDataPlaneNotAvailable = "Did you install the data plane for this component?"

	ReasonTopicNotPresentOrInvalid = "Topic is not present or invalid"
)
View Source
const (
	// log key of the data of the config map.
	ContractLogKey = "contract"

	// config map key of the contract config map.
	ConfigMapDataKey = "data"

	// label for selecting broker dispatcher pods.
	BrokerDispatcherLabel = "kafka-broker-dispatcher"
	// label for selecting broker receiver pods.
	BrokerReceiverLabel = "kafka-broker-receiver"

	// label for selecting sink receiver pods.
	SinkReceiverLabel = "kafka-sink-receiver"

	// label for selecting source dipsatcher pods.
	SourceDispatcherLabel = "kafka-source-dispatcher"

	// label for selecting channel dispatcher pods.
	ChannelDispatcherLabel = "kafka-channel-dispatcher"
	// label for selecting channel receiver pods.
	ChannelReceiverLabel = "kafka-channel-receiver"

	// volume generation annotation data plane pods.
	VolumeGenerationAnnotationKey = "volumeGeneration"

	Protobuf = "protobuf"
	Json     = "json"
)

Variables

Functions

func GetDataPlaneConfigMapData

func GetDataPlaneConfigMapData(logger *zap.Logger, dataPlaneConfigMap *corev1.ConfigMap, format string) (*contract.Contract, error)

func NoopConfigmapOption added in v0.34.0

func NoopConfigmapOption(cm *corev1.ConfigMap)

Types

type ConfigMapOption added in v0.30.0

type ConfigMapOption func(cm *corev1.ConfigMap)

func PodOwnerReference added in v0.35.4

func PodOwnerReference(p *corev1.Pod) ConfigMapOption

type Object added in v0.18.0

type Object interface {
	duckv1.KRShaped
	runtime.Object
}

type Reconciler

type Reconciler struct {
	KubeClient   kubernetes.Interface
	PodLister    corelisters.PodLister
	SecretLister corelisters.SecretLister

	Tracker tracker.Interface

	DataPlaneConfigMapNamespace string
	ContractConfigMapName       string
	ContractConfigMapFormat     string
	DataPlaneNamespace          string

	DataPlaneConfigConfigMapName string

	DispatcherLabel string
	ReceiverLabel   string

	DataPlaneConfigMapTransformer ConfigMapOption
}

Base reconciler for broker and trigger reconciler. It contains common logic for both trigger and broker reconciler.

func (*Reconciler) DeleteResource added in v0.27.0

func (r *Reconciler) DeleteResource(ctx context.Context, logger *zap.Logger, uuid types.UID, ct *contract.Contract, contractConfigMap *corev1.ConfigMap) error

func (*Reconciler) GetDataPlaneConfigMapData

func (r *Reconciler) GetDataPlaneConfigMapData(logger *zap.Logger, dataPlaneConfigMap *corev1.ConfigMap) (*contract.Contract, error)

GetDataPlaneConfigMapData extracts contract from the given config map.

func (*Reconciler) GetOrCreateDataPlaneConfigMap

func (r *Reconciler) GetOrCreateDataPlaneConfigMap(ctx context.Context) (*corev1.ConfigMap, error)

func (*Reconciler) IsDispatcherRunning added in v0.18.0

func (r *Reconciler) IsDispatcherRunning() bool

func (*Reconciler) IsReceiverRunning added in v0.18.0

func (r *Reconciler) IsReceiverRunning() bool

func (*Reconciler) OnDeleteObserver added in v0.21.0

func (r *Reconciler) OnDeleteObserver(obj interface{})

func (*Reconciler) ReceiverSelector added in v0.28.0

func (r *Reconciler) ReceiverSelector() labels.Selector

func (*Reconciler) SecretProviderFunc added in v0.21.0

func (r *Reconciler) SecretProviderFunc() security.SecretProviderFunc

func (*Reconciler) TrackConfigMap added in v0.21.0

func (r *Reconciler) TrackConfigMap(cm *corev1.ConfigMap, parent metav1.Object) error

func (*Reconciler) TrackSecret added in v0.21.0

func (r *Reconciler) TrackSecret(secret *corev1.Secret, parent metav1.Object) error

func (*Reconciler) UpdateDataPlaneConfigMap

func (r *Reconciler) UpdateDataPlaneConfigMap(ctx context.Context, contract *contract.Contract, configMap *corev1.ConfigMap) error

func (*Reconciler) UpdateDispatcherPodsAnnotation

func (r *Reconciler) UpdateDispatcherPodsAnnotation(ctx context.Context, logger *zap.Logger, volumeGeneration uint64) error

func (*Reconciler) UpdatePodsAnnotation added in v0.29.0

func (r *Reconciler) UpdatePodsAnnotation(ctx context.Context, logger *zap.Logger, component string, volumeGeneration uint64, pods []*corev1.Pod) error

func (*Reconciler) UpdateReceiverPodsAnnotation

func (r *Reconciler) UpdateReceiverPodsAnnotation(ctx context.Context, logger *zap.Logger, volumeGeneration uint64) error

type StatusConditionManager added in v0.18.0

type StatusConditionManager struct {
	Object Object

	SetAddress func(addr *duckv1.Addressable)

	Env              *config.Env
	BootstrapServers string

	Recorder record.EventRecorder
}

func (*StatusConditionManager) Addressable added in v0.28.0

func (manager *StatusConditionManager) Addressable(address *url.URL)

func (*StatusConditionManager) ConfigMapUpdated added in v0.18.0

func (manager *StatusConditionManager) ConfigMapUpdated()

func (*StatusConditionManager) ConfigResolved added in v0.18.0

func (manager *StatusConditionManager) ConfigResolved()

func (*StatusConditionManager) DataPlaneAvailable added in v0.18.0

func (manager *StatusConditionManager) DataPlaneAvailable()

func (*StatusConditionManager) DataPlaneNotAvailable added in v0.18.0

func (manager *StatusConditionManager) DataPlaneNotAvailable() reconciler.Event

func (*StatusConditionManager) FailedToCreateTopic added in v0.18.0

func (manager *StatusConditionManager) FailedToCreateTopic(topic string, err error) reconciler.Event

func (*StatusConditionManager) FailedToGetBrokerAuthSecret added in v0.37.0

func (manager *StatusConditionManager) FailedToGetBrokerAuthSecret(err error) reconciler.Event

func (*StatusConditionManager) FailedToGetConfigMap added in v0.18.0

func (manager *StatusConditionManager) FailedToGetConfigMap(err error) reconciler.Event

func (*StatusConditionManager) FailedToGetDataFromConfigMap added in v0.18.0

func (manager *StatusConditionManager) FailedToGetDataFromConfigMap(err error) reconciler.Event

func (*StatusConditionManager) FailedToResolveConfig added in v0.18.0

func (manager *StatusConditionManager) FailedToResolveConfig(err error) reconciler.Event

func (*StatusConditionManager) FailedToResolveSink added in v0.28.0

func (manager *StatusConditionManager) FailedToResolveSink(err error) error

func (*StatusConditionManager) FailedToUpdateConfigMap added in v0.18.0

func (manager *StatusConditionManager) FailedToUpdateConfigMap(err error) reconciler.Event

func (*StatusConditionManager) FailedToUpdateDispatcherPodsAnnotation added in v0.18.0

func (manager *StatusConditionManager) FailedToUpdateDispatcherPodsAnnotation(err error)

func (*StatusConditionManager) FailedToUpdateReceiverPodsAnnotation added in v0.18.0

func (manager *StatusConditionManager) FailedToUpdateReceiverPodsAnnotation(err error) reconciler.Event

func (*StatusConditionManager) InitialOffsetNotCommitted added in v0.28.0

func (manager *StatusConditionManager) InitialOffsetNotCommitted(err error) error

func (*StatusConditionManager) InitialOffsetsCommitted added in v0.28.0

func (manager *StatusConditionManager) InitialOffsetsCommitted()

func (*StatusConditionManager) ProbesStatusNotReady added in v0.28.0

func (manager *StatusConditionManager) ProbesStatusNotReady(status prober.Status)

func (*StatusConditionManager) ProbesStatusReady added in v0.28.0

func (manager *StatusConditionManager) ProbesStatusReady()

func (*StatusConditionManager) SinkResolved added in v0.28.0

func (manager *StatusConditionManager) SinkResolved()

func (*StatusConditionManager) TopicReady added in v0.18.0

func (manager *StatusConditionManager) TopicReady(topic string)

func (*StatusConditionManager) TopicsNotPresentOrInvalid added in v0.27.0

func (manager *StatusConditionManager) TopicsNotPresentOrInvalid(topics []string) error

func (*StatusConditionManager) TopicsNotPresentOrInvalidErr added in v0.27.0

func (manager *StatusConditionManager) TopicsNotPresentOrInvalidErr(topics []string, err error) error

Jump to

Keyboard shortcuts

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