v1alpha1

package
v1.16.0 Latest Latest
Warning

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

Go to latest
Published: Mar 31, 2022 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Overview

Package v1alpha1 contains API Schema definitions for the routing/v1alpha1 API group.

+k8s:deepcopy-gen=package +groupName=routing.triggermesh.io

Index

Constants

View Source
const (
	// ConditionReady has status True when the router is ready to send events.
	ConditionReady = apis.ConditionReady
	// ConditionSinkProvided has status True when the router has been configured with a sink target.
	ConditionSinkProvided apis.ConditionType = "SinkProvided"
	// ConditionDeployed has status True when the router's adapter is up and running.
	ConditionDeployed apis.ConditionType = "Deployed"
)

Status conditions

View Source
const (
	// ReasonSinkNotFound is set on a SinkProvided condition when a sink does not exist.
	ReasonSinkNotFound = "SinkNotFound"
	// ReasonSinkEmpty is set on a SinkProvided condition when a sink URI is empty.
	ReasonSinkEmpty = "EmptySinkURI"

	// ReasonRBACNotBound is set on a Deployed condition when an adapter's
	// ServiceAccount cannot be bound.
	ReasonRBACNotBound = "RBACNotBound"
	// ReasonUnavailable is set on a Deployed condition when an adapter is unavailable.
	ReasonUnavailable = "AdapterUnavailable"
)

Reasons for status conditions

View Source
const (
	FilterGenericEventType = "io.triggermesh.routing.filter"
)

Supported event types

View Source
const (
	SplitterGenericEventType = "io.triggermesh.routing.splitter"
)

Supported event types

Variables

View Source
var (
	// SchemeBuilder creates a Scheme builder that is used to register types for this custom API.
	SchemeBuilder = runtime.NewSchemeBuilder(addKnownTypes)
	// AddToScheme registers the types stored in SchemeBuilder.
	AddToScheme = SchemeBuilder.AddToScheme
)
View Source
var SchemeGroupVersion = schema.GroupVersion{Group: routing.GroupName, Version: "v1alpha1"}

SchemeGroupVersion is group version used to register these objects

Functions

func IsMultiTenant

func IsMultiTenant(r Reconcilable) bool

IsMultiTenant returns whether the given component type is multi-tenant.

func Kind

func Kind(kind string) schema.GroupKind

Kind takes an unqualified kind and returns back a Group qualified GroupKind

func NewRouterConditionSet

func NewRouterConditionSet(cts ...apis.ConditionType) apis.ConditionSet

NewRouterConditionSet returns a set of status conditions for a router. Default conditions can be augmented by passing condition types as function arguments.

func Resource

func Resource(resource string) schema.GroupResource

Resource takes an unqualified resource and returns a Group qualified GroupResource

func WithReconcilable added in v1.16.0

func WithReconcilable(ctx context.Context, r Reconcilable) context.Context

WithReconcilable returns a copy of the parent context in which the value associated with the reconcilableInstanceKey is the given component instance.

Types

type CloudEventContext

type CloudEventContext struct {
	Type       string            `json:"type"`
	Source     string            `json:"source"`
	Extensions map[string]string `json:"extensions"`
}

CloudEventContext declares context attributes that will be propagated to resulting events.

func (*CloudEventContext) DeepCopy

func (in *CloudEventContext) DeepCopy() *CloudEventContext

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CloudEventContext.

func (*CloudEventContext) DeepCopyInto

func (in *CloudEventContext) DeepCopyInto(out *CloudEventContext)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type Filter

type Filter struct {
	metav1.TypeMeta `json:",inline"`
	// +optional
	metav1.ObjectMeta `json:"metadata,omitempty"`

	// Spec holds the desired state of the Filter (from the client).
	// +optional
	Spec FilterSpec `json:"spec,omitempty"`

	// Status communicates the observed state of the Filter (from the controller).
	// +optional
	Status RouterStatus `json:"status,omitempty"`
}

Filter is an addressable object that filters incoming events according to provided Common Language Expression

func (*Filter) AsEventSource

func (f *Filter) AsEventSource() string

AsEventSource implements Reconcilable.

func (*Filter) DeepCopy

func (in *Filter) DeepCopy() *Filter

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Filter.

func (*Filter) DeepCopyInto

func (in *Filter) DeepCopyInto(out *Filter)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*Filter) DeepCopyObject

func (in *Filter) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

func (*Filter) GetConditionSet

func (f *Filter) GetConditionSet() apis.ConditionSet

GetConditionSet retrieves the condition set for this resource. Implements the KRShaped interface.

func (*Filter) GetEventTypes

