v1

package
v0.23.0 Latest Latest
Warning

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

Go to latest
Published: May 25, 2021 License: Apache-2.0 Imports: 13 Imported by: 10

Documentation

Overview

+k8s:deepcopy-gen=package +groupName=duck.cloud.google.com

Index

Constants

View Source
const (
	// TopicReady has status True when the PubSub Topic is ready.
	TopicReady apis.ConditionType = "TopicReady"

	// PullSubscriptionReay has status True when the PullSubscription is ready.
	PullSubscriptionReady apis.ConditionType = "PullSubscriptionReady"
)
View Source
const (
	IdentityConfigured apis.ConditionType = "WorkloadIdentityConfigured"
)

Variables

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

SchemeGroupVersion is group version used to register these objects

Functions

func GroupResource

func GroupResource(resource string) schema.GroupResource

GroupResource takes an unqualified resource and returns a Group qualified GroupResource

func Kind

func Kind(kind string) schema.GroupKind

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

Types

type IdentitySpec

type IdentitySpec struct {
	// ServiceAccountName is the k8s service account which binds to a google service account.
	// This google service account has required permissions to poll from a Cloud Pub/Sub subscription.
	// If not specified, defaults to use secret.
	// +optional
	ServiceAccountName string `json:"serviceAccountName,omitempty"`
}

func (*IdentitySpec) DeepCopy

func (in *IdentitySpec) DeepCopy() *IdentitySpec

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

func (*IdentitySpec) DeepCopyInto

func (in *IdentitySpec) DeepCopyInto(out *IdentitySpec)

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

type IdentityStatus

type IdentityStatus struct {
	// Inherits duck/v1 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.
	duckv1.Status `json:",inline"`
}

IdentityStatus inherits duck/v1 Status and adds a ServiceAccountName.

func (*IdentityStatus) DeepCopy

func (in *IdentityStatus) DeepCopy() *IdentityStatus

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

func (*IdentityStatus) DeepCopyInto

func (in *IdentityStatus) DeepCopyInto(out *IdentityStatus)

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

func (*IdentityStatus) IsReady

func (ss *IdentityStatus) IsReady() bool

IsReady returns true if the resource is ready overall.

func (*IdentityStatus) MarkWorkloadIdentityFailed

func (s *IdentityStatus) MarkWorkloadIdentityFailed(cs *apis.ConditionSet, reason, messageFormat string, messageA ...interface{})

func (*IdentityStatus) MarkWorkloadIdentityReady

func (s *IdentityStatus) MarkWorkloadIdentityReady(cs *apis.ConditionSet)

func (*IdentityStatus) MarkWorkloadIdentityUnknown

func (s *IdentityStatus) MarkWorkloadIdentityUnknown(cs *apis.ConditionSet, reason, messageFormat string, messageA ...interface{})

type PubSub

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

	Spec   PubSubSpec   `json:"spec"`
	Status PubSubStatus `json:"status"`
}

PubSub is a shared type that GCP sources which create a Topic / PullSubscription will use. This duck type is intended to allow implementors of GCP sources which use PubSub for their transport.

func (*PubSub) DeepCopy

func (in *PubSub) DeepCopy() *PubSub

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

func (*PubSub) DeepCopyInto

func (in *PubSub) DeepCopyInto(out *PubSub)

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

func (*PubSub) DeepCopyObject

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

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

func (*PubSub) GetFullType

func (*PubSub) GetFullType() duck.Populatable

GetFullType implements duck.Implementable

func (*PubSub) GetListType

func (*PubSub) GetListType() runtime.Object

GetListType implements apis.Listable

func (*PubSub) Populate

func (s *PubSub) Populate()

Populate implements duck.Populatable

type PubSubList

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

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

PubSubList is a list of PubSub resources

func (*PubSubList) DeepCopy

func (in *PubSubList) DeepCopy() *PubSubList

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

func (*PubSubList) DeepCopyInto

func (in *PubSubList) DeepCopyInto(out *PubSubList)

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

func (*PubSubList) DeepCopyObject

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

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

type PubSubSpec

type PubSubSpec struct {
	// This brings in CloudEventOverrides and Sink.
	duckv1.SourceSpec `json:",inline"`

	IdentitySpec `json:",inline"`

	// Secret is the credential to use to poll from a Cloud Pub/Sub subscription.
	// If not specified, defaults to:
	// Name: google-cloud-key
	// Key: key.json
	// +optional
	Secret *corev1.SecretKeySelector `json:"secret,omitempty"`

	// Project is the ID of the Google Cloud Project that the PubSub Topic exists in.
	// If omitted, defaults to same as the cluster.
	// +optional
	Project string `json:"project,omitempty"`
}

func (*PubSubSpec) DeepCopy

func (in *PubSubSpec) DeepCopy() *PubSubSpec

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

func (*PubSubSpec) DeepCopyInto

func (in *PubSubSpec) DeepCopyInto(out *PubSubSpec)

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

func (*PubSubSpec) SetPubSubDefaults

func (s *PubSubSpec) SetPubSubDefaults(ctx context.Context)

type PubSubStatus

type PubSubStatus struct {
	IdentityStatus `json:",inline"`

	// SinkURI is the current active sink URI that has been configured for the Source.
	// +optional
	SinkURI *apis.URL `json:"sinkUri,omitempty"`

	// CloudEventAttributes are the specific attributes that the Source uses
	// as part of its CloudEvents.
	// +optional
	CloudEventAttributes []duckv1.CloudEventAttributes `json:"ceAttributes,omitempty"`

	// ProjectID is the project ID of the Topic, might have been resolved.
	// +optional
	ProjectID string `json:"projectId,omitempty"`

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

	// SubscriptionID is the created subscription ID.
	// +optional
	SubscriptionID string `json:"subscriptionId,omitempty"`
}

PubSubStatus shows how we expect folks to embed Addressable in their Status field.

func (*PubSubStatus) DeepCopy

func (in *PubSubStatus) DeepCopy() *PubSubStatus

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

func (*PubSubStatus) DeepCopyInto

func (in *PubSubStatus) DeepCopyInto(out *PubSubStatus)

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

func (*PubSubStatus) IsReady

func (ss *PubSubStatus) IsReady() bool

IsReady returns true if the resource is ready overall.

func (*PubSubStatus) MarkPullSubscriptionFailed

func (s *PubSubStatus) MarkPullSubscriptionFailed(cs *apis.ConditionSet, reason, messageFormat string, messageA ...interface{})

MarkPullSubscriptionFailed sets the condition that the PubSub PullSubscription is False and why.

func (*PubSubStatus) MarkPullSubscriptionNotConfigured

func (s *PubSubStatus) MarkPullSubscriptionNotConfigured(cs *apis.ConditionSet)

MarkPullSubscriptionNotConfigured changes the PullSubscriptionReady condition to be unknown to reflect that the PullSubscription does not yet have a Status.

func (*PubSubStatus) MarkPullSubscriptionReady

func (s *PubSubStatus) MarkPullSubscriptionReady(cs *apis.ConditionSet)

MarkPullSubscriptionReady sets the condition that the PubSub PullSubscription is ready.

func (*PubSubStatus) MarkPullSubscriptionUnknown

func (s *PubSubStatus) MarkPullSubscriptionUnknown(cs *apis.ConditionSet, reason, messageFormat string, messageA ...interface{})

MarkPullSubscriptionUnknown sets the condition that the PubSub PullSubscription is Unknown.

func (*PubSubStatus) MarkTopicFailed

func (s *PubSubStatus) MarkTopicFailed(cs *apis.ConditionSet, reason, messageFormat string, messageA ...interface{})

MarkTopicFailed sets the condition that the PubSub Topic is False and why.

func (*PubSubStatus) MarkTopicNotConfigured

func (s *PubSubStatus) MarkTopicNotConfigured(cs *apis.ConditionSet)

MarkTopicNotConfigured changes the TopicReady condition to be unknown to reflect that the Topic does not yet have a Status.

func (*PubSubStatus) MarkTopicReady

func (s *PubSubStatus) MarkTopicReady(cs *apis.ConditionSet)

MarkTopicReady sets the condition that the PubSub Topic is ready.

func (*PubSubStatus) MarkTopicUnknown

func (s *PubSubStatus) MarkTopicUnknown(cs *apis.ConditionSet, reason, messageFormat string, messageA ...interface{})

MarkTopicUnknown sets the condition that the PubSub Topic is Unknown and why.

type Resource

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

Resource is a skeleton type wrapping all Kubernetes resources. It is typically used to watch arbitrary other resources. This is not a real resource. TODO upstream to pkg

func (*Resource) DeepCopy

func (in *Resource) DeepCopy() *Resource

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

func (*Resource) DeepCopyInto

func (in *Resource) DeepCopyInto(out *Resource)

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

func (*Resource) DeepCopyObject

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

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

func (*Resource) GetFullType

func (*Resource) GetFullType() duck.Populatable

GetFullType implements duck.Implementable

func (*Resource) GetListType

func (*Resource) GetListType() runtime.Object

GetListType implements apis.Listable

func (*Resource) Populate

func (s *Resource) Populate()

Populate implements duck.Populatable

type ResourceList

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

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

ResourceList is a list of Resource resources

func (*ResourceList) DeepCopy

func (in *ResourceList) DeepCopy() *ResourceList

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

func (*ResourceList) DeepCopyInto

func (in *ResourceList) DeepCopyInto(out *ResourceList)

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

func (*ResourceList) DeepCopyObject

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

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

Jump to

Keyboard shortcuts

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