v1alpha1

package
v0.0.0-...-0010da6 Latest Latest
Warning

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

Go to latest
Published: Apr 9, 2019 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Overview

Package v1alpha1 is the v1alpha1 version of the API. +k8s:deepcopy-gen=package +groupName=eventing.knative.dev

Index

Constants

View Source
const (
	BrokerConditionReady                              = duckv1alpha1.ConditionReady
	BrokerConditionIngress duckv1alpha1.ConditionType = "IngressReady"

	BrokerConditionTriggerChannel duckv1alpha1.ConditionType = "TriggerChannelReady"

	BrokerConditionIngressChannel duckv1alpha1.ConditionType = "IngressChannelReady"

	BrokerConditionIngressSubscription duckv1alpha1.ConditionType = "IngressSubscriptionReady"

	BrokerConditionFilter duckv1alpha1.ConditionType = "FilterReady"

	BrokerConditionAddressable duckv1alpha1.ConditionType = "Addressable"
)
View Source
const (
	// ChannelConditionReady has status True when the Channel is ready to
	// accept traffic.
	ChannelConditionReady = duckv1alpha1.ConditionReady
	// ChannelConditionProvisioned has status True when the Channel's
	// backing resources have been provisioned.
	ChannelConditionProvisioned duckv1alpha1.ConditionType = "Provisioned"

	// ChannelConditionAddressable has status true when this Channel meets
	// the Addressable contract and has a non-empty hostname.
	ChannelConditionAddressable duckv1alpha1.ConditionType = "Addressable"

	// ChannelConditionProvisionerInstalled has status true when the channel is being watched
	// by the provisioner's channel controller (in other words, the provisioner is installed)
	ChannelConditionProvisionerInstalled duckv1alpha1.ConditionType = "ProvisionerInstalled"
)
View Source
const (
	// SubscriptionConditionReady has status True when all subconditions below have been set to True.
	SubscriptionConditionReady = duckv1alpha1.ConditionReady
	// SubscriptionConditionReferencesResolved has status True when all the specified references have been successfully
	// resolved.
	SubscriptionConditionReferencesResolved duckv1alpha1.ConditionType = "Resolved"

	// SubscriptionConditionChannelReady has status True when controller has successfully added a
	// subscription to the spec.channel resource.
	SubscriptionConditionChannelReady duckv1alpha1.ConditionType = "ChannelReady"
)
View Source
const (
	// TriggerConditionReady has status True when all subconditions below have been set to True.
	TriggerConditionReady                                   = duckv1alpha1.ConditionReady
	TriggerConditionBrokerExists duckv1alpha1.ConditionType = "BrokerExists"

	TriggerConditionKubernetesService duckv1alpha1.ConditionType = "KubernetesServiceReady"

	TriggerConditionVirtualService duckv1alpha1.ConditionType = "VirtualServiceReady"

	TriggerConditionSubscribed duckv1alpha1.ConditionType = "Subscribed"

	// TriggerAnyFilter Constant to represent that we should allow anything.
	TriggerAnyFilter = ""
)
View Source
const (
	// ClusterChannelProvisionerConditionReady has status True when the Controller reconciling objects
	// controlled by it is ready to control them.
	ClusterChannelProvisionerConditionReady = duckv1alpha1.ConditionReady
)

Variables

View Source
var (
	SchemeBuilder = runtime.NewSchemeBuilder(addKnownTypes)
	AddToScheme   = SchemeBuilder.AddToScheme
)
View Source
var SchemeGroupVersion = schema.GroupVersion{Group: eventing.GroupName, Version: "v1alpha1"}

SchemeGroupVersion is group version used to register these objects

Functions

func Kind

func Kind(kind string) schema.GroupKind

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

func Resource

func Resource(resource string) schema.GroupResource

Resource takes an unqualified resource and returns a Group qualified GroupResource

Types

type Broker

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

	// Spec defines the desired state of the Broker.
	Spec BrokerSpec `json:"spec,omitempty"`

	// Status represents the current state of the Broker. This data may be out of
	// date.
	// +optional
	Status BrokerStatus `json:"status,omitempty"`
}

func (*Broker) CheckImmutableFields

func (b *Broker) CheckImmutableFields(ctx context.Context, og apis.Immutable) *apis.FieldError

func (*Broker) DeepCopy

func (in *Broker) DeepCopy() *Broker

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

func (*Broker) DeepCopyInto

func (in *Broker) DeepCopyInto(out *Broker)

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

func (*Broker) DeepCopyObject

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

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

func (*Broker) SetDefaults

func (b *Broker) SetDefaults(ctx context.Context)

func (*Broker) Validate

func (b *Broker) Validate(ctx context.Context) *apis.FieldError

type BrokerList

type BrokerList struct {
	metav1.TypeMeta `json:",inline"`
	// +optional
	metav1.ListMeta `json:"metadata,omitempty"`
	Items           []Broker `json:"items"`
}

BrokerList is a collection of Brokers.

func (*BrokerList) DeepCopy

func (in *BrokerList) DeepCopy() *BrokerList

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

func (*BrokerList) DeepCopyInto

func (in *BrokerList) DeepCopyInto(out *BrokerList)

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

func (*BrokerList) DeepCopyObject

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

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

type BrokerSpec

type BrokerSpec struct {
	// ChannelTemplate, if specified will be used to create all the Channels used internally by the
	// Broker. Only Provisioner and Arguments may be specified. If left unspecified, the default
	// Channel for the namespace will be used.
	//
	// +optional
	ChannelTemplate *ChannelSpec `json:"channelTemplate,omitempty"`
}

func (*BrokerSpec) DeepCopy

func (in *BrokerSpec) DeepCopy() *BrokerSpec

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

func (*BrokerSpec) DeepCopyInto

func (in *BrokerSpec) DeepCopyInto(out *BrokerSpec)

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

func (*BrokerSpec) SetDefaults

func (bs *BrokerSpec) SetDefaults(ctx context.Context)

func (*BrokerSpec) Validate

func (bs *BrokerSpec) Validate(ctx context.Context) *apis.FieldError

type BrokerStatus

type BrokerStatus struct {
	// inherits duck/v1alpha1 Status, which currently provides:
	// * ObservedGeneration - the 'Generation' of the Service that was last processed by the controller.
	// * Conditions - the latest available observations of a resource's current state.
	duckv1alpha1.Status `json:",inline"`

	// Broker is Addressable. It currently exposes the endpoint as a
	// fully-qualified DNS name which will distribute traffic over the
	// provided targets from inside the cluster.
	//
	// It generally has the form {broker}-router.{namespace}.svc.{cluster domain name}
	Address duckv1alpha1.Addressable `json:"address,omitempty"`
}

BrokerStatus represents the current state of a Broker.

func (*BrokerStatus) DeepCopy

func (in *BrokerStatus) DeepCopy() *BrokerStatus

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

func (*BrokerStatus) DeepCopyInto

func (in *BrokerStatus) DeepCopyInto(out *BrokerStatus)

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

func (*BrokerStatus) GetCondition

GetCondition returns the condition currently associated with the given type, or nil.

func (*BrokerStatus) InitializeConditions

func (bs *BrokerStatus) InitializeConditions()

InitializeConditions sets relevant unset conditions to Unknown state.

func (*BrokerStatus) IsReady

func (bs *BrokerStatus) IsReady() bool

IsReady returns true if the resource is ready overall.

func (*BrokerStatus) MarkFilterFailed

func (bs *BrokerStatus) MarkFilterFailed(err error)

func (*BrokerStatus) MarkFilterReady

func (bs *BrokerStatus) MarkFilterReady()

func (*BrokerStatus) MarkIngressChannelFailed

func (bs *BrokerStatus) MarkIngressChannelFailed(err error)

func (*BrokerStatus) MarkIngressChannelReady

func (bs *BrokerStatus) MarkIngressChannelReady()

func (*BrokerStatus) MarkIngressFailed

func (bs *BrokerStatus) MarkIngressFailed(err error)

func (*BrokerStatus) MarkIngressReady

func (bs *BrokerStatus) MarkIngressReady()

func (*BrokerStatus) MarkIngressSubscriptionFailed

func (bs *BrokerStatus) MarkIngressSubscriptionFailed(err error)

func (*BrokerStatus) MarkIngressSubscriptionReady

func (bs *BrokerStatus) MarkIngressSubscriptionReady()

func (*BrokerStatus) MarkTriggerChannelFailed

func (bs *BrokerStatus) MarkTriggerChannelFailed(err error)

func (*BrokerStatus) MarkTriggerChannelReady

func (bs *BrokerStatus) MarkTriggerChannelReady()

func (*BrokerStatus) SetAddress

func (bs *BrokerStatus) SetAddress(hostname string)

SetAddress makes this Broker addressable by setting the hostname. It also sets the BrokerConditionAddressable to true.

type Channel

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

	// Spec defines the desired state of the Channel.
	Spec ChannelSpec `json:"spec,omitempty"`

	// Status represents the current state of the Channel. This data may be out of
	// date.
	// +optional
	Status ChannelStatus `json:"status,omitempty"`
}

Channel is an abstract resource that implements the Addressable contract. The Provisioner provisions infrastructure to accepts events and deliver to Subscriptions.

func (*Channel) CheckImmutableFields

func (c *Channel) CheckImmutableFields(ctx context.Context, og apis.Immutable) *apis.FieldError

func (*Channel) DeepCopy

func (in *Channel) DeepCopy() *Channel

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

func (*Channel) DeepCopyInto

func (in *Channel) DeepCopyInto(out *Channel)

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

func (*Channel) DeepCopyObject

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

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

func (*Channel) SetDefaults

func (c *Channel) SetDefaults(ctx context.Context)

func (*Channel) Validate

func (c *Channel) Validate(ctx context.Context) *apis.FieldError

type ChannelList

type ChannelList struct {
	metav1.TypeMeta `json:",inline"`
	// +optional
	metav1.ListMeta `json:"metadata,omitempty"`
	Items           []Channel `json:"items"`
}

ChannelList is a collection of Channels.

func (*ChannelList) DeepCopy

func (in *ChannelList) DeepCopy() *ChannelList

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

func (*ChannelList) DeepCopyInto

func (in *ChannelList) DeepCopyInto(out *ChannelList)

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

func (*ChannelList) DeepCopyObject

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

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

type ChannelProvisionerDefaulter

type ChannelProvisionerDefaulter interface {
	// GetDefault determines the default provisioner and arguments for the given channel. It does
	// not modify the given channel. It may return nil for either or both.
	GetDefault(c *Channel) (*corev1.ObjectReference, *runtime.RawExtension)
}

ChannelProvisionerDefaulter sets the default Provisioner and Arguments on Channels that do not specify any Provisioner.

var (
	// ChannelDefaulterSingleton is the global singleton used to default Channels that do not
	// specify any provisioner.
	ChannelDefaulterSingleton ChannelProvisionerDefaulter
)

type ChannelSpec

type ChannelSpec struct {
	// TODO By enabling the status subresource metadata.generation should increment
	// thus making this property obsolete.
	//
	// We should be able to drop this property with a CRD conversion webhook
	// in the future
	//
	// +optional
	DeprecatedGeneration int64 `json:"generation,omitempty"`

	// Provisioner defines the name of the Provisioner backing this channel.
	Provisioner *corev1.ObjectReference `json:"provisioner,omitempty"`

	// Arguments defines the arguments to pass to the Provisioner which
	// provisions this Channel.
	// +optional
	Arguments *runtime.RawExtension `json:"arguments,omitempty"`

	// Channel conforms to Duck type Subscribable.
	Subscribable *eventingduck.Subscribable `json:"subscribable,omitempty"`
}

ChannelSpec specifies the Provisioner backing a channel and the configuration arguments for a Channel.

func (*ChannelSpec) DeepCopy

func (in *ChannelSpec) DeepCopy() *ChannelSpec

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

func (*ChannelSpec) DeepCopyInto

func (in *ChannelSpec) DeepCopyInto(out *ChannelSpec)

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

func (*ChannelSpec) SetDefaults

func (cs *ChannelSpec) SetDefaults(ctx context.Context)

func (*ChannelSpec) Validate

func (cs *ChannelSpec) Validate(ctx context.Context) *apis.FieldError

type ChannelStatus

type ChannelStatus struct {
	// inherits duck/v1alpha1 Status, which currently provides:
	// * ObservedGeneration - the 'Generation' of the Service that was last processed by the controller.
	// * Conditions - the latest available observations of a resource's current state.
	duckv1alpha1.Status `json:",inline"`

	// Channel is Addressable. It currently exposes the endpoint as a
	// fully-qualified DNS name which will distribute traffic over the
	// provided targets from inside the cluster.
	//
	// It generally has the form {channel}.{namespace}.svc.{cluster domain name}
	Address duckv1alpha1.Addressable `json:"address,omitempty"`

	// Internal is status unique to each ClusterChannelProvisioner.
	// +optional
	Internal *runtime.RawExtension `json:"internal,omitempty"`
}

ChannelStatus represents the current state of a Channel.

func (*ChannelStatus) DeepCopy

func (in *ChannelStatus) DeepCopy() *ChannelStatus

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

func (*ChannelStatus) DeepCopyInto

func (in *ChannelStatus) DeepCopyInto(out *ChannelStatus)

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

func (*ChannelStatus) GetCondition

GetCondition returns the condition currently associated with the given type, or nil.

func (*ChannelStatus) InitializeConditions

func (cs *ChannelStatus) InitializeConditions()

InitializeConditions sets relevant unset conditions to Unknown state.

func (*ChannelStatus) IsReady

func (cs *ChannelStatus) IsReady() bool

IsReady returns true if the resource is ready overall.

func (*ChannelStatus) MarkNotProvisioned

func (cs *ChannelStatus) MarkNotProvisioned(reason, messageFormat string, messageA ...interface{})

MarkNotProvisioned sets ChannelConditionProvisioned condition to False state.

func (*ChannelStatus) MarkProvisioned

func (cs *ChannelStatus) MarkProvisioned()

MarkProvisioned sets ChannelConditionProvisioned condition to True state.

func (*ChannelStatus) MarkProvisionerInstalled

func (cs *ChannelStatus) MarkProvisionerInstalled()

MarkProvisionerInstalled sets ChannelConditionProvisionerInstalled condition to True state.

func (*ChannelStatus) MarkProvisionerNotInstalled

func (cs *ChannelStatus) MarkProvisionerNotInstalled(reason, messageFormat string, messageA ...interface{})

MarkProvisionerNotInstalled sets ChannelConditionProvisionerInstalled condition to False state.

func (*ChannelStatus) SetAddress

func (cs *ChannelStatus) SetAddress(hostname string)

SetAddress makes this Channel addressable by setting the hostname. It also sets the ChannelConditionAddressable to true.

type ClusterChannelProvisioner

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

	// Spec defines the Types provisioned by this Provisioner.
	Spec ClusterChannelProvisionerSpec `json:"spec"`

	// Status is the current status of the Provisioner.
	// +optional
	Status ClusterChannelProvisionerStatus `json:"status,omitempty"`
}

ClusterChannelProvisioner encapsulates a provisioning strategy for the backing resources required to realize a particular resource type.

func (*ClusterChannelProvisioner) DeepCopy

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

func (*ClusterChannelProvisioner) DeepCopyInto

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

func (*ClusterChannelProvisioner) DeepCopyObject

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

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

func (*ClusterChannelProvisioner) SetDefaults

func (p *ClusterChannelProvisioner) SetDefaults(ctx context.Context)

SetDefaults defaults

func (*ClusterChannelProvisioner) Validate

Validate validates the ClusterChannelProvisioner resource.

type ClusterChannelProvisionerList

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

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

ClusterChannelProvisionerList is a list of ClusterChannelProvisioner resources

func (*ClusterChannelProvisionerList) DeepCopy

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

func (*ClusterChannelProvisionerList) DeepCopyInto

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

func (*ClusterChannelProvisionerList) DeepCopyObject

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

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

type ClusterChannelProvisionerSpec

type ClusterChannelProvisionerSpec struct {
	// TODO By enabling the status subresource metadata.generation should increment
	// thus making this property obsolete.
	//
	// We should be able to drop this property with a CRD conversion webhook
	// in the future
	//
	// +optional
	DeprecatedGeneration int64 `json:"generation,omitempty"`
}

ClusterChannelProvisionerSpec is the spec for a ClusterChannelProvisioner resource.

func (*ClusterChannelProvisionerSpec) DeepCopy

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

func (*ClusterChannelProvisionerSpec) DeepCopyInto

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

func (*ClusterChannelProvisionerSpec) SetDefaults

func (ps *ClusterChannelProvisionerSpec) SetDefaults(ctx context.Context)

SetDefaults defaults the ClusterChannelProvisioner spec.

func (*ClusterChannelProvisionerSpec) Validate

Validate validates the ClusterChannelProvisioner spec

type ClusterChannelProvisionerStatus

type ClusterChannelProvisionerStatus struct {
	// Conditions holds the state of a cluster provisioner at a point in time.
	// +optional
	// +patchMergeKey=type
	// +patchStrategy=merge
	Conditions duckv1alpha1.Conditions `json:"conditions,omitempty" patchStrategy:"merge" patchMergeKey:"type"`

	// ObservedGeneration is the 'Generation' of the ClusterChannelProvisioner that
	// was last reconciled by the controller.
	// +optional
	ObservedGeneration int64 `json:"observedGeneration,omitempty"`
}

ClusterChannelProvisionerStatus is the status for a ClusterChannelProvisioner resource

func (*ClusterChannelProvisionerStatus) DeepCopy

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

func (*ClusterChannelProvisionerStatus) DeepCopyInto

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

func (*ClusterChannelProvisionerStatus) GetCondition

GetCondition returns the condition currently associated with the given type, or nil.

func (*ClusterChannelProvisionerStatus) InitializeConditions

func (ps *ClusterChannelProvisionerStatus) InitializeConditions()

InitializeConditions sets relevant unset conditions to Unknown state.

func (*ClusterChannelProvisionerStatus) IsReady

func (ps *ClusterChannelProvisionerStatus) IsReady() bool

IsReady returns true if the resource is ready overall.

func (*ClusterChannelProvisionerStatus) MarkNotReady

func (ps *ClusterChannelProvisionerStatus) MarkNotReady(reason, messageFormat string, messageA ...interface{})

MarkProvisionerNotReady sets the condition that the provisioner is not ready to provision backing resource.

func (*ClusterChannelProvisionerStatus) MarkReady

func (ps *ClusterChannelProvisionerStatus) MarkReady()

MarkReady marks this ClusterChannelProvisioner as Ready=true.

Note that this is not the normal pattern for duck conditions, but because there is (currently) no other condition on ClusterChannelProvisioners, the normal IsReady() logic doesn't work well.

type ReplyStrategy

type ReplyStrategy struct {
	// This object must be a Channel.
	//
	// You can specify only the following fields of the ObjectReference:
	//   - Kind
	//   - APIVersion
	//   - Name
	// Kind must be "Channel" and APIVersion must be
	// "eventing.knative.dev/v1alpha1"
	// +optional
	Channel *corev1.ObjectReference `json:"channel,omitempty"`
}

ReplyStrategy specifies the handling of the SubscriberSpec's returned replies. If no SubscriberSpec is specified, the identity function is assumed.

func (*ReplyStrategy) DeepCopy

func (in *ReplyStrategy) DeepCopy() *ReplyStrategy

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

func (*ReplyStrategy) DeepCopyInto

func (in *ReplyStrategy) DeepCopyInto(out *ReplyStrategy)

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

type SubscriberSpec

type SubscriberSpec struct {

	// Reference to an object that will be used to find the target
	// endpoint, which should implement the Addressable duck type.
	// For example, this could be a reference to a Route resource
	// or a Knative Service resource.
	// TODO: Specify the required fields the target object must
	// have in the status.
	// You can specify only the following fields of the ObjectReference:
	//   - Kind
	//   - APIVersion
	//   - Name
	// +optional
	Ref *corev1.ObjectReference `json:"ref,omitempty"`

	// Deprecated: Use URI instead.
	// Reference to a 'known' endpoint where no resolving is done.
	// http://k8s-service for example
	// http://myexternalhandler.example.com/foo/bar
	// +optional
	DeprecatedDNSName *string `json:"dnsName,omitempty"`

	// Reference to a 'known' endpoint where no resolving is done.
	// http://k8s-service for example
	// http://myexternalhandler.example.com/foo/bar
	// +optional
	URI *string `json:"uri,omitempty"`
}

SubscriberSpec specifies the reference to an object that's expected to provide the resolved target of the action. Currently we inspect the objects Status and see if there's a predefined Status field that we will then use to dispatch events to be processed by the target. Currently must resolve to a k8s service or Istio virtual service. Note that in the future we should try to utilize subresources (/resolve ?) to make this cleaner, but CRDs do not support subresources yet, so we need to rely on a specified Status field today. By relying on this behaviour we can utilize a dynamic client instead of having to understand all kinds of different types of objects. As long as they adhere to this particular contract, they can be used as a Target.

This ensures that we can support external targets and for ease of use we also allow for an URI to be specified. There of course is also a requirement for the resolved SubscriberSpec to behave properly at the data plane level. TODO: Add a pointer to a real spec for this. For now, this means: Receive an event payload, and respond with one of: success and an optional response event, or failure. Delivery failures may be retried by the channel

func (*SubscriberSpec) DeepCopy

func (in *SubscriberSpec) DeepCopy() *SubscriberSpec

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

func (*SubscriberSpec) DeepCopyInto

func (in *SubscriberSpec) DeepCopyInto(out *SubscriberSpec)

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

type Subscription

type Subscription struct {
	metav1.TypeMeta   `json:",inline"`
	metav1.ObjectMeta `json:"metadata"`
	Spec              SubscriptionSpec   `json:"spec"`
	Status            SubscriptionStatus `json:"status,omitempty"`
}

Subscription routes events received on a Channel to a DNS name and corresponds to the subscriptions.channels.knative.dev CRD.

func (*Subscription) CheckImmutableFields

func (s *Subscription) CheckImmutableFields(ctx context.Context, og apis.Immutable) *apis.FieldError

func (*Subscription) DeepCopy

func (in *Subscription) DeepCopy() *Subscription

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

func (*Subscription) DeepCopyInto

func (in *Subscription) DeepCopyInto(out *Subscription)

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

func (*Subscription) DeepCopyObject

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

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

func (*Subscription) SetDefaults

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

func (*Subscription) Validate

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

type SubscriptionList

type SubscriptionList struct {
	metav1.TypeMeta `json:",inline"`
	metav1.ListMeta `json:"metadata"`
	Items           []Subscription `json:"items"`
}

SubscriptionList returned in list operations

func (*SubscriptionList) DeepCopy

func (in *SubscriptionList) DeepCopy() *SubscriptionList

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

func (*SubscriptionList) DeepCopyInto

func (in *SubscriptionList) DeepCopyInto(out *SubscriptionList)

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

func (*SubscriptionList) DeepCopyObject

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

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

type SubscriptionSpec

type SubscriptionSpec struct {
	// TODO By enabling the status subresource metadata.generation should increment
	// thus making this property obsolete.
	//
	// We should be able to drop this property with a CRD conversion webhook
	// in the future
	//
	// +optional
	DeprecatedGeneration int64 `json:"generation,omitempty"`

	// Reference to a channel that will be used to create the subscription
	// for receiving events. The channel must have spec.subscriptions
	// list which will then be modified accordingly.
	//
	// You can specify only the following fields of the ObjectReference:
	//   - Kind
	//   - APIVersion
	//   - Name
	// Kind must be "Channel" and APIVersion must be
	// "eventing.knative.dev/v1alpha1"
	//
	// This field is immutable. We have no good answer on what happens to
	// the events that are currently in the channel being consumed from
	// and what the semantics there should be. For now, you can always
	// delete the Subscription and recreate it to point to a different
	// channel, giving the user more control over what semantics should
	// be used (drain the channel first, possibly have events dropped,
	// etc.)
	Channel corev1.ObjectReference `json:"channel"`

	// Subscriber is reference to (optional) function for processing events.
	// Events from the Channel will be delivered here and replies are
	// sent to a channel as specified by the Reply.
	// +optional
	Subscriber *SubscriberSpec `json:"subscriber,omitempty"`

	// Reply specifies (optionally) how to handle events returned from
	// the Subscriber target.
	// +optional
	Reply *ReplyStrategy `json:"reply,omitempty"`
}

SubscriptionSpec specifies the Channel for incoming events, a Subscriber target for processing those events and where to put the result of the processing. Only From (where the events are coming from) is always required. You can optionally only Process the events (results in no output events) by leaving out the Result. You can also perform an identity transformation on the invoming events by leaving out the Subscriber and only specifying Result.

The following are all valid specifications: channel --[subscriber]--> reply Sink, no outgoing events: channel -- subscriber no-op function (identity transformation): channel --> reply

func (*SubscriptionSpec) DeepCopy

func (in *SubscriptionSpec) DeepCopy() *SubscriptionSpec

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

func (*SubscriptionSpec) DeepCopyInto

func (in *SubscriptionSpec) DeepCopyInto(out *SubscriptionSpec)

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

func (*SubscriptionSpec) SetDefaults

func (ss *SubscriptionSpec) SetDefaults(ctx context.Context)

func (*SubscriptionSpec) Validate

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

type SubscriptionStatus

type SubscriptionStatus struct {
	// inherits duck/v1alpha1 Status, which currently provides:
	// * ObservedGeneration - the 'Generation' of the Service that was last processed by the controller.
	// * Conditions - the latest available observations of a resource's current state.
	duckv1alpha1.Status `json:",inline"`

	// PhysicalSubscription is the fully resolved values that this Subscription represents.
	PhysicalSubscription SubscriptionStatusPhysicalSubscription `json:"physicalSubscription,omitempty"`
}

SubscriptionStatus (computed) for a subscription

func (*SubscriptionStatus) DeepCopy

func (in *SubscriptionStatus) DeepCopy() *SubscriptionStatus

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

func (*SubscriptionStatus) DeepCopyInto

func (in *SubscriptionStatus) DeepCopyInto(out *SubscriptionStatus)

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

func (*SubscriptionStatus) GetCondition

GetCondition returns the condition currently associated with the given type, or nil.

func (*SubscriptionStatus) InitializeConditions

func (ss *SubscriptionStatus) InitializeConditions()

InitializeConditions sets relevant unset conditions to Unknown state.

func (*SubscriptionStatus) IsReady

func (ss *SubscriptionStatus) IsReady() bool

IsReady returns true if the resource is ready overall.

func (*SubscriptionStatus) MarkChannelReady

func (ss *SubscriptionStatus) MarkChannelReady()

MarkChannelReady sets the ChannelReady condition to True state.

func (*SubscriptionStatus) MarkReferencesResolved

func (ss *SubscriptionStatus) MarkReferencesResolved()

MarkReferencesResolved sets the ReferencesResolved condition to True state.

type SubscriptionStatusPhysicalSubscription

type SubscriptionStatusPhysicalSubscription struct {
	// SubscriberURI is the fully resolved URI for spec.subscriber.
	SubscriberURI string `json:"subscriberURI,omitempty"`

	// ReplyURI is the fully resolved URI for the spec.reply.
	ReplyURI string `json:"replyURI,omitempty"`
}

SubscriptionStatusPhysicalSubscription represents the fully resolved values for this Subscription.

func (*SubscriptionStatusPhysicalSubscription) DeepCopy

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

func (*SubscriptionStatusPhysicalSubscription) DeepCopyInto

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

type Trigger

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

	// Spec defines the desired state of the Trigger.
	Spec TriggerSpec `json:"spec,omitempty"`

	// Status represents the current state of the Trigger. This data may be out of
	// date.
	// +optional
	Status TriggerStatus `json:"status,omitempty"`
}

func (*Trigger) CheckImmutableFields

func (t *Trigger) CheckImmutableFields(ctx context.Context, og apis.Immutable) *apis.FieldError

func (*Trigger) DeepCopy

func (in *Trigger) DeepCopy() *Trigger

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

func (*Trigger) DeepCopyInto

func (in *Trigger) DeepCopyInto(out *Trigger)

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

func (*Trigger) DeepCopyObject

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

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

func (*Trigger) SetDefaults

func (t *Trigger) SetDefaults(ctx context.Context)

func (*Trigger) Validate

func (t *Trigger) Validate(ctx context.Context) *apis.FieldError

type TriggerFilter

type TriggerFilter struct {
	SourceAndType *TriggerFilterSourceAndType `json:"sourceAndType,omitempty"`
}

func (*TriggerFilter) DeepCopy

func (in *TriggerFilter) DeepCopy() *TriggerFilter

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

func (*TriggerFilter) DeepCopyInto

func (in *TriggerFilter) DeepCopyInto(out *TriggerFilter)

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

type TriggerFilterSourceAndType

type TriggerFilterSourceAndType struct {
	Type   string `json:"type,omitempty"`
	Source string `json:"source,omitempty"`
}

TriggerFilterSourceAndType filters events based on exact matches on the cloud event's type and source attributes. Only exact matches will pass the filter. Either or both type and source can use the value 'Any' to indicate all strings match.

func (*TriggerFilterSourceAndType) DeepCopy

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

func (*TriggerFilterSourceAndType) DeepCopyInto

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

type TriggerList

type TriggerList struct {
	metav1.TypeMeta `json:",inline"`
	// +optional
	metav1.ListMeta `json:"metadata,omitempty"`
	Items           []Trigger `json:"items"`
}

TriggerList is a collection of Triggers.

func (*TriggerList) DeepCopy

func (in *TriggerList) DeepCopy() *TriggerList

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

func (*TriggerList) DeepCopyInto

func (in *TriggerList) DeepCopyInto(out *TriggerList)

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

func (*TriggerList) DeepCopyObject

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

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

type TriggerSpec

type TriggerSpec struct {
	// Broker is the broker that this trigger receives events from. If not specified, will default
	// to 'default'.
	Broker string `json:"broker,omitempty"`

	// Filter is the filter to apply against all events from the Broker. Only events that pass this
	// filter will be sent to the Subscriber. If not specified, will default to allowing all events.
	//
	// +optional
	Filter *TriggerFilter `json:"filter,omitempty"`

	// Subscriber is the addressable that receives events from the Broker that pass the Filter. It
	// is required.
	Subscriber *SubscriberSpec `json:"subscriber,omitempty"`
}

func (*TriggerSpec) DeepCopy

func (in *TriggerSpec) DeepCopy() *TriggerSpec

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

func (*TriggerSpec) DeepCopyInto

func (in *TriggerSpec) DeepCopyInto(out *TriggerSpec)

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

func (*TriggerSpec) SetDefaults

func (ts *TriggerSpec) SetDefaults(ctx context.Context)

func (*TriggerSpec) Validate

func (ts *TriggerSpec) Validate(ctx context.Context) *apis.FieldError

type TriggerStatus

type TriggerStatus struct {
	// inherits duck/v1alpha1 Status, which currently provides:
	// * ObservedGeneration - the 'Generation' of the Service that was last processed by the controller.
	// * Conditions - the latest available observations of a resource's current state.
	duckv1alpha1.Status `json:",inline"`

	// SubscriberURI is the resolved URI of the receiver for this Trigger.
	SubscriberURI string `json:"subscriberURI,omitempty"`
}

TriggerStatus represents the current state of a Trigger.

func (*TriggerStatus) DeepCopy

func (in *TriggerStatus) DeepCopy() *TriggerStatus

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

func (*TriggerStatus) DeepCopyInto

func (in *TriggerStatus) DeepCopyInto(out *TriggerStatus)

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

func (*TriggerStatus) GetCondition

GetCondition returns the condition currently associated with the given type, or nil.

func (*TriggerStatus) InitializeConditions

func (ts *TriggerStatus) InitializeConditions()

InitializeConditions sets relevant unset conditions to Unknown state.

func (*TriggerStatus) IsReady

func (ts *TriggerStatus) IsReady() bool

IsReady returns true if the resource is ready overall.

func (*TriggerStatus) MarkBrokerDoesNotExist

func (ts *TriggerStatus) MarkBrokerDoesNotExist()

func (*TriggerStatus) MarkBrokerExists

func (ts *TriggerStatus) MarkBrokerExists()

func (*TriggerStatus) MarkKubernetesServiceExists

func (ts *TriggerStatus) MarkKubernetesServiceExists()

func (*TriggerStatus) MarkNotSubscribed

func (ts *TriggerStatus) MarkNotSubscribed(reason, messageFormat string, messageA ...interface{})

func (*TriggerStatus) MarkSubscribed

func (ts *TriggerStatus) MarkSubscribed()

func (*TriggerStatus) MarkVirtualServiceExists

func (ts *TriggerStatus) MarkVirtualServiceExists()

Jump to

Keyboard shortcuts

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