v1alpha1

package
v0.18.8 Latest Latest
Warning

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

Go to latest
Published: Dec 8, 2020 License: Apache-2.0 Imports: 18 Imported by: 16

Documentation

Overview

Package v1alpha1 contains API Schema definitions for the sources v1alpha1 API group +k8s:openapi-gen=true +k8s:deepcopy-gen=package,register +k8s:defaulter-gen=TypeMeta +groupName=sources.knative.dev

Package v1alpha1 contains API Schema definitions for the sources v1alpha1 API group +k8s:openapi-gen=true +k8s:deepcopy-gen=package,register +k8s:defaulter-gen=TypeMeta +groupName=sources.knative.dev

Index

Constants

View Source
const (
	// KafkaConditionReady has status True when the KafkaSource is ready to send events.
	KafkaConditionReady = apis.ConditionReady

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

	// KafkaConditionDeployed has status True when the KafkaSource has had it's receive adapter deployment created.
	KafkaConditionDeployed apis.ConditionType = "Deployed"

	// KafkaConditionResources is True when the resources listed for the KafkaSource have been properly
	// parsed and match specified syntax for resource quantities
	KafkaConditionResources apis.ConditionType = "ResourcesCorrect"
)
View Source
const (
	// KafkaEventType is the Kafka CloudEvent type.
	KafkaEventType = "dev.knative.kafka.event"

	KafkaKeyTypeLabel = "kafkasources.sources.knative.dev/key-type"
)

Variables

View Source
var (
	SchemeBuilder = runtime.NewSchemeBuilder(addKnownTypes)
	AddToScheme   = SchemeBuilder.AddToScheme
)
View Source
var KafkaKeyTypeAllowed = []string{"string", "int", "float", "byte-array"}
View Source
var SchemeGroupVersion = schema.GroupVersion{Group: sources.GroupName, Version: "v1alpha1"}

SchemeGroupVersion is group version used to register these objects

Functions

func DeploymentIsAvailable added in v0.10.0

func DeploymentIsAvailable(d *appsv1.DeploymentStatus, def bool) bool

func KafkaEventSource

func KafkaEventSource(namespace, kafkaSourceName, topic string) string

KafkaEventSource returns the Kafka CloudEvent source.

func Kind added in v0.10.0

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 KafkaLimitsSpec

type KafkaLimitsSpec struct {
	ResourceCPU    string `json:"cpu,omitempty"`
	ResourceMemory string `json:"memory,omitempty"`
}

func (*KafkaLimitsSpec) DeepCopy

func (in *KafkaLimitsSpec) DeepCopy() *KafkaLimitsSpec

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

func (*KafkaLimitsSpec) DeepCopyInto

func (in *KafkaLimitsSpec) DeepCopyInto(out *KafkaLimitsSpec)

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

type KafkaRequestsSpec

type KafkaRequestsSpec struct {
	ResourceCPU    string `json:"cpu,omitempty"`
	ResourceMemory string `json:"memory,omitempty"`
}

func (*KafkaRequestsSpec) DeepCopy

func (in *KafkaRequestsSpec) DeepCopy() *KafkaRequestsSpec

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

func (*KafkaRequestsSpec) DeepCopyInto

func (in *KafkaRequestsSpec) DeepCopyInto(out *KafkaRequestsSpec)

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

type KafkaResourceSpec

type KafkaResourceSpec struct {
	Requests KafkaRequestsSpec `json:"requests,omitempty"`
	Limits   KafkaLimitsSpec   `json:"limits,omitempty"`
}

func (*KafkaResourceSpec) DeepCopy

func (in *KafkaResourceSpec) DeepCopy() *KafkaResourceSpec

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

func (*KafkaResourceSpec) DeepCopyInto

func (in *KafkaResourceSpec) DeepCopyInto(out *KafkaResourceSpec)

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

type KafkaSource

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

	Spec   KafkaSourceSpec   `json:"spec,omitempty"`
	Status KafkaSourceStatus `json:"status,omitempty"`
}

+genclient +genreconciler +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object KafkaSource is the Schema for the kafkasources API. +k8s:openapi-gen=true

func (*KafkaSource) ConvertFrom added in v0.16.0

func (sink *KafkaSource) ConvertFrom(ctx context.Context, obj apis.Convertible) error

ConvertFrom implements apis.Convertible. Converts obj from v1beta1.KafkaSource into v1alpha1.KafkaSource

func (*KafkaSource) ConvertTo added in v0.16.0

func (source *KafkaSource) ConvertTo(ctx context.Context, obj apis.Convertible) error

ConvertTo implements apis.Convertible. Converts source (from v1alpha1.KafkaSource) into v1beta1.KafkaSource

func (*KafkaSource) DeepCopy

func (in *KafkaSource) DeepCopy() *KafkaSource

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

func (*KafkaSource) DeepCopyInto

func (in *KafkaSource) DeepCopyInto(out *KafkaSource)

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

func (*KafkaSource) DeepCopyObject

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

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

