v1alpha1

package
v0.17.2 Latest Latest
Warning

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

Go to latest
Published: Oct 12, 2020 License: Apache-2.0 Imports: 30 Imported by: 19

Documentation

Overview

Package v1alpha1 defines internal types in internal.events.cloud.google.com/v1alpha1 for use by other resources. +k8s:deepcopy-gen=package +groupName=internal.events.cloud.google.com

Index

Constants

View Source
const (
	// BrokerCellConditionReady has status true when all subconditions below
	// have been set to True.
	BrokerCellConditionReady apis.ConditionType = apis.ConditionReady

	// BrokerCellConditionIngress reports the availability of the
	// BrokerCell's ingress service.
	BrokerCellConditionIngress apis.ConditionType = "IngressReady"

	// BrokerCellConditionFanout reports the readiness of the BrokerCell's
	// fanout service.
	BrokerCellConditionFanout apis.ConditionType = "FanoutReady"

	// BrokerCellConditionRetry reports the readiness of the BrokerCell's retry
	// service.
	BrokerCellConditionRetry apis.ConditionType = "RetryReady"

	// BrokerCellConditionTargetsConfig reports the readiness of the
	// BrokerCell's targets configmap.
	BrokerCellConditionTargetsConfig apis.ConditionType = "TargetsConfigReady"
)
View Source
const (
	// Annotations to tell if the brokercell is created automatically by the GCP broker controller.
	CreatorKey = "internal.events.cloud.google.com/creator"
	Creator    = "googlecloud"
)
View Source
const (
	// PullSubscriptionConditionReady has status True when the PullSubscription is
	// ready to send events.
	PullSubscriptionConditionReady = apis.ConditionReady

	// PullSubscriptionConditionSinkProvided has status True when the PullSubscription
	// has been configured with a sink target.
	PullSubscriptionConditionSinkProvided apis.ConditionType = "SinkProvided"

	// PullSubscriptionConditionDeployed has status True when the PullSubscription has
	// had its data plane resource(s) created.
	PullSubscriptionConditionDeployed apis.ConditionType = "Deployed"

	// PullSubscriptionConditionSubscribed has status True when a Google Cloud
	// Pub/Sub Subscription has been created pointing at the created receive
	// adapter deployment.
	PullSubscriptionConditionSubscribed apis.ConditionType = "Subscribed"

	// PullSubscriptionConditionTransformerProvided has status True when the
	// PullSubscription has been configured with a transformer target.
	PullSubscriptionConditionTransformerProvided apis.ConditionType = "TransformerProvided"
)
View Source
const (
	// TopicConditionReady has status True when all subconditions below have
	// been set to True.
	TopicConditionReady = apis.ConditionReady

	// TopicConditionAddressable has status true when this Topic meets the
	// Addressable contract and has a non-empty hostname.
	TopicConditionAddressable apis.ConditionType = "Addressable"

	// TopicConditionTopicExists has status True when the Topic has had a
	// Pub/Sub topic created for it.
	TopicConditionTopicExists apis.ConditionType = "TopicExists"

	// TopicConditionPublisherReady has status True when the Topic has had
	// its publisher deployment created and ready.
	TopicConditionPublisherReady apis.ConditionType = "PublisherReady"
)

Variables

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

SchemeGroupVersion is group version used to register these objects

View Source
var TestHelper = testHelper{}

TestHelper contains helpers for unit tests.

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 BrokerCell

type BrokerCell struct {
	metav1.TypeMeta `json:",inline"`
	// +optional
	metav1.ObjectMeta `json:"metadata,omitempty"`

	// Spec defines the desired state of the BrokerCell.
	Spec BrokerCellSpec `json:"spec,omitempty"`

	// Status represents the current state of the BrokerCell. This data may be out of
	// date.
	// +optional
	Status BrokerCellStatus `json:"status,omitempty"`
}

BrokerCell manages the set of data plane components servicing one or more Broker objects and their associated Triggers.

func (*BrokerCell) DeepCopy

func (in *BrokerCell) DeepCopy() *BrokerCell

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

func (*BrokerCell) DeepCopyInto

func (in *BrokerCell) DeepCopyInto(out *BrokerCell)

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

func (*BrokerCell) DeepCopyObject

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

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