func (*Filter) GetEventTypes() []string

GetEventTypes implements Reconcilable.

func (*Filter) GetGroupVersionKind

func (*Filter) GetGroupVersionKind() schema.GroupVersionKind

GetGroupVersionKind implements kmeta.OwnerRefable

func (*Filter) GetSink

func (f *Filter) GetSink() *duckv1.Destination

GetSink implements Reconcilable.

func (*Filter) GetStatus

func (f *Filter) GetStatus() *duckv1.Status

GetStatus retrieves the status of the resource. Implements the KRShaped interface.

func (*Filter) GetStatusManager

func (f *Filter) GetStatusManager() *StatusManager

GetStatusManager implements Reconcilable.

func (*Filter) IsMultiTenant

func (*Filter) IsMultiTenant() bool

IsMultiTenant implements MultiTenant.

func (*Filter) SetDefaults

func (f *Filter) SetDefaults(ctx context.Context)

SetDefaults implements apis.Defaultable

func (*Filter) Validate

func (f *Filter) Validate(ctx context.Context) *apis.FieldError

Validate implements apis.Validatable

type FilterList

type FilterList struct {
	metav1.TypeMeta `json:",inline"`
	metav1.ListMeta `json:"metadata"`

	Items []Filter `json:"items"`
}

FilterList is a list of Filter resources

+k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object

func (*FilterList) DeepCopy

func (in *FilterList) DeepCopy() *FilterList

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new FilterList.

func (*FilterList) DeepCopyInto

func (in *FilterList) DeepCopyInto(out *FilterList)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*FilterList) DeepCopyObject

func (in *FilterList) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

type FilterSpec

type FilterSpec struct {
	Expression string `json:"expression"`

	// Sink is a reference to an object that will resolve to a domain name to use as the sink.
	Sink *duckv1.Destination `json:"sink"`
}

FilterSpec contains CEL expression string and the destination sink

func (*FilterSpec) DeepCopy

func (in *FilterSpec) DeepCopy() *FilterSpec

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new FilterSpec.

func (*FilterSpec) DeepCopyInto

func (in *FilterSpec) DeepCopyInto(out *FilterSpec)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*FilterSpec) Validate

func (fs *FilterSpec) Validate(ctx context.Context) *apis.FieldError

Validate implements apis.Validatable

type Reconcilable added in v1.16.0

type Reconcilable interface {
	metav1.Object
	runtime.Object
	// OwnerRefable is used to construct a generic reconciler for each
	// component type, and convert custom objects to owner references.
	kmeta.OwnerRefable
	// KRShaped is used by generated reconcilers to perform pre and
	// post-reconcile status updates.
	duckv1.KRShaped

	// GetSink returns the component's event sink.
	GetSink() *duckv1.Destination
	// GetStatusManager returns a manager for the component's status.
	GetStatusManager() *StatusManager
	// GetEventTypes returns the event types generated by the component.
	GetEventTypes() []string
	// AsEventSource returns a unique reference to the component suitable
	// for use as a CloudEvent 'source' attribute.
	AsEventSource() string
}

Reconcilable is implemented by all TriggerMesh components.

func ReconcilableFromContext added in v1.16.0

func ReconcilableFromContext(ctx context.Context) Reconcilable

ReconcilableFromContext returns the component instance stored in the context.

type RouterStatus

type RouterStatus struct {
	duckv1.SourceStatus  `json:",inline"`
	duckv1.AddressStatus `json:",inline"`
}

RouterStatus defines the observed state of a router.

func (*RouterStatus) DeepCopy

func (in *RouterStatus) DeepCopy() *RouterStatus

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RouterStatus.

func (*RouterStatus) DeepCopyInto

func (in *RouterStatus) DeepCopyInto(out *RouterStatus)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type Splitter

type Splitter struct {
	metav1.TypeMeta `json:",inline"`
	// +optional
	metav1.ObjectMeta `json:"metadata,omitempty"`

	// Spec holds the desired state of the Splitter (from the client).
	// +optional
	Spec SplitterSpec `json:"spec,omitempty"`

	// Status communicates the observed state of the Splitter (from the controller).
	// +optional
	Status RouterStatus `json:"status,omitempty"`
}

Splitter is an addressable object that splits incoming events according to provided specification.

func (*Splitter) AsEventSource

func (s *Splitter) AsEventSource() string

AsEventSource implements Reconcilable.

func (*Splitter) DeepCopy

func (in *Splitter) DeepCopy() *Splitter

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Splitter.

func (*Splitter) DeepCopyInto

func (in *Splitter) DeepCopyInto(out *Splitter)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*Splitter) DeepCopyObject

