v1alpha1

package
v0.0.0-...-9108ab0 Latest Latest
Warning

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

Go to latest
Published: Aug 13, 2019 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Overview

Package v1alpha1 is the v1alpha1 version of the API. +groupName=sources.aikas.org

Index

Constants

View Source
const (
	// GCSConditionReady has status True when the GCSSource is ready to send events.
	GCSConditionReady = duckv1alpha1.ConditionReady

	// PubSubSourceReady has status True when the underlying GCP PubSub Source is ready
	PubSubSourceReady duckv1alpha1.ConditionType = "PubSubSourceReady"

	// PubSubTopicReady has status True when the underlying GCP PubSub topic is ready
	PubSubTopicReady duckv1alpha1.ConditionType = "PubSubTopicReady"

	// GCSReady has status True when GCS has been configured properly to send Notification events
	GCSReady duckv1alpha1.ConditionType = "GCSReady"
)

Variables

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

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

	Spec   GCSSourceSpec   `json:"spec"`
	Status GCSSourceStatus `json:"status"`
}

GCSSource is a specification for a GCSSource resource

func (*GCSSource) DeepCopy

func (in *GCSSource) DeepCopy() *GCSSource

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

func (*GCSSource) DeepCopyInto

func (in *GCSSource) DeepCopyInto(out *GCSSource)

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

func (*GCSSource) DeepCopyObject

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

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

func (*GCSSource) GetGroupVersionKind

func (gcsSource *GCSSource) GetGroupVersionKind() schema.GroupVersionKind

type GCSSourceList

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

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

GCSSourceList is a list of GCSSource resources

func (*GCSSourceList) DeepCopy

func (in *GCSSourceList) DeepCopy() *GCSSourceList

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

func (*GCSSourceList) DeepCopyInto

func (in *GCSSourceList) DeepCopyInto(out *GCSSourceList)

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

func (*GCSSourceList) DeepCopyObject

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

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

type GCSSourceSpec

type GCSSourceSpec struct {
	// GCSCredsSecret is the credential to use to create the Notification on the GCS bucket.
	// The value of the secret entry must be a service account key in the JSON format (see
	// https://cloud.google.com/iam/docs/creating-managing-service-account-keys).
	GCSCredsSecret corev1.SecretKeySelector `json:"gcsCredsSecret"`

	// GcpCredsSecret is the credential to use to poll the GCP PubSub Subscription. It is not used
	// to create or delete the Subscription, only to poll it. The value of the secret entry must be
	// a service account key in the JSON format (see
	// https://cloud.google.com/iam/docs/creating-managing-service-account-keys).
	// If omitted, uses GCSCredsSecret from above
	// +optional
	GcpCredsSecret *corev1.SecretKeySelector `json:"gcpCredsSecret,omitempty"`

	// ServiceAccountName holds the name of the Kubernetes service account
	// as which the underlying K8s resources should be run. If unspecified
	// this will default to the "default" service account for the namespace
	// in which the GCSSource exists.
	// +optional
	ServiceAccountName string `json:"serviceAccountName,omitempty"`

	// GoogleCloudProject is the ID of the Google Cloud Project that the PubSub Topic exists in.
	GoogleCloudProject string `json:"googleCloudProject,omitempty"`

	// Bucket to subscribe to
	Bucket string `json:"bucket"`

	// EventTypes to subscribe to
	EventTypes []string `json:"eventTypes,omitempty"`

	// ObjectNamePrefix limits the notifications to objects with this prefix
	// +optional
	ObjectNamePrefix string `json:"objectNamePrefix,omitempty"`

	// CustomAttributes is the optional list of additional attributes to attach to each Cloud PubSub
	// message published for this notification subscription.
	// +optional
	CustomAttributes map[string]string `json:"customAttributes,omitempty"`

	// PayloadFormat specifies the contents of the message payload.
	// See https://cloud.google.com/storage/docs/pubsub-notifications#payload.
	// +optional
	PayloadFormat string `json:"payloadFormat,omitempty"`

	// Sink is a reference to an object that will resolve to a domain name to use
	// as the sink.
	// +optional
	Sink *corev1.ObjectReference `json:"sink,omitempty"`
}

GCSSourceSpec is the spec for a GCSSource resource

func (*GCSSourceSpec) DeepCopy

func (in *GCSSourceSpec) DeepCopy() *GCSSourceSpec

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

func (*GCSSourceSpec) DeepCopyInto

func (in *GCSSourceSpec) DeepCopyInto(out *GCSSourceSpec)

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

type GCSSourceStatus

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

	// TODO: add conditions and other stuff here...
	// NotificationID is the ID that GCS identifies this notification as.
	// +optional
	NotificationID string `json:"notificationID,omitempty"`

	// Topic where the notifications are sent to.
	// +optional
	Topic string `json:"topic,omitempty"`

	// SinkURI is the current active sink URI that has been configured for the GCSSource.
	// +optional
	SinkURI string `json:"sinkUri,omitempty"`
}

GCSSourceStatus is the status for a GCSSource resource

func (*GCSSourceStatus) DeepCopy

func (in *GCSSourceStatus) DeepCopy() *GCSSourceStatus

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

func (*GCSSourceStatus) DeepCopyInto

func (in *GCSSourceStatus) DeepCopyInto(out *GCSSourceStatus)

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

func (*GCSSourceStatus) GetCondition

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

func (*GCSSourceStatus) InitializeConditions

func (s *GCSSourceStatus) InitializeConditions()

InitializeConditions sets relevant unset conditions to Unknown state.

func (*GCSSourceStatus) IsReady

func (s *GCSSourceStatus) IsReady() bool

IsReady returns true if the resource is ready overall.

func (*GCSSourceStatus) MarkGCSNotReady

func (s *GCSSourceStatus) MarkGCSNotReady(reason, messageFormat string, messageA ...interface{})

MarkGCSNotReady sets the condition that the GCS has been configured to send Notifications

func (*GCSSourceStatus) MarkGCSReady

func (s *GCSSourceStatus) MarkGCSReady()

func (*GCSSourceStatus) MarkPubSubSourceNotReady

func (s *GCSSourceStatus) MarkPubSubSourceNotReady(reason, messageFormat string, messageA ...interface{})

MarkPubSubNotSourceReady sets the condition that the underlying PubSub source is not ready and why

func (*GCSSourceStatus) MarkPubSubSourceReady

func (s *GCSSourceStatus) MarkPubSubSourceReady()

MarkPubSubSourceReady sets the condition that the underlying PubSub source is ready

func (*GCSSourceStatus) MarkPubSubTopicNotReady

func (s *GCSSourceStatus) MarkPubSubTopicNotReady(reason, messageFormat string, messageA ...interface{})

MarkPubSubTopicNotReady sets the condition that the PubSub topic was not created and why

func (*GCSSourceStatus) MarkPubSubTopicReady

func (s *GCSSourceStatus) MarkPubSubTopicReady()

MarkPubSubTopicReady sets the condition that the underlying PubSub topic was created successfully

Jump to

Keyboard shortcuts

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