func (*BrokerCell) GetConditionSet added in v0.16.0

func (*BrokerCell) GetConditionSet() apis.ConditionSet

GetConditionSet retrieves the condition set for this resource. Implements the KRShaped interface.

func (*BrokerCell) GetGroupVersionKind

func (bc *BrokerCell) GetGroupVersionKind() schema.GroupVersionKind

GetGroupVersionKind returns GroupVersionKind for Brokers

func (*BrokerCell) GetStatus added in v0.16.0

func (bc *BrokerCell) GetStatus() *duckv1.Status

GetStatus retrieves the status of the BrokerCell. Implements the KRShaped interface.

func (*BrokerCell) GetUntypedSpec

func (bc *BrokerCell) GetUntypedSpec() interface{}

GetUntypedSpec returns the spec of the BrokerCell.

func (*BrokerCell) SetDefaults

func (bc *BrokerCell) SetDefaults(ctx context.Context)

SetDefaults sets the default field values for a BrokerCell.

func (*BrokerCell) Validate

func (bc *BrokerCell) Validate(ctx context.Context) *apis.FieldError

Validate verifies that the BrokerCell is valid.

type BrokerCellList

type BrokerCellList struct {
	metav1.TypeMeta `json:",inline"`
	// +optional
	metav1.ListMeta `json:"metadata,omitempty"`

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

BrokerCellList is a collection of BrokerCells.

func (*BrokerCellList) DeepCopy

func (in *BrokerCellList) DeepCopy() *BrokerCellList

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

func (*BrokerCellList) DeepCopyInto

func (in *BrokerCellList) DeepCopyInto(out *BrokerCellList)

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

func (*BrokerCellList) DeepCopyObject

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

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

type BrokerCellSpec

type BrokerCellSpec struct {
	// Components specifies parameters of each component (fanout, ingress,
	// retry) of a BrokerCell.
	Components ComponentsParametersSpec `json:"components,omitempty"`
}

BrokerCellSpec defines the desired state of a Brokercell.

func (*BrokerCellSpec) DeepCopy

func (in *BrokerCellSpec) DeepCopy() *BrokerCellSpec

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

func (*BrokerCellSpec) DeepCopyInto

func (in *BrokerCellSpec) DeepCopyInto(out *BrokerCellSpec)

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

func (*BrokerCellSpec) SetDefaults added in v0.17.0

func (bcs *BrokerCellSpec) SetDefaults(ctx context.Context)

SetDefaults sets the default field values for a BrokerCellSpec.

func (*BrokerCellSpec) Validate added in v0.17.0

func (bcs *BrokerCellSpec) Validate(ctx context.Context) *apis.FieldError

type BrokerCellStatus

type BrokerCellStatus 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"`

	// IngressTemplate contains a URI template as specified by RFC6570 to
	// generate Broker ingress URIs. It may contain variables `name` and
	// `namespace`.
	// Example: "http://broker-ingress.cloud-run-events.svc.cluster.local/{namespace}/{name}"
	IngressTemplate string `json:"ingressTemplate,omitempty"`
}

BrokerCellStatus represents the current state of a BrokerCell.

func (*BrokerCellStatus) DeepCopy

func (in *BrokerCellStatus) DeepCopy() *BrokerCellStatus

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

func (*BrokerCellStatus) DeepCopyInto

func (in *BrokerCellStatus) DeepCopyInto(out *BrokerCellStatus)

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

func (*BrokerCellStatus) GetCondition

func (bs *BrokerCellStatus) GetCondition(t apis.ConditionType) *apis.Condition

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

func (*BrokerCellStatus) GetTopLevelCondition

func (bs *BrokerCellStatus) GetTopLevelCondition() *apis.Condition

GetTopLevelCondition returns the top level Condition.

func (*BrokerCellStatus) InitializeConditions

func (bs *BrokerCellStatus) InitializeConditions()

InitializeConditions sets relevant unset conditions to Unknown state.

func (*BrokerCellStatus) IsReady

func (bs *BrokerCellStatus) IsReady() bool

IsReady returns true if the resource is ready overall.

func (*BrokerCellStatus) MarkFanoutFailed

func (bs *BrokerCellStatus) MarkFanoutFailed(reason, format string, args ...interface{})

