knative

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Jun 23, 2026 License: Apache-2.0 Imports: 29 Imported by: 0

Documentation

Index

Constants

View Source
const (
	KafkaKnativeEventingDeliveryOrder        = "kafka.eventing.knative.dev/delivery.order"
	KafkaKnativeEventingDeliveryOrderOrdered = "ordered"
)

Variables

This section is empty.

Functions

func CheckKSinkInjected

func CheckKSinkInjected(name, namespace string) (bool, error)

Does the sinkbinding completed K_SINK injection?

func CleanupOutdatedRevisions

func CleanupOutdatedRevisions(ctx context.Context, cfg *rest.Config, workflow *operatorapi.SonataFlow, platform *operatorapi.SonataFlowPlatform) error

CleanupOutdatedRevisions Given a deployed workflow, analyses if the configured deployment model is knative. If that is the case, and the corresponding SinkBinding was created and properly injected, all the previous knative service revisions that weren't properly initialized (i.e. doesn't have the K_SINK injected) will be cleaned-up. Note that revisions in that situation are not valid, since workflows without the K_SINK injected will never pass the health checks, etc.

func GetBrokerClass

func GetBrokerClass(broker *eventingv1.Broker) string

GetBrokerClass returns the broker class for a Knative Eventing Broker.

func GetKnativeEventingClient

func GetKnativeEventingClient(cfg *rest.Config) (clienteventingv1.EventingV1Interface, error)

func GetKnativeServingClient

func GetKnativeServingClient(cfg *rest.Config) (clientservingv1.ServingV1Interface, error)

func GetRemotePlatform

GetRemotePlatform returns the remote platform referred by a SonataFlowClusterPlatform if any.

func GetSinkBindingSinkURI

func GetSinkBindingSinkURI(name, namespace string) (*apis.URL, error)

GetSinkBindingSinkURI returns the address of the sink referred by a SinkBinding.

func GetSinkURI

func GetSinkURI(destination duckv1.Destination) (*apis.URL, error)

GetSinkURI returns the address of the sink referred by a Destination.

func IsKafkaBroker

func IsKafkaBroker(brokerClass string) bool

IsKafkaBroker returns true if the class for a Knative Eventing Broker corresponds to a Kafka broker.

func IsKnativeBroker

func IsKnativeBroker(kRef *duckv1.KReference) bool

func MapTriggerToPlatformRequests

func MapTriggerToPlatformRequests(ctx context.Context, object client.Object) []reconcile.Request

if a trigger is changed and it has namespace different from the platform is changed, reconcile the parent SonataFlowPlatform in the cluster.

func NewKnativeEventingClient

func NewKnativeEventingClient(cfg *rest.Config) (*clienteventingv1.EventingV1Client, error)

func NewKnativeServingClient

func NewKnativeServingClient(cfg *rest.Config) (*clientservingv1.ServingV1Client, error)

func RestoreKnativeVolumeAndVolumeMount

func RestoreKnativeVolumeAndVolumeMount(podSpec *corev1.PodSpec)

Knative Sinkbinding injects K_SINK env, a volume and volume mount. The volume and volume mount must be in the end of the array to avoid repeadly restarting of the workflow pod

func SaveKnativeData

func SaveKnativeData(dest *corev1.PodSpec, source *corev1.PodSpec)

func ValidateBroker

func ValidateBroker(name, namespace string) (*eventingv1.Broker, error)

Types

type Availability

type Availability struct {
	Eventing bool
	Serving  bool
}

func GetKnativeAvailability

func GetKnativeAvailability(cfg *rest.Config) (*Availability, error)

type CreationTimestamp

type CreationTimestamp []servingv1.Revision

func (CreationTimestamp) Len

func (a CreationTimestamp) Len() int

func (CreationTimestamp) Less

func (a CreationTimestamp) Less(i, j int) bool

func (CreationTimestamp) Swap

func (a CreationTimestamp) Swap(i, j int)

Jump to

Keyboard shortcuts

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