func (*KafkaSource) GetConditionSet added in v0.16.0

func (*KafkaSource) GetConditionSet() apis.ConditionSet

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

func (*KafkaSource) GetGroupVersionKind added in v0.10.0

func (*KafkaSource) GetGroupVersionKind() schema.GroupVersionKind

func (*KafkaSource) GetStatus added in v0.16.0

func (k *KafkaSource) GetStatus() *duckv1.Status

GetStatus retrieves the duck status for this resource. Implements the KRShaped interface.

func (*KafkaSource) SetDefaults added in v0.14.0

func (k *KafkaSource) SetDefaults(ctx context.Context)

SetDefaults ensures KafkaSource reflects the default values.

func (*KafkaSource) Validate added in v0.11.0

func (r *KafkaSource) Validate(ctx context.Context) *apis.FieldError

Validate ensures KafkaSource is properly configured.

type KafkaSourceList

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

KafkaSourceList contains a list of KafkaSources.

func (*KafkaSourceList) DeepCopy

func (in *KafkaSourceList) DeepCopy() *KafkaSourceList

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

func (*KafkaSourceList) DeepCopyInto

func (in *KafkaSourceList) DeepCopyInto(out *KafkaSourceList)

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

func (*KafkaSourceList) DeepCopyObject

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

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

type KafkaSourceSpec

type KafkaSourceSpec struct {
	bindingsv1alpha1.KafkaAuthSpec `json:",inline"`

	// Topic topics to consume messages from
	// +required
	Topics []string `json:"topics"`

	// ConsumerGroupID is the consumer group ID.
	// +optional
	ConsumerGroup string `json:"consumerGroup,omitempty"`

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

	// ServiceAccoutName is the name of the ServiceAccount that will be used to run the Receive
	// Adapter Deployment.
	// Deprecated: v1beta1 drops this field.
	ServiceAccountName string `json:"serviceAccountName,omitempty"`

	// Resource limits and Request specifications of the Receive Adapter Deployment
	// Deprecated: v1beta1 drops this field.
	Resources KafkaResourceSpec `json:"resources,omitempty"`

	// CloudEventOverrides defines overrides to control the output format and
	// modifications of the event sent to the sink.
	// +optional
	// Needed for supporting round-tripping
	CloudEventOverrides *duckv1.CloudEventOverrides `json:"ceOverrides,omitempty"`
}

KafkaSourceSpec defines the desired state of the KafkaSource.

func (*KafkaSourceSpec) DeepCopy

func (in *KafkaSourceSpec) DeepCopy() *KafkaSourceSpec

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

func (*KafkaSourceSpec) DeepCopyInto

func (in *KafkaSourceSpec) DeepCopyInto(out *KafkaSourceSpec)

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

type KafkaSourceStatus

type KafkaSourceStatus struct {
	// inherits duck/v1 SourceStatus, 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.
	// * SinkURI - the current active sink URI that has been configured for the
	//   Source.
	duckv1.SourceStatus `json:",inline"`
}

KafkaSourceStatus defines the observed state of KafkaSource.

func (*KafkaSourceStatus) DeepCopy

func (in *KafkaSourceStatus) DeepCopy() *KafkaSourceStatus

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

func (*KafkaSourceStatus) DeepCopyInto

func (in *KafkaSourceStatus) DeepCopyInto(out *KafkaSourceStatus)

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

func (*KafkaSourceStatus) GetCondition

func (s *KafkaSourceStatus) GetCondition(t apis.ConditionType) *apis.Condition

func (*KafkaSourceStatus) InitializeConditions

func (s *KafkaSourceStatus) InitializeConditions()

InitializeConditions sets relevant unset conditions to Unknown state.

func (*KafkaSourceStatus) IsReady

func (s *KafkaSourceStatus) IsReady() bool

IsReady returns true if the resource is ready overall.

func (*KafkaSourceStatus) MarkDeployed

func (s *KafkaSourceStatus) MarkDeployed(d *appsv1.Deployment)

MarkDeployed sets the condition that the source has been deployed.

func (*KafkaSourceStatus) MarkDeploying

func (s *KafkaSourceStatus) MarkDeploying(reason, messageFormat string, messageA ...interface{})

MarkDeploying sets the condition that the source is deploying.

func (*KafkaSourceStatus) MarkNoSink

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

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

func (*KafkaSourceStatus) MarkNotDeployed

func (s *KafkaSourceStatus) MarkNotDeployed(reason, messageFormat string, messageA ...interface{})

MarkNotDeployed sets the condition that the source has not been deployed.

func (*KafkaSourceStatus) MarkResourcesCorrect

func (s *KafkaSourceStatus) MarkResourcesCorrect()

func (*KafkaSourceStatus) MarkResourcesIncorrect

func (s *KafkaSourceStatus) MarkResourcesIncorrect(reason, messageFormat string, messageA ...interface{})

func (*KafkaSourceStatus) MarkSink

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

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

Jump to

Keyboard shortcuts

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