func (in *Splitter) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

func (*Splitter) GetConditionSet

func (s *Splitter) GetConditionSet() apis.ConditionSet

GetConditionSet retrieves the condition set for this resource. Implements the KRShaped interface.

func (*Splitter) GetEventTypes

func (*Splitter) GetEventTypes() []string

GetEventTypes implements Reconcilable.

func (*Splitter) GetGroupVersionKind

func (*Splitter) GetGroupVersionKind() schema.GroupVersionKind

GetGroupVersionKind implements kmeta.OwnerRefable

func (*Splitter) GetSink

func (s *Splitter) GetSink() *duckv1.Destination

GetSink implements Reconcilable.

func (*Splitter) GetStatus

func (s *Splitter) GetStatus() *duckv1.Status

GetStatus retrieves the status of the resource. Implements the KRShaped interface.

func (*Splitter) GetStatusManager

func (s *Splitter) GetStatusManager() *StatusManager

GetStatusManager implements Reconcilable.

func (*Splitter) IsMultiTenant

func (*Splitter) IsMultiTenant() bool

IsMultiTenant implements MultiTenant.

func (*Splitter) SetDefaults

func (s *Splitter) SetDefaults(ctx context.Context)

SetDefaults implements apis.Defaultable

func (*Splitter) Validate

func (s *Splitter) Validate(ctx context.Context) *apis.FieldError

Validate implements apis.Validatable

type SplitterList

type SplitterList struct {
	metav1.TypeMeta `json:",inline"`
	metav1.ListMeta `json:"metadata"`

	Items []Splitter `json:"items"`
}

SplitterList is a list of Splitter resources.

+k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object

func (*SplitterList) DeepCopy

func (in *SplitterList) DeepCopy() *SplitterList

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SplitterList.

func (*SplitterList) DeepCopyInto

func (in *SplitterList) DeepCopyInto(out *SplitterList)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*SplitterList) DeepCopyObject

func (in *SplitterList) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

type SplitterSpec

type SplitterSpec struct {
	Path      string              `json:"path"`
	CEContext CloudEventContext   `json:"ceContext"`
	Sink      *duckv1.Destination `json:"sink"`
}

SplitterSpec holds the desired state of the Splitter.

func (*SplitterSpec) DeepCopy

func (in *SplitterSpec) DeepCopy() *SplitterSpec

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SplitterSpec.

func (*SplitterSpec) DeepCopyInto

func (in *SplitterSpec) DeepCopyInto(out *SplitterSpec)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*SplitterSpec) Validate

func (ss *SplitterSpec) Validate(ctx context.Context) *apis.FieldError

Validate implements apis.Validatable

type StatusManager added in v1.16.0

type StatusManager struct {
	apis.ConditionSet
	*RouterStatus
}

StatusManager manages the status of a TriggerMesh component.

+k8s:deepcopy-gen=false

func (*StatusManager) MarkNoSink added in v1.16.0

func (m *StatusManager) MarkNoSink()

MarkNoSink sets the SinkProvided condition to False.

func (*StatusManager) MarkRBACNotBound added in v1.16.0

func (m *StatusManager) MarkRBACNotBound()

MarkRBACNotBound sets the Deployed condition to False, indicating that the adapter's ServiceAccount couldn't be bound.

func (*StatusManager) MarkSink added in v1.16.0

func (m *StatusManager) MarkSink(uri *apis.URL)

MarkSink sets the SinkProvided condition to True using the given URI.

func (*StatusManager) PropagateServiceAvailability added in v1.16.0

func (m *StatusManager) PropagateServiceAvailability(ksvc *servingv1.Service)

PropagateServiceAvailability uses the readiness of the provided Service to determine whether the Deployed condition should be marked as True or False.

func (*StatusManager) SetRoute added in v1.16.0

func (m *StatusManager) SetRoute(urlPath string)

SetRoute appends the given URL path to the current source's URL.

type ValueFromField

type ValueFromField struct {

	// Field value.
	// +optional
	Value string `json:"value,omitempty"`
	// Field value from a Kubernetes Secret.
	// +optional
	ValueFromSecret *corev1.SecretKeySelector `json:"valueFromSecret,omitempty"`
}

ValueFromField is a struct field that can have its value either defined explicitly or sourced from another entity.

func (*ValueFromField) DeepCopy

func (in *ValueFromField) DeepCopy() *ValueFromField

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ValueFromField.

func (*ValueFromField) DeepCopyInto

func (in *ValueFromField) DeepCopyInto(out *ValueFromField)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

Jump to

Keyboard shortcuts

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