base

package
v0.24.2 Latest Latest
Warning

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

Go to latest
Published: Sep 28, 2021 License: Apache-2.0 Imports: 22 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"
)
View Source
const (
	TopicOwnerAnnotation = "eventing.knative.dev/topic.owner"

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

	ReasonTopicNotPresent = "Topic is not present"
)
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 dispatcher pods.
	BrokerDispatcherLabel = "kafka-broker-dispatcher"
	// label for selecting receiver pods.
	BrokerReceiverLabel = "kafka-broker-receiver"
	// label for selecting receiver pods.
	SinkReceiverLabel = "kafka-sink-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)

Types

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

	SecretTracker    tracker.Interface
	ConfigMapTracker tracker.Interface

	DataPlaneConfigMapNamespace string
	DataPlaneConfigMapName      string
	DataPlaneConfigFormat       string
	SystemNamespace             string

	DispatcherLabel string
	ReceiverLabel   string
}

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

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) 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) 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(u *apis.URL)

	Configs *config.Env

	Recorder record.EventRecorder
}

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) FailedToGetConfig added in v0.18.0

func (manager *StatusConditionManager) FailedToGetConfig(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) 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) Reconciled added in v0.18.0

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

func (*StatusConditionManager) TopicNotPresentOrInvalid added in v0.18.0

func (manager *StatusConditionManager) TopicNotPresentOrInvalid() error

func (*StatusConditionManager) TopicNotPresentOrInvalidErr added in v0.18.0

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

func (*StatusConditionManager) TopicReady added in v0.18.0

func (manager *StatusConditionManager) TopicReady(topic string)

Jump to

Keyboard shortcuts

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