func (*BrokerCellStatus) MarkFanoutUnknown added in v0.16.0

func (bs *BrokerCellStatus) MarkFanoutUnknown(reason, format string, args ...interface{})

func (*BrokerCellStatus) MarkIngressFailed

func (bs *BrokerCellStatus) MarkIngressFailed(reason, format string, args ...interface{})

func (*BrokerCellStatus) MarkRetryFailed

func (bs *BrokerCellStatus) MarkRetryFailed(reason, format string, args ...interface{})

func (*BrokerCellStatus) MarkRetryUnknown added in v0.16.0

func (bs *BrokerCellStatus) MarkRetryUnknown(reason, format string, args ...interface{})

func (*BrokerCellStatus) MarkTargetsConfigFailed

func (bs *BrokerCellStatus) MarkTargetsConfigFailed(reason, format string, args ...interface{})

func (*BrokerCellStatus) MarkTargetsConfigReady

func (bs *BrokerCellStatus) MarkTargetsConfigReady()

func (*BrokerCellStatus) PropagateFanoutAvailability

func (bs *BrokerCellStatus) PropagateFanoutAvailability(d *appsv1.Deployment)

PropagateFanoutAvailability uses the availability of the provided Deployment to determine if BrokerCellConditionFanout should be marked as true or false.

func (*BrokerCellStatus) PropagateIngressAvailability

func (bs *BrokerCellStatus) PropagateIngressAvailability(ep *corev1.Endpoints)

PropagateIngressAvailability uses the availability of the provided Endpoints to determine if BrokerCellConditionIngress should be marked as true or false.

func (*BrokerCellStatus) PropagateRetryAvailability

func (bs *BrokerCellStatus) PropagateRetryAvailability(d *appsv1.Deployment)

PropagateRetryAvailability uses the availability of the provided Deployment to determine if BrokerCellConditionRetry should be marked as true or unknown.

func (*BrokerCellStatus) SetIngressTemplate

func (bs *BrokerCellStatus) SetIngressTemplate(address string)

type ComponentParameters added in v0.17.0

type ComponentParameters struct {
	// AvgCPUUtilization specifies the average CPU consumption targeted by the component's Horizontal Pod Autoscaler
	AvgCPUUtilization *int32 `json:"avgCPUUtilization,omitempty"`

	// AvgMemoryUsage specifies the average memory consumption targeted by the component's Horizontal Pod Autoscaler
	AvgMemoryUsage *string `json:"avgMemoryUsage,omitempty"`

	// Requests and limits for system resources (CPU, memory)
	Resources ResourceSpecification `json:"resources,omitempty"`

	// MinReplicas specifies the minimum replica count for the component.
	MinReplicas *int32 `json:"minReplicas,omitempty"`

	// MaxReplicas specifies the maximum replica count for the component.
	MaxReplicas *int32 `json:"maxReplicas,omitempty"`
}

ComponentParameters specifies scaling and resource parameters to be used by a single component of a BrokerCell.

func (*ComponentParameters) DeepCopy added in v0.17.0

func (in *ComponentParameters) DeepCopy() *ComponentParameters

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

func (*ComponentParameters) DeepCopyInto added in v0.17.0

func (in *ComponentParameters) DeepCopyInto(out *ComponentParameters)

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

func (*ComponentParameters) SetAutoScalingDefaults added in v0.17.0

func (componentParams *ComponentParameters) SetAutoScalingDefaults(targetMemoryUsageCoefficient float64, avgCPUUtilization int32)

SetAutoScalingDefaults sets the autoscaling-related default field values for ComponentParameters.

func (*ComponentParameters) SetCPUDefaults added in v0.17.0

func (componentParams *ComponentParameters) SetCPUDefaults(defaultCPURequest, defaultCPULimit string)

SetCPUDefaults sets the CPU consumption related default field values for ComponentParameters.

func (*ComponentParameters) SetMemoryDefaults added in v0.17.0

func (componentParams *ComponentParameters) SetMemoryDefaults(memoryLimitToRequestCoefficient float64, defaultMemoryRequest string)

SetMemoryDefaults sets the memory consumption related default field values for ComponentParameters.

func (*ComponentParameters) SetResourceDefaults added in v0.17.0

func (componentParams *ComponentParameters) SetResourceDefaults(defaultCPURequest, defaultCPULimit, defaultMemoryRequest string, memoryLimitToRequestCoefficient float64)

func (*ComponentParameters) ValidateAutoscalingSpecification added in v0.17.0

func (componentParams *ComponentParameters) ValidateAutoscalingSpecification(fieldErrors *apis.FieldError, componentPath string) *apis.FieldError

func (*ComponentParameters) ValidateCPUSpecification added in v0.17.0

func (componentParams *ComponentParameters) ValidateCPUSpecification(fieldErrors *apis.FieldError, componentPath string) *apis.FieldError

func (*ComponentParameters) ValidateMemorySpecification added in v0.17.0

func (componentParams *ComponentParameters) ValidateMemorySpecification(fieldErrors *apis.FieldError, componentPath string) *apis.FieldError

func (*ComponentParameters) ValidateQuantityFormats added in v0.17.0

func (componentParams *ComponentParameters) ValidateQuantityFormats(fieldErrors *apis.FieldError, componentPath string) *apis.FieldError

func (*ComponentParameters) ValidateResourceRequirementSpecification added in v0.17.0

func (componentParams *ComponentParameters) ValidateResourceRequirementSpecification(fieldErrors *apis.FieldError, componentPath string) *apis.FieldError

type ComponentsParametersSpec added in v0.17.0

type ComponentsParametersSpec struct {
	Fanout  ComponentParameters `json:"fanout,omitempty"`
	Ingress ComponentParameters `json:"ingress,omitempty"`
	Retry   ComponentParameters `json:"retry,omitempty"`
}

ComponentsParametersSpec specifies separate parameters for each component of a BrokerCell.

func (*ComponentsParametersSpec) DeepCopy added in v0.17.0

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

func (*ComponentsParametersSpec) DeepCopyInto added in v0.17.0

func (in *ComponentsParametersSpec) DeepCopyInto(out *ComponentsParametersSpec)

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

type ModeType

type ModeType string
const (
	// ModeCloudEventsBinary will use CloudEvents binary HTTP mode with
	// flattened Pub/Sub payload.
	ModeCloudEventsBinary ModeType = "CloudEventsBinary"

	// ModeCloudEventsStructured will use CloudEvents structured HTTP mode with
	// flattened Pub/Sub payload.
	ModeCloudEventsStructured ModeType = "CloudEventsStructured"

	// ModePushCompatible will use CloudEvents binary HTTP mode with expanded
	// Pub/Sub payload that matches how Cloud Pub/Sub delivers a push message.
	ModePushCompatible ModeType = "PushCompatible"
)

type PropagationPolicyType

type PropagationPolicyType string

PropagationPolicyType defines enum type for TopicPolicy

const (
	// TopicPolicyCreateDelete defines the Cloud Pub/Sub topic management
	// policy for creating topic (if not present), and deleting topic when the
	// Topic resource is deleted.
	TopicPolicyCreateDelete PropagationPolicyType = "CreateDelete"

	// TopicPolicyCreateNoDelete defines the Cloud Pub/Sub topic management
	// policy for creating topic (if not present), and not deleting topic when
	// the Topic resource is deleted.
	TopicPolicyCreateNoDelete PropagationPolicyType = "CreateNoDelete"

	// TopicPolicyNoCreateNoDelete defines the Cloud Pub/Sub topic
	// management policy for only using existing topics, and not deleting
	// topic when the Topic resource is deleted.
	TopicPolicyNoCreateNoDelete PropagationPolicyType = "NoCreateNoDelete"
)

type PullSubscription

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

	Spec   PullSubscriptionSpec   `json:"spec,omitempty"`
	Status PullSubscriptionStatus `json:"status,omitempty"`
}

PullSubscription is the Schema for the gcppullSubscriptions API. +k8s:openapi-gen=true

func (*PullSubscription) CheckImmutableFields

func (current *PullSubscription) CheckImmutableFields(ctx context.Context, original *PullSubscription) *apis.FieldError

func (*PullSubscription) ConditionSet

func (*PullSubscription) ConditionSet() *apis.ConditionSet

ConditionSet returns the apis.ConditionSet of the embedding object

func (*PullSubscription) ConvertFrom

func (sink *PullSubscription) ConvertFrom(ctx context.Context, from apis.Convertible) error

ConvertFrom implements apis.Convertible. Converts from a higher version of PullSubscription to a v1alpha1.PullSubscription.

func (*PullSubscription) ConvertTo

func (source *PullSubscription) ConvertTo(ctx context.Context, to apis.Convertible) error

ConvertTo implements apis.Convertible. Converts a v1alpha1.PullSubscription to a higher version of PullSubscription.

func (*PullSubscription) DeepCopy

func (in *PullSubscription) DeepCopy() *PullSubscription

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

func (*PullSubscription) DeepCopyInto

func (in *PullSubscription) DeepCopyInto(out *PullSubscription)

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

func (*PullSubscription) DeepCopyObject

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

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

func (*PullSubscription) GetGroupVersion

func (s *PullSubscription) GetGroupVersion() schema.GroupVersion

GetGroupVersionKind returns the GroupVersion.

func (*PullSubscription) GetGroupVersionKind

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

GetGroupVersionKind returns the GroupVersionKind.

func (*PullSubscription) IdentitySpec

func (s *PullSubscription) IdentitySpec() *v1alpha1.IdentitySpec

Methods for identifiable interface. IdentitySpec returns the IdentitySpec portion of the Spec.

func (*PullSubscription) IdentityStatus

func (s *PullSubscription) IdentityStatus() *v1alpha1.IdentityStatus

IdentityStatus returns the IdentityStatus portion of the Status.

func (*PullSubscription) PubSubMode

func (p *PullSubscription) PubSubMode() ModeType

PubSubMode returns the mode currently set for PullSubscription.

func (*PullSubscription) SetDefaults

func (s *PullSubscription) SetDefaults(ctx context.Context)

func (*PullSubscription) Validate

func (current *PullSubscription) Validate(ctx context.Context) *apis.FieldError

type PullSubscriptionList

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

PullSubscriptionList contains a list of PubSubs.

func (*PullSubscriptionList) DeepCopy

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

func (*PullSubscriptionList) DeepCopyInto

func (in *PullSubscriptionList) DeepCopyInto(out *PullSubscriptionList)

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

func (*PullSubscriptionList) DeepCopyObject

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

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

type PullSubscriptionSpec

type PullSubscriptionSpec struct {
	v1alpha1.PubSubSpec `json:",inline"`

	// Topic is the ID of the PullSubscription Topic to Subscribe to. It must
	// be in the form of the unique identifier within the project, not the
	// entire name. E.g. it must be 'laconia', not
	// 'projects/my-proj/topics/laconia'.
	Topic string `json:"topic,omitempty"`

	// AckDeadline is the default maximum time after a subscriber receives a
	// message before the subscriber should acknowledge the message. Defaults
	// to 30 seconds ('30s').
	// +optional
	AckDeadline *string `json:"ackDeadline,omitempty"`

	// RetainAckedMessages defines whether to retain acknowledged messages. If
	// true, acknowledged messages will not be expunged until they fall out of
	// the RetentionDuration window.
	RetainAckedMessages bool `json:"retainAckedMessages,omitempty"`

	// RetentionDuration defines how long to retain messages in backlog, from
	// the time of publish. If RetainAckedMessages is true, this duration
	// affects the retention of acknowledged messages, otherwise only
	// unacknowledged messages are retained. Cannot be longer than 7 days or
	// shorter than 10 minutes. Defaults to 7 days ('7d').
	// +optional
	RetentionDuration *string `json:"retentionDuration,omitempty"`

	// Transformer is a reference to an object that will resolve to a domain
	// name or a URI directly to use as the transformer or a URI directly.
	// +optional
	Transformer *duckv1.Destination `json:"transformer,omitempty"`

	// Mode defines the encoding and structure of the payload of when the
	// PullSubscription invokes the sink.
	// +optional
	Mode ModeType `json:"mode,omitempty"`

	// AdapterType determines the type of receive adapter that a
	// PullSubscription uses.
	// +optional
	AdapterType string `json:"adapterType,omitempty"`
}

PullSubscriptionSpec defines the desired state of the PullSubscription.

func (*PullSubscriptionSpec) DeepCopy

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

func (*PullSubscriptionSpec) DeepCopyInto

func (in *PullSubscriptionSpec) DeepCopyInto(out *PullSubscriptionSpec)

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

func (PullSubscriptionSpec) GetAckDeadline

func (ps PullSubscriptionSpec) GetAckDeadline() time.Duration

GetAckDeadline parses AckDeadline and returns the default if an error occurs.

func (PullSubscriptionSpec) GetRetentionDuration

func (ps PullSubscriptionSpec) GetRetentionDuration() time.Duration

GetRetentionDuration parses RetentionDuration and returns the default if an error occurs.

func (*PullSubscriptionSpec) SetDefaults

func (ss *PullSubscriptionSpec) SetDefaults(ctx context.Context)

func (*PullSubscriptionSpec) Validate

func (current *PullSubscriptionSpec) Validate(ctx context.Context) *apis.FieldError

type PullSubscriptionStatus

type PullSubscriptionStatus struct {
	v1alpha1.PubSubStatus `json:",inline"`

	// TransformerURI is the current active transformer URI that has been
	// configured for the PullSubscription.
	// +optional
	TransformerURI *apis.URL `json:"transformerUri,omitempty"`

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

PullSubscriptionStatus defines the observed state of PullSubscription.

func (*PullSubscriptionStatus) DeepCopy

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

func (*PullSubscriptionStatus) DeepCopyInto

func (in *PullSubscriptionStatus) DeepCopyInto(out *PullSubscriptionStatus)

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

func (*PullSubscriptionStatus) GetCondition

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

func (*PullSubscriptionStatus) GetTopLevelCondition

func (s *PullSubscriptionStatus) GetTopLevelCondition() *apis.Condition

GetTopLevelCondition returns the top level Condition.

func (*PullSubscriptionStatus) InitializeConditions

func (s *PullSubscriptionStatus) InitializeConditions()

InitializeConditions sets relevant unset conditions to Unknown state.

func (*PullSubscriptionStatus) IsReady

func (s *PullSubscriptionStatus) IsReady() bool

IsReady returns true if the resource is ready overall.

func (*PullSubscriptionStatus) MarkNoSink

func (s *PullSubscriptionStatus) MarkNoSink(reason, messageFormat string, messageA ...interface{})

MarkNoSink sets the condition that the source does not have a sink configured.

func (*PullSubscriptionStatus) MarkNoSubscription

func (s *PullSubscriptionStatus) MarkNoSubscription(reason, messageFormat string, messageA ...interface{})

MarkNoSubscription sets the condition that the subscription does not exist.

func (*PullSubscriptionStatus) MarkNoTransformer

func (s *PullSubscriptionStatus) MarkNoTransformer(reason, messageFormat string, messageA ...interface{})

MarkNoTransformer sets the condition that the source does not have a transformer configured.

func (*PullSubscriptionStatus) MarkSink

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

MarkSink sets the condition that the source has a sink configured.

func (*PullSubscriptionStatus) MarkSubscribed

func (s *PullSubscriptionStatus) MarkSubscribed(subscriptionID string)

MarkSubscribed sets the condition that the subscription has been created.

func (*PullSubscriptionStatus) MarkTransformer

func (s *PullSubscriptionStatus) MarkTransformer(uri *apis.URL)

MarkTransformer sets the condition that the source has a transformer configured.

func (*PullSubscriptionStatus) PropagateDeploymentAvailability added in v0.16.0

func (s *PullSubscriptionStatus) PropagateDeploymentAvailability(d *appsv1.Deployment)

PropagateDeploymentAvailability uses the availability of the provided Deployment to determine if PullSubscriptionConditionDeployed should be marked as true or false.

type ResourceSpecification added in v0.17.0

type ResourceSpecification struct {
	// Request specifies the minimal amount of the resource for the deployment to be schedulable
	Requests SystemResource `json:"requests,omitempty"`

	// Limit specifies the maximal amount of the resource that the deployment is allowed to consume
	Limits SystemResource `json:"limits,omitempty"`
}

ResourceSpecification defines requests and limits for the system resources

func (*ResourceSpecification) DeepCopy added in v0.17.0

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

func (*ResourceSpecification) DeepCopyInto added in v0.17.0

func (in *ResourceSpecification) DeepCopyInto(out *ResourceSpecification)

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

type SystemResource added in v0.17.0

type SystemResource struct {
	CPU    *string `json:"cpu,omitempty"`
	Memory *string `json:"memory,omitempty"`
}

SystemResource specifies quantities for resources such as CPU and memory

func (*SystemResource) DeepCopy added in v0.17.0

func (in *SystemResource) DeepCopy() *SystemResource

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

func (*SystemResource) DeepCopyInto added in v0.17.0

func (in *SystemResource) DeepCopyInto(out *SystemResource)

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

type Topic

type Topic struct {
	metav1.TypeMeta `json:",inline"`
	// +optional
	metav1.ObjectMeta `json:"metadata,omitempty"`

	// Spec defines the desired state of the Topic.
	Spec TopicSpec `json:"spec,omitempty"`

	// Status represents the current state of the Topic. This data may be out of
	// date.
	// +optional
	Status TopicStatus `json:"status,omitempty"`
}

Topic is a resource representing a Topic backed by Google Cloud Pub/Sub.

func (*Topic) CheckImmutableFields

func (current *Topic) CheckImmutableFields(ctx context.Context, original *Topic) *apis.FieldError

func (*Topic) ConditionSet

func (ps *Topic) ConditionSet() *apis.ConditionSet

ConditionSet returns the apis.ConditionSet of the embedding object

func (*Topic) ConvertFrom

func (sink *Topic) ConvertFrom(ctx context.Context, from apis.Convertible) error

ConvertFrom implements apis.Convertible. Converts from a higher version of Topic to v1alpha1.Topic.

func (*Topic) ConvertTo

func (source *Topic) ConvertTo(ctx context.Context, to apis.Convertible) error

ConvertTo implements apis.Convertible. Converts a v1alpha1.Topic to a higher version of topic.

func (*Topic) DeepCopy

func (in *Topic) DeepCopy() *Topic

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

func (*Topic) DeepCopyInto

func (in *Topic) DeepCopyInto(out *Topic)

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

func (*Topic) DeepCopyObject

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

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

func (*Topic) GetGroupVersionKind

func (t *Topic) GetGroupVersionKind() schema.GroupVersionKind

GetGroupVersionKind returns GroupVersionKind for Pub/Sub backed Topic.

func (*Topic) IdentitySpec

func (s *Topic) IdentitySpec() *v1alpha1.IdentitySpec

Methods for identifiable interface. IdentitySpec returns the IdentitySpec portion of the Spec.

func (*Topic) IdentityStatus

func (s *Topic) IdentityStatus() *v1alpha1.IdentityStatus

IdentityStatus returns the IdentityStatus portion of the Status.

func (*Topic) SetDefaults

func (t *Topic) SetDefaults(ctx context.Context)

func (*Topic) Validate

func (t *Topic) Validate(ctx context.Context) *apis.FieldError

type TopicList

type TopicList struct {
	metav1.TypeMeta `json:",inline"`
	// +optional
	metav1.ListMeta `json:"metadata,omitempty"`
	Items           []Topic `json:"items"`
}

TopicList is a collection of Pub/Sub backed Topics.

func (*TopicList) DeepCopy

func (in *TopicList) DeepCopy() *TopicList

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

func (*TopicList) DeepCopyInto

func (in *TopicList) DeepCopyInto(out *TopicList)

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

func (*TopicList) DeepCopyObject

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

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

type TopicSpec

type TopicSpec struct {
	v1alpha1.IdentitySpec `json:",inline"`

	// Secret is the credential to be used to create and publish into the
	// Cloud Pub/Sub Topic. 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).
	Secret *corev1.SecretKeySelector `json:"secret,omitempty"`

	// Project is the ID of the Google Cloud Project that the Pub/Sub
	// Topic will be created in or used from.
	Project string `json:"project,omitempty"`

	// Topic is the ID of the Topic to create/use in Google Cloud Pub/Sub.
	Topic string `json:"topic,omitempty"`

	//PropagationPolicy defines how Topic controls the Cloud Pub/Sub topic for
	// lifecycle changes. Defaults to TopicPolicyCreateNoDelete if empty.
	PropagationPolicy PropagationPolicyType `json:"propagationPolicy,omitempty"`

	// EnablePublisher controls the creation of an HTTP publisher endpoint. If set to true, then
	// a publisher will be created and this Topic will be Addressable (have status.address). If set
	// to false, then no publisher will be created and this custom object represents the creation
	// and deletion of a GCP Pub/Sub Topic only.
	// Defaults to true.
	// +optional
	EnablePublisher *bool `json:"publisher,omitempty"`
}

TopicSpec defines parameters for creating or publishing to a Cloud Pub/Sub Topic depending on the PropagationPolicy.

func (*TopicSpec) DeepCopy

func (in *TopicSpec) DeepCopy() *TopicSpec

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

func (*TopicSpec) DeepCopyInto

func (in *TopicSpec) DeepCopyInto(out *TopicSpec)

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

func (*TopicSpec) SetDefaults

func (ts *TopicSpec) SetDefaults(ctx context.Context)

func (*TopicSpec) Validate

func (ts *TopicSpec) Validate(ctx context.Context) *apis.FieldError

type TopicStatus

type TopicStatus struct {
	v1alpha1.IdentityStatus `json:",inline"`

	// Topic is Addressable. It currently exposes the endpoint as a
	// fully-qualified DNS name which will distribute traffic over the
	// provided targets from inside the cluster.
	//
	// It generally has the form {Topic}.{namespace}.svc.{cluster domain name}
	duckv1alpha1.AddressStatus `json:",inline"`

	// ProjectID is the resolved project ID in use by the Topic.
	// +optional
	ProjectID string `json:"projectId,omitempty"`

	// TopicID is the created topic ID used by the Topic.
	// +optional
	TopicID string `json:"topicId,omitempty"`
}

TopicStatus represents the current state of a Topic.

func (*TopicStatus) DeepCopy

func (in *TopicStatus) DeepCopy() *TopicStatus

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

func (*TopicStatus) DeepCopyInto

func (in *TopicStatus) DeepCopyInto(out *TopicStatus)

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

func (*TopicStatus) GetCondition

func (ts *TopicStatus) GetCondition(t apis.ConditionType) *apis.Condition

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

func (*TopicStatus) GetTopLevelCondition

func (ts *TopicStatus) GetTopLevelCondition() *apis.Condition

GetTopLevelCondition returns the top level condition

func (*TopicStatus) InitializeConditions

func (ts *TopicStatus) InitializeConditions()

InitializeConditions sets relevant unset conditions to Unknown state.

func (*TopicStatus) IsReady

func (ts *TopicStatus) IsReady() bool

IsReady returns true if the resource is ready overall.

func (*TopicStatus) MarkNoTopic

func (ts *TopicStatus) MarkNoTopic(reason, messageFormat string, messageA ...interface{})

MarkNoTopic sets the condition that signals there is not a topic for this Topic. This could be because of an error or the Topic is being deleted.

func (*TopicStatus) MarkPublisherDeployed

func (ts *TopicStatus) MarkPublisherDeployed()

MarkPublisherDeployed sets the condition that the publisher has been deployed.

func (*TopicStatus) MarkPublisherNotConfigured

func (ts *TopicStatus) MarkPublisherNotConfigured()

MarkPublisherNotConfigured changes the PublisherReady condition to be unknown to reflect that the Publisher does not yet have a Status.

func (*TopicStatus) MarkPublisherNotDeployed

func (ts *TopicStatus) MarkPublisherNotDeployed(reason, messageFormat string, messageA ...interface{})

MarkPublisherNotDeployed sets the condition that the publisher has not been deployed.

func (*TopicStatus) MarkPublisherUnknown

func (ts *TopicStatus) MarkPublisherUnknown(reason, messageFormat string, messageA ...interface{})

MarkPublisherUnknown sets the condition that the status of publisher is Unknown.

func (*TopicStatus) MarkTopicReady

func (ts *TopicStatus) MarkTopicReady()

MarkTopicReady sets the condition that the topic has been created.

func (*TopicStatus) PropagatePublisherStatus

func (ts *TopicStatus) PropagatePublisherStatus(ss *v1.ServiceStatus)

func (*TopicStatus) SetAddress

func (ts *TopicStatus) SetAddress(url *apis.URL)

TODO: Use the new beta duck types.

Jump to

Keyboard shortcuts

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