Documentation ¶
Overview ¶
receiver_condition_set.go contains Broker and Kafka Sink logic for status conditions handling.
Index ¶
- Constants
- Variables
- func GetDataPlaneConfigMapData(logger *zap.Logger, dataPlaneConfigMap *corev1.ConfigMap, format string) (*contract.Contract, error)
- func NoopConfigmapOption(cm *corev1.ConfigMap)
- type ConfigMapOption
- type Object
- type Reconciler
- func (r *Reconciler) DeleteResource(ctx context.Context, logger *zap.Logger, uuid types.UID, ct *contract.Contract, ...) error
- func (r *Reconciler) GetDataPlaneConfigMapData(logger *zap.Logger, dataPlaneConfigMap *corev1.ConfigMap) (*contract.Contract, error)
- func (r *Reconciler) GetOrCreateDataPlaneConfigMap(ctx context.Context) (*corev1.ConfigMap, error)
- func (r *Reconciler) IsDispatcherRunning() bool
- func (r *Reconciler) IsReceiverRunning() bool
- func (r *Reconciler) OnDeleteObserver(obj interface{})
- func (r *Reconciler) ReceiverSelector() labels.Selector
- func (r *Reconciler) SecretProviderFunc() security.SecretProviderFunc
- func (r *Reconciler) TrackConfigMap(cm *corev1.ConfigMap, parent metav1.Object) error
- func (r *Reconciler) TrackSecret(secret *corev1.Secret, parent metav1.Object) error
- func (r *Reconciler) UpdateDataPlaneConfigMap(ctx context.Context, contract *contract.Contract, configMap *corev1.ConfigMap) error
- func (r *Reconciler) UpdateDispatcherPodsAnnotation(ctx context.Context, logger *zap.Logger, volumeGeneration uint64) error
- func (r *Reconciler) UpdatePodsAnnotation(ctx context.Context, logger *zap.Logger, component string, ...) error
- func (r *Reconciler) UpdateReceiverPodsAnnotation(ctx context.Context, logger *zap.Logger, volumeGeneration uint64) error
- type StatusConditionManager
- func (manager *StatusConditionManager) Addressable(address *url.URL)
- func (manager *StatusConditionManager) ConfigMapUpdated()
- func (manager *StatusConditionManager) ConfigResolved()
- func (manager *StatusConditionManager) DataPlaneAvailable()
- func (manager *StatusConditionManager) DataPlaneNotAvailable() reconciler.Event
- func (manager *StatusConditionManager) FailedToCreateTopic(topic string, err error) reconciler.Event
- func (manager *StatusConditionManager) FailedToGetBrokerAuthSecret(err error) reconciler.Event
- func (manager *StatusConditionManager) FailedToGetConfigMap(err error) reconciler.Event
- func (manager *StatusConditionManager) FailedToGetDataFromConfigMap(err error) reconciler.Event
- func (manager *StatusConditionManager) FailedToResolveConfig(err error) reconciler.Event
- func (manager *StatusConditionManager) FailedToResolveSink(err error) error
- func (manager *StatusConditionManager) FailedToUpdateConfigMap(err error) reconciler.Event
- func (manager *StatusConditionManager) FailedToUpdateDispatcherPodsAnnotation(err error)
- func (manager *StatusConditionManager) FailedToUpdateReceiverPodsAnnotation(err error) reconciler.Event
- func (manager *StatusConditionManager) InitialOffsetNotCommitted(err error) error
- func (manager *StatusConditionManager) InitialOffsetsCommitted()
- func (manager *StatusConditionManager) ProbesStatusNotReady(status prober.Status)
- func (manager *StatusConditionManager) ProbesStatusReady()
- func (manager *StatusConditionManager) SinkResolved()
- func (manager *StatusConditionManager) TopicReady(topic string)
- func (manager *StatusConditionManager) TopicsNotPresentOrInvalid(topics []string) error
- func (manager *StatusConditionManager) TopicsNotPresentOrInvalidErr(topics []string, err error) error
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 ¶
View Source
var EgressConditionSet = apis.NewLivingConditionSet( ConditionDataPlaneAvailable, ConditionTopicReady, ConditionConfigMapUpdated, ConditionInitialOffsetsCommitted, sources.KafkaConditionSinkProvided, )
View Source
var IngressConditionSet = apis.NewLivingConditionSet( ConditionAddressable, ConditionDataPlaneAvailable, ConditionTopicReady, ConditionConfigMapUpdated, ConditionConfigParsed, ConditionProbeSucceeded, )
Functions ¶
func NoopConfigmapOption ¶ added in v0.34.0
Types ¶
type ConfigMapOption ¶ added in v0.30.0
func PodOwnerReference ¶ added in v0.35.4
func PodOwnerReference(p *corev1.Pod) ConfigMapOption
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 (*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 (*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 (*Reconciler) TrackSecret ¶ added in v0.21.0
func (*Reconciler) UpdateDataPlaneConfigMap ¶
func (*Reconciler) UpdateDispatcherPodsAnnotation ¶
func (*Reconciler) UpdatePodsAnnotation ¶ added in v0.29.0
func (*Reconciler) UpdateReceiverPodsAnnotation ¶
type StatusConditionManager ¶ added in v0.18.0
type StatusConditionManager struct { Object Object SetAddress func(u *apis.URL) 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
Click to show internal directories.
Click to hide internal directories.