v1alpha1

package
v0.16.1 Latest Latest
Warning

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

Go to latest
Published: Jul 21, 2020 License: Apache-2.0 Imports: 15 Imported by: 18

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 (
	DefaultSecretName = "google-cloud-key"
)
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: "v1alpha1"}

SchemeGroupVersion is group version used to register these objects

Functions

func GroupResource added in v0.13.0

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

func ValidateCredential added in v0.14.0

func ValidateCredential(secret *corev1.SecretKeySelector, kServiceAccountName string) *apis.FieldError

ValidateCredential checks secret and service account.

Types

type IdentitySpec added in v0.14.0

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 added in v0.14.0

func (in *IdentitySpec) DeepCopy() *IdentitySpec

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

func (*IdentitySpec) DeepCopyInto added in v0.14.0

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 added in v0.14.0

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"`
	// ServiceAccountName is the k8s service account associated with Google service account.
	ServiceAccountName string `json:"serviceAccountName,omitempty"`
}

IdentityStatus inherits duck/v1 Status and adds a ServiceAccountName.

func (*IdentityStatus) DeepCopy added in v0.14.0

func (in *IdentityStatus) DeepCopy() *IdentityStatus

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

func (*IdentityStatus) DeepCopyInto added in v0.14.0

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 added in v0.14.0

func (ss *IdentityStatus) IsReady() bool

IsReady returns true if the resource is ready overall.

func (*IdentityStatus) MarkWorkloadIdentityConfigured added in v0.14.0

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

func (*IdentityStatus) MarkWorkloadIdentityFailed added in v0.14.0

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

func (*IdentityStatus) MarkWorkloadIdentityNotConfigured added in v0.14.0

func (s *IdentityStatus) MarkWorkloadIdentityNotConfigured(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 added in v0.12.0

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 added in v0.12.0

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 added in v0.12.0

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 added in v0.12.0

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 added in v0.12.0

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 added in v0.12.0

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 added in v0.12.0

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 added in v0.13.0

func (in *Resource) DeepCopy() *Resource

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

func (*Resource) DeepCopyInto added in v0.13.0

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 added in v0.13.0

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

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

func (*Resource) GetFullType added in v0.13.0

func (*Resource) GetFullType() duck.Populatable

GetFullType implements duck.Implementable

func (*Resource) GetListType added in v0.13.0

func (*Resource) GetListType() runtime.Object

GetListType implements apis.Listable

func (*Resource) Populate added in v0.13.0

func (s *Resource) Populate()

Populate implements duck.Populatable

type ResourceList added in v0.13.0

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 added in v0.13.0

func (in *ResourceList) DeepCopy() *ResourceList

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

func (*ResourceList) DeepCopyInto added in v0.13.0

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 added in v0.13.0

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