v1alpha1

package
v0.0.0-...-d5b48cf Latest Latest
Warning

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

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

Documentation

Overview

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

Index

Constants

This section is empty.

Variables

View Source
var (
	SchemeBuilder = runtime.NewSchemeBuilder(addKnownTypes)
	AddToScheme   = SchemeBuilder.AddToScheme
)
View Source
var SchemeGroupVersion = schema.GroupVersion{Group: flows.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 EventTrigger

type EventTrigger struct {
	// Required. The type of event to observe. For example:
	// `google.storage.object.finalize` and
	// `google.firebase.analytics.event.log`.
	//
	// Event type consists of three parts:
	//  1. namespace: The domain name of the organization in reverse-domain
	//     notation (e.g. `acme.net` appears as `net.acme`) and any orginization
	//     specific subdivisions. If the organization's top-level domain is `com`,
	//     the top-level domain is ommited (e.g. `google.com` appears as
	//     `google`). For example, `google.storage` and
	//     `google.firebase.analytics`.
	//  2. resource type: The type of resource on which event occurs. For
	//     example, the Google Cloud Storage API includes the types `object`
	//     and `bucket`.
	//  3. action: The action that generates the event. For example, actions for
	//     a Google Cloud Storage Object include 'finalize' and 'delete'.
	// These parts are lower case and joined by '.'.
	EventType string `json:"eventType"`

	// Required. The resource(s) from which to observe events, for example,
	// `projects/_/buckets/myBucket/objects/{objectPath=**}`.
	//
	// Can be a specific resource or use wildcards to match a set of resources.
	// Wildcards can either match a single segment in the resource name,
	// using '*', or multiple segments, using '**'. For example,
	// `projects/myProject/buckets/*/objects/**` would match all objects in all
	// buckets in the 'myProject' project.
	//
	// The contents of wildcards can also be captured. This is done by assigning
	// it to a variable name in braces. For example,
	// `projects/myProject/buckets/{bucket_id=*}/objects/{object_path=**}`.
	// Additionally, a single segment capture can omit `=*` and a multiple segment
	// capture can specify additional structure. For example, the following
	// all match the same buckets, but capture different data:
	//     `projects/myProject/buckets/*/objects/users/*/data/**`
	//     `projects/myProject/buckets/{bucket_id=*}/objects/users/{user_id}/data/{data_path=**}`
	//     `projects/myProject/buckets/{bucket_id}/objects/{object_path=users/*/data/**}`
	//
	// Not all syntactically correct values are accepted by all services. For
	// example:
	//
	// 1. The authorization model must support it. Google Cloud Functions
	//    only allows EventTriggers to be deployed that observe resources in the
	//    same project as the `CloudFunction`.
	// 2. The resource type must match the pattern expected for an
	//    `event_type`. For example, an `EventTrigger` that has an
	//    `event_type` of "google.pubsub.topic.publish" should have a resource
	//    that matches Google Cloud Pub/Sub topics.
	//
	// Additionally, some services may support short names when creating an
	// `EventTrigger`. These will always be returned in the normalized "long"
	// format.
	//
	// See each *service's* documentation for supported formats.
	Resource string `json:"resource"`

	// The hostname of the service that should be observed.
	//
	// If no string is provided, the default service implementing the API will
	// be used. For example, `storage.googleapis.com` is the default for all
	// event types in the 'google.storage` namespace.
	Service string `json:"service"`

	// Parameters is what's necessary to create the subscription.
	// This is specific to each Source. Opaque to platform, only consumed
	// by the actual trigger actuator.
	// NOTE: experimental field.
	Parameters *runtime.RawExtension `json:"parameters,omitempty"`

	// ParametersFrom are pointers to secrets that contain sensitive
	// parameters. Opaque to platform, merged in with Parameters and consumed
	// by the actual trigger actuator.
	// NOTE: experimental field. All secrets in ParametersFrom will be
	// resolved and given to event sources in the Parameters field.
	ParametersFrom []feedsv1alpha1.ParametersFromSource `json:"parametersFrom,omitempty"`
}

EventTrigger specifies the intention that a particular event type and resource should be consumed.

func (*EventTrigger) DeepCopy

func (in *EventTrigger) DeepCopy() *EventTrigger

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

func (*EventTrigger) DeepCopyInto

func (in *EventTrigger) DeepCopyInto(out *EventTrigger)

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

func (*EventTrigger) SetDefaults

func (et *EventTrigger) SetDefaults()

func (*EventTrigger) Validate

func (et *EventTrigger) Validate() *apis.FieldError

type Flow

type Flow struct {
	metav1.TypeMeta   `json:",inline"`
	metav1.ObjectMeta `json:"metadata,omitempty"`

	Spec   FlowSpec   `json:"spec"`
	Status FlowStatus `json:"status"`
}

Flow connects an event source with an action that processes events produced by the event source. The flow controller handles creating the lower-level eventing primitives (Feeds, Channels, Subscriptions) used to implement flows.

func (*Flow) CheckImmutableFields

func (current *Flow) CheckImmutableFields(og apis.Immutable) *apis.FieldError

func (*Flow) DeepCopy

func (in *Flow) DeepCopy() *Flow

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

func (*Flow) DeepCopyInto

func (in *Flow) DeepCopyInto(out *Flow)

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

func (*Flow) DeepCopyObject

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

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

func (*Flow) SetDefaults

func (f *Flow) SetDefaults()

func (*Flow) Validate

func (f *Flow) Validate() *apis.FieldError

type FlowAction

type FlowAction struct {

	// Reference to an object that will be used to find the target
	// endpoint.
	// For example, this could be a reference to a Route resource
	// or a Configuration 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
	Target *corev1.ObjectReference `json:"target,omitempty"`

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

FlowAction 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 give to Feed object as the target. Currently must resolve to a k8s service or Istio virtual service. Note that by in the future we should try to utilize subresources (/resolve ?) to utilize this, 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. To ensure that we can support external targets and for ease of use we also allow for an URI to be specified.

func (*FlowAction) DeepCopy

func (in *FlowAction) DeepCopy() *FlowAction

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

func (*FlowAction) DeepCopyInto

func (in *FlowAction) DeepCopyInto(out *FlowAction)

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

func (*FlowAction) SetDefaults

func (fa *FlowAction) SetDefaults()

func (*FlowAction) Validate

func (fa *FlowAction) Validate() *apis.FieldError

type FlowCondition

type FlowCondition struct {
	Type FlowConditionType `json:"type"`

	Status corev1.ConditionStatus `json:"status" description:"status of the condition, one of True, False, Unknown"`
	// +optional
	Reason string `json:"reason,omitempty" description:"one-word CamelCase reason for the condition's last transition"`
	// +optional
	Message string `json:"message,omitempty" description:"human-readable message indicating details about last transition"`
}

FlowCondition defines a readiness condition for a Flow. See: https://github.com/kubernetes/community/blob/master/contributors/devel/api-conventions.md#typical-status-properties

func (*FlowCondition) DeepCopy

func (in *FlowCondition) DeepCopy() *FlowCondition

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

func (*FlowCondition) DeepCopyInto

func (in *FlowCondition) DeepCopyInto(out *FlowCondition)

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

type FlowConditionType

type FlowConditionType string
const (
	// FlowConditionReady specifies that the Flow has been configured successfully.
	FlowConditionReady FlowConditionType = "Ready"

	// FlowConditionFeedReady specifies that the Feed has been configured successfully.
	FlowConditionFeedReady FlowConditionType = "FeedReady"

	// FlowConditionChannelReady specifies that the Channel has been configured successfully.
	FlowConditionChannelReady FlowConditionType = "ChannelReady"

	// FlowConditionSubscriptionReady specifies that the Subscription has been configured successfully.
	FlowConditionSubscriptionReady FlowConditionType = "SubscriptionReady"

	// FlowConditionActionTargetResolved specifies that the Action Target has been resolved
	FlowConditionActionTargetResolved FlowConditionType = "ActionTargetResolved"
)

type FlowList

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

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

FlowList is a list of Flow resources

func (*FlowList) DeepCopy

func (in *FlowList) DeepCopy() *FlowList

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

func (*FlowList) DeepCopyInto

func (in *FlowList) DeepCopyInto(out *FlowList)

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

func (*FlowList) DeepCopyObject

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

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

type FlowSpec

type FlowSpec struct {
	// Action specifies the target handler for the events
	Action FlowAction `json:"action"`

	// Trigger specifies the trigger we're creating a Flow to
	Trigger EventTrigger `json:"trigger"`

	// Service Account to use when creating the underlying Feed.
	// If left out, uses "default"
	ServiceAccountName string `json:"serviceAccountName,omitempty"`
}

FlowSpec is the spec for a Flow resource.

func (*FlowSpec) DeepCopy

func (in *FlowSpec) DeepCopy() *FlowSpec

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

func (*FlowSpec) DeepCopyInto

func (in *FlowSpec) DeepCopyInto(out *FlowSpec)

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

func (*FlowSpec) SetDefaults

func (fs *FlowSpec) SetDefaults()

func (*FlowSpec) Validate

func (fs *FlowSpec) Validate() *apis.FieldError

type FlowStatus

type FlowStatus struct {
	Conditions []FlowCondition `json:"conditions,omitempty"`

	// FlowContext is what the Flow operation returns and holds enough information
	// to perform cleanup once a Flow is deleted.
	// NOTE: experimental field.
	FlowContext *runtime.RawExtension `json:"flowContext,omitempty"`

	// ChannelTarget is the name of the target channel
	ChannelTarget string `json:"channelTarget,omitempty"`

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

FlowStatus is the status for a Flow resource

func (*FlowStatus) DeepCopy

func (in *FlowStatus) DeepCopy() *FlowStatus

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

func (*FlowStatus) DeepCopyInto

func (in *FlowStatus) DeepCopyInto(out *FlowStatus)

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

func (*FlowStatus) GetCondition

func (fs *FlowStatus) GetCondition(t FlowConditionType) *FlowCondition

func (*FlowStatus) InitializeConditions

func (fs *FlowStatus) InitializeConditions()

func (*FlowStatus) IsReady

func (fs *FlowStatus) IsReady() bool

func (*FlowStatus) PropagateActionTargetResolved

func (fs *FlowStatus) PropagateActionTargetResolved(status corev1.ConditionStatus, reason string, message string)

func (*FlowStatus) PropagateChannelStatus

func (fs *FlowStatus) PropagateChannelStatus(cs channelsv1alpha1.ChannelStatus)

func (*FlowStatus) PropagateFeedStatus

func (fs *FlowStatus) PropagateFeedStatus(s feedsv1alpha1.FeedStatus)

func (*FlowStatus) PropagateSubscriptionStatus

func (fs *FlowStatus) PropagateSubscriptionStatus(ss channelsv1alpha1.SubscriptionStatus)

Jump to

Keyboard shortcuts

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