v1alpha1

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: Aug 11, 2020 License: Apache-2.0 Imports: 18 Imported by: 0

Documentation

Overview

Package v1alpha1 contains API Schema definitions for the sources/v1alpha1 API group. +k8s:deepcopy-gen=package +groupName=sources.triggermesh.io

Index

Constants

View Source
const (
	// AzureActivityLogsConditionReady has status True when the source is ready to send events.
	AzureActivityLogsConditionReady = apis.ConditionReady
	// AzureActivityLogsConditionDiagnosticSettings has status True when diagnostic settings exist for the source.
	AzureActivityLogsConditionDiagnosticSettings apis.ConditionType = "DiagnosticSettings"
)

Status conditions

View Source
const (
	// ConditionReady has status True when the source is ready to send events.
	ConditionReady = apis.ConditionReady
	// ConditionSinkProvided has status True when the source has been configured with a sink target.
	ConditionSinkProvided apis.ConditionType = "SinkProvided"
	// ConditionDeployed has status True when the source'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"

	// ReasonUnavailable is set on a Deployed condition when an adapter in unavailable.
	ReasonUnavailable = "AdapterUnavailable"
)

Reasons for status conditions

View Source
const (
	// https://docs.microsoft.com/en-us/azure/azure-monitor/platform/activity-log-schema
	AzureActivityLogsActivityLogEventType = "activity-log"
)

Supported event types

View Source
const (
	// AzureActivityLogsReasonFailedSync is set on a condition when some external resource can not be reconciled.
	AzureActivityLogsReasonFailedSync = "FailedSync"
)

Reasons for status conditions

View Source
const (
	AzureEventHubGenericEventType = "message"
)

Supported event types

Variables

View Source
var (
	// SchemeGroupVersion contains the group and version used to register types for this custom API.
	SchemeGroupVersion = schema.GroupVersion{Group: sources.GroupName, Version: "v1alpha1"}
	// 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
)

Functions

func AzureEventType

func AzureEventType(service, eventType string) string

AzureEventType returns an event type in a format suitable for usage as a CloudEvent type attribute.

func EventType

func EventType(service, eventType string) string

EventType returns an event type in a format suitable for usage as a CloudEvent type attribute.

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.

func WithSource

func WithSource(ctx context.Context, s EventSource) context.Context

WithSource returns a copy of the parent context in which the value associated with the source key is the given event source.

Types

type AzureActivityLogsSource

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

	Spec   AzureActivityLogsSourceSpec   `json:"spec,omitempty"`
	Status AzureActivityLogsSourceStatus `json:"status,omitempty"`
}

AzureActivityLogsSource is the Schema for the event source.

func (*AzureActivityLogsSource) AsEventSource added in v0.4.1

func (s *AzureActivityLogsSource) AsEventSource() string

AsEventSource implements EventSource.

func (*AzureActivityLogsSource) DeepCopy

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

func (*AzureActivityLogsSource) DeepCopyInto

func (in *AzureActivityLogsSource) DeepCopyInto(out *AzureActivityLogsSource)

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

func (*AzureActivityLogsSource) DeepCopyObject

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

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

func (*AzureActivityLogsSource) GetConditionSet

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

GetConditionSet implements duckv1.KRShaped.

func (*AzureActivityLogsSource) GetEventTypes

func (s *AzureActivityLogsSource) GetEventTypes() []string

GetEventTypes returns the event types generated by the source.

func (*AzureActivityLogsSource) GetGroupVersionKind

func (s *AzureActivityLogsSource) GetGroupVersionKind() schema.GroupVersionKind

GetGroupVersionKind implements kmeta.OwnerRefable.

func (*AzureActivityLogsSource) GetSink

GetSink implements EventSource.

func (*AzureActivityLogsSource) GetSourceStatus

func (s *AzureActivityLogsSource) GetSourceStatus() *EventSourceStatus

GetSourceStatus implements EventSource.

func (*AzureActivityLogsSource) GetStatus

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

GetStatus implements duckv1.KRShaped.

type AzureActivityLogsSourceList

type AzureActivityLogsSourceList struct {
	metav1.TypeMeta `json:",inline"`
	metav1.ListMeta `json:"metadata,omitempty"`
	Items           []AzureActivityLogsSource `json:"items"`
}

AzureActivityLogsSourceList contains a list of event sources.

func (*AzureActivityLogsSourceList) DeepCopy

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

func (*AzureActivityLogsSourceList) DeepCopyInto

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

func (*AzureActivityLogsSourceList) DeepCopyObject

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

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

type AzureActivityLogsSourceSpec

type AzureActivityLogsSourceSpec struct {
	duckv1.SourceSpec `json:",inline"`

	// Resource ID of an SAS policy with Manage permissions on an Event Hubs namespace.
	// Besides the SAS policy name itself, the resource ID contains the subscription ID, resource group name
	// and Event Hubs namespace to uniquely identify the rule.
	// Format: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/authorizationRules/{authorizationRuleName}
	// References:
	//  * https://docs.microsoft.com/en-us/rest/api/eventhub/2017-04-01/authorization%20rules%20-%20namespaces/getauthorizationrule
	//  * https://docs.microsoft.com/en-us/azure/event-hubs/authorize-access-shared-access-signature
	EventHubsSASPolicyID EventHubsSASPolicyResourceID `json:"eventHubsSASPolicyID"`

	// Categories of Activity Logs to collect.
	// All available categories are selected when this attribute is empty.
	// https://docs.microsoft.com/en-us/azure/azure-monitor/platform/activity-log-schema#categories
	// +optional
	Categories []string `json:"categories,omitempty"`

	// Name of an Event Hub to send data to.
	// When this attribute is set, an Event Hub with the given name MUST already exist within the namespace.
	// When this attribute is not set, Azure creates an Event Hub with the name 'insights-activity-logs'.
	// +optional
	EventHubName *string `json:"eventHubName,omitempty"`

	// Authentication method to interact with the Azure Monitor REST API.
	// This event source only supports the ServicePrincipal authentication.
	Auth AzureAuth `json:"auth"`
}

AzureActivityLogsSourceSpec defines the desired state of the event source.

func (*AzureActivityLogsSourceSpec) DeepCopy

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

func (*AzureActivityLogsSourceSpec) DeepCopyInto

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

type AzureActivityLogsSourceStatus

type AzureActivityLogsSourceStatus struct {
	EventSourceStatus `json:",inline"`
}

AzureActivityLogsSourceStatus defines the observed state of the event source.

func (*AzureActivityLogsSourceStatus) DeepCopy

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

func (*AzureActivityLogsSourceStatus) DeepCopyInto

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

func (*AzureActivityLogsSourceStatus) MarkDiagnosticSettings

func (s *AzureActivityLogsSourceStatus) MarkDiagnosticSettings()

MarkDiagnosticSettings sets the DiagnosticSettings condition to True.

func (*AzureActivityLogsSourceStatus) MarkNoDiagnosticSettings

func (s *AzureActivityLogsSourceStatus) MarkNoDiagnosticSettings(hasDiagSettings bool, msg string)

MarkNoDiagnosticSettings sets the DiagnosticSettings condition to False or Unknown with the given message, depending on the existence of diagnostic settings.

type AzureAuth

type AzureAuth struct {
	// SASToken contains either Azure Connection string
	// or a key-value pair required to produce an access token.
	// See https://docs.microsoft.com/en-us/azure/storage/common/storage-sas-overview
	SASToken *AzureSASToken `json:"sasToken,omitempty"`

	// Service principals provide a way to create a non-interactive account
	// associated with your identity to which you grant only the privileges
	// your app needs to run.
	// See https://docs.microsoft.com/en-us/azure/active-directory/develop/app-objects-and-service-principals
	ServicePrincipal *AzureServicePrincipal `json:"servicePrincipal,omitempty"`
}

AzureAuth contains multiple authentication methods for Azure services.

func (*AzureAuth) DeepCopy

func (in *AzureAuth) DeepCopy() *AzureAuth

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

func (*AzureAuth) DeepCopyInto

func (in *AzureAuth) DeepCopyInto(out *AzureAuth)

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

type AzureEventHubSource

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

	Spec   AzureEventHubSourceSpec `json:"spec,omitempty"`
	Status EventSourceStatus       `json:"status,omitempty"`
}

AzureEventHubSource is the Schema for the event source.

func (*AzureEventHubSource) AsEventSource added in v0.4.1

func (s *AzureEventHubSource) AsEventSource() string

AsEventSource implements EventSource.

func (*AzureEventHubSource) DeepCopy

func (in *AzureEventHubSource) DeepCopy() *AzureEventHubSource

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

func (*AzureEventHubSource) DeepCopyInto

func (in *AzureEventHubSource) DeepCopyInto(out *AzureEventHubSource)

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

func (*AzureEventHubSource) DeepCopyObject

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

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

func (*AzureEventHubSource) GetConditionSet

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

GetConditionSet implements duckv1.KRShaped.

func (*AzureEventHubSource) GetEventTypes added in v0.4.1

func (s *AzureEventHubSource) GetEventTypes() []string

GetEventTypes returns the event types generated by the source.

func (*AzureEventHubSource) GetGroupVersionKind

func (s *AzureEventHubSource) GetGroupVersionKind() schema.GroupVersionKind

GetGroupVersionKind implements kmeta.OwnerRefable.

func (*AzureEventHubSource) GetSink

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

GetSink implements EventSource.

func (*AzureEventHubSource) GetSourceStatus

func (s *AzureEventHubSource) GetSourceStatus() *EventSourceStatus

GetSourceStatus implements EventSource.

func (*AzureEventHubSource) GetStatus

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

GetStatus implements duckv1.KRShaped.

func (*AzureEventHubSource) SetDefaults

func (s *AzureEventHubSource) SetDefaults(_ context.Context)

SetDefaults implements apis.Defaultable.

func (*AzureEventHubSource) Validate

Validate implements apis.Validatable.

type AzureEventHubSourceList

type AzureEventHubSourceList struct {
	metav1.TypeMeta `json:",inline"`
	metav1.ListMeta `json:"metadata,omitempty"`
	Items           []AzureEventHubSource `json:"items"`
}

AzureEventHubSourceList contains a list of event sources.

func (*AzureEventHubSourceList) DeepCopy

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

func (*AzureEventHubSourceList) DeepCopyInto

func (in *AzureEventHubSourceList) DeepCopyInto(out *AzureEventHubSourceList)

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

func (*AzureEventHubSourceList) DeepCopyObject

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

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

type AzureEventHubSourceSpec

type AzureEventHubSourceSpec struct {
	duckv1.SourceSpec `json:",inline"`

	// Authentication method to interact with the Azure Event Hubs API.
	Auth AzureAuth `json:"auth"`

	// If we use SP account or SAS token key, we must specify which
	// Event Hub to use
	HubNamespace string `json:"hubNamespace"`
	HubName      string `json:"hubName"`
}

AzureEventHubSourceSpec defines the desired state of the event source.

func (*AzureEventHubSourceSpec) DeepCopy

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

func (*AzureEventHubSourceSpec) DeepCopyInto

func (in *AzureEventHubSourceSpec) DeepCopyInto(out *AzureEventHubSourceSpec)

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

func (*AzureEventHubSourceSpec) ValidateSpec

ValidateSpec validates Azure Event Hub spec parameters

type AzureSASToken

type AzureSASToken struct {
	KeyName          *string `json:"keyName"`
	KeyValue         *string `json:"keyValue"`
	ConnectionString *string `json:"connectionString"`
}

AzureSASToken represents Azure shared access signatures auth.

func (*AzureSASToken) DeepCopy

func (in *AzureSASToken) DeepCopy() *AzureSASToken

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

func (*AzureSASToken) DeepCopyInto

func (in *AzureSASToken) DeepCopyInto(out *AzureSASToken)

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

type AzureServicePrincipal

type AzureServicePrincipal struct {
	TenantID     ValueFromField `json:"tenantID"`
	ClientID     ValueFromField `json:"clientID"`
	ClientSecret ValueFromField `json:"clientSecret"`
}

AzureServicePrincipal represents an AAD Service Principal.

func (*AzureServicePrincipal) DeepCopy

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

func (*AzureServicePrincipal) DeepCopyInto

func (in *AzureServicePrincipal) DeepCopyInto(out *AzureServicePrincipal)

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

type EventHubsSASPolicyResourceID

type EventHubsSASPolicyResourceID struct {
	SubscriptionID    string
	ResourceGroup     string
	Namespace         string
	AuthorizationRule string
}

EventHubsSASPolicyResourceID represents a resource ID for an Event Hubs SAS policy.

func (*EventHubsSASPolicyResourceID) DeepCopy

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

func (*EventHubsSASPolicyResourceID) DeepCopyInto

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

func (EventHubsSASPolicyResourceID) MarshalText

func (rID EventHubsSASPolicyResourceID) MarshalText() ([]byte, error)

MarshalText implements encoding.TextMarshaler

func (*EventHubsSASPolicyResourceID) String

func (rID *EventHubsSASPolicyResourceID) String() string

String implements the fmt.Stringer interface.

func (*EventHubsSASPolicyResourceID) UnmarshalText

func (rID *EventHubsSASPolicyResourceID) UnmarshalText(data []byte) error

UnmarshalText implements encoding.TextUnmarshaler

type EventSource

type EventSource interface {
	metav1.Object
	runtime.Object
	// OwnerRefable is used to construct a generic reconciler for each
	// source type, and convert source 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 source's event sink.
	GetSink() *duckv1.Destination
	// GetSourceStatus returns the source's status.
	GetSourceStatus() *EventSourceStatus
	// GetEventTypes returns the event types generated by the source.
	GetEventTypes() []string
	// AsEventSource returns a unique reference to the source suitable for
	// use as a CloudEvent source attribute.
	AsEventSource() string
}

EventSource is implemented by all event source types.

func SourceFromContext

func SourceFromContext(ctx context.Context) EventSource

SourceFromContext returns the source stored in the context.

type EventSourceStatus

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

EventSourceStatus defines the observed state of an event source.

func (*EventSourceStatus) DeepCopy

func (in *EventSourceStatus) DeepCopy() *EventSourceStatus

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

func (*EventSourceStatus) DeepCopyInto

func (in *EventSourceStatus) DeepCopyInto(out *EventSourceStatus)

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

func (*EventSourceStatus) InitializeConditions

func (s *EventSourceStatus) InitializeConditions()

InitializeConditions sets relevant unset conditions to Unknown state.

func (*EventSourceStatus) MarkNoSink

func (s *EventSourceStatus) MarkNoSink()

MarkNoSink sets the SinkProvided condition to False.

func (*EventSourceStatus) MarkSink

func (s *EventSourceStatus) MarkSink(uri *apis.URL)

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

func (*EventSourceStatus) PropagateAvailability

func (s *EventSourceStatus) PropagateAvailability(obj interface{})

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

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