Documentation
¶
Index ¶
- Constants
- func CheckKSinkInjected(name, namespace string) (bool, error)
- func CleanupOutdatedRevisions(ctx context.Context, cfg *rest.Config, workflow *operatorapi.SonataFlow, ...) error
- func GetBrokerClass(broker *eventingv1.Broker) string
- func GetKnativeEventingClient(cfg *rest.Config) (clienteventingv1.EventingV1Interface, error)
- func GetKnativeServingClient(cfg *rest.Config) (clientservingv1.ServingV1Interface, error)
- func GetRemotePlatform(pl *operatorapi.SonataFlowPlatform) (*operatorapi.SonataFlowPlatform, error)
- func GetSinkBindingSinkURI(name, namespace string) (*apis.URL, error)
- func GetSinkURI(destination duckv1.Destination) (*apis.URL, error)
- func GetWorkflowSink(workflow *operatorapi.SonataFlow, pl *operatorapi.SonataFlowPlatform) (*duckv1.Destination, error)
- func IsKafkaBroker(brokerClass string) bool
- func IsKnativeBroker(kRef *duckv1.KReference) bool
- func MapTriggerToPlatformRequests(ctx context.Context, object client.Object) []reconcile.Request
- func NewKnativeEventingClient(cfg *rest.Config) (*clienteventingv1.EventingV1Client, error)
- func NewKnativeServingClient(cfg *rest.Config) (*clientservingv1.ServingV1Client, error)
- func RestoreKnativeVolumeAndVolumeMount(podSpec *corev1.PodSpec)
- func SaveKnativeData(dest *corev1.PodSpec, source *corev1.PodSpec)
- func ValidateBroker(name, namespace string) (*eventingv1.Broker, error)
- type Availability
- type CreationTimestamp
Constants ¶
const ( KafkaKnativeEventingDeliveryOrder = "kafka.eventing.knative.dev/delivery.order" KafkaKnativeEventingDeliveryOrderOrdered = "ordered" )
Variables ¶
This section is empty.
Functions ¶
func CheckKSinkInjected ¶
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 ¶
func GetRemotePlatform(pl *operatorapi.SonataFlowPlatform) (*operatorapi.SonataFlowPlatform, error)
GetRemotePlatform returns the remote platform referred by a SonataFlowClusterPlatform if any.
func GetSinkBindingSinkURI ¶
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 GetWorkflowSink ¶
func GetWorkflowSink(workflow *operatorapi.SonataFlow, pl *operatorapi.SonataFlowPlatform) (*duckv1.Destination, error)
func IsKafkaBroker ¶
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 ¶
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 ¶
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 ValidateBroker ¶
func ValidateBroker(name, namespace string) (*eventingv1.Broker, error)
Types ¶
type Availability ¶
func GetKnativeAvailability ¶
func GetKnativeAvailability(cfg *rest.Config) (*Availability, error)
type CreationTimestamp ¶
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)