v1alpha1

package
v0.8.0 Latest Latest
Warning

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

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

Documentation

Overview

Package v1alpha1 contains API Schema definitions for the sources v1alpha1 API group +k8s:openapi-gen=true +k8s:deepcopy-gen=package,register +k8s:conversion-gen=github.com/knative/eventing-contrib/pkg/apis/sources +k8s:defaulter-gen=TypeMeta +groupName=sources.eventing.knative.dev

Package v1alpha1 contains API Schema definitions for the sources v1alpha1 API group +k8s:openapi-gen=true +k8s:deepcopy-gen=package,register +k8s:conversion-gen=github.com/knative/eventing-contrib/pkg/apis/sources +k8s:defaulter-gen=TypeMeta +groupName=sources.eventing.knative.dev

Index

Constants

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

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

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

	// KafkaConditionEventTypesProvided has status True when the KafkaSource has been configured with event types.
	KafkaConditionEventTypesProvided duckv1alpha1.ConditionType = "EventTypesProvided"

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

Variables

View Source
var (
	// SchemeGroupVersion is group version used to register these objects
	SchemeGroupVersion = schema.GroupVersion{Group: "sources.eventing.knative.dev", Version: "v1alpha1"}

	// SchemeBuilder is used to add go types to the GroupVersionKind scheme
	SchemeBuilder = &scheme.Builder{GroupVersion: SchemeGroupVersion}

	AddToScheme = SchemeBuilder.AddToScheme
)

Functions

func KafkaEventSource

func KafkaEventSource(namespace, kafkaSourceName, topic string) string

KafkaEventSource returns the Kafka CloudEvent source.

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"`
}

KafkaSource is the Schema for the kafkasources API. +k8s:openapi-gen=true +kubebuilder:subresource:status +kubebuilder:categories=all,knative,eventing,sources

func (*KafkaSource) CheckImmutableFields

func (current *KafkaSource) CheckImmutableFields(ctx context.Context, og apis.Immutable) *apis.FieldError

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.

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 KafkaSourceNetSpec

type KafkaSourceNetSpec struct {
	SASL KafkaSourceSASLSpec `json:"sasl,omitempty"`
	TLS  KafkaSourceTLSSpec  `json:"tls,omitempty"`
}

func (*KafkaSourceNetSpec) DeepCopy

func (in *KafkaSourceNetSpec) DeepCopy() *KafkaSourceNetSpec

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

func (*KafkaSourceNetSpec) DeepCopyInto

func (in *KafkaSourceNetSpec) DeepCopyInto(out *KafkaSourceNetSpec)

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

type KafkaSourceSASLSpec

type KafkaSourceSASLSpec struct {
	Enable bool `json:"enable,omitempty"`

	// User is the Kubernetes secret containing the SASL username.
	// +optional
	User SecretValueFromSource `json:"user,omitempty"`
	// Password is the Kubernetes secret containing the SASL password.
	// +optional
	Password SecretValueFromSource `json:"password,omitempty"`
}

func (*KafkaSourceSASLSpec) DeepCopy

func (in *KafkaSourceSASLSpec) DeepCopy() *KafkaSourceSASLSpec

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

func (*KafkaSourceSASLSpec) DeepCopyInto

func (in *KafkaSourceSASLSpec) DeepCopyInto(out *KafkaSourceSASLSpec)

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

type KafkaSourceSpec

type KafkaSourceSpec struct {
	// Bootstrap servers are the Kafka servers the consumer will connect to.
	// +required
	BootstrapServers string `json:"bootstrapServers"`

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

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

	Net KafkaSourceNetSpec `json:"net,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"`

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

	// Resource limits and Request specifications of the Receive Adapter Deployment
	Resources KafkaResourceSpec `json:"resources,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/v1alpha1 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.
	duckv1alpha1.Status `json:",inline"`

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

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

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

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()

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) MarkEventTypes

func (s *KafkaSourceStatus) MarkEventTypes()

MarkEventTypes sets the condition that the source has created its event types.

func (*KafkaSourceStatus) MarkNoEventTypes

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

MarkNoEventTypes sets the condition that the source does not its event types configured.

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 string)

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

type KafkaSourceTLSSpec

type KafkaSourceTLSSpec struct {
	Enable bool `json:"enable,omitempty"`

	// Cert is the Kubernetes secret containing the client certificate.
	// +optional
	Cert SecretValueFromSource `json:"cert,omitempty"`
	// Key is the Kubernetes secret containing the client key.
	// +optional
	Key SecretValueFromSource `json:"key,omitempty"`
	// CACert is the Kubernetes secret containing the server CA cert.
	// +optional
	CACert SecretValueFromSource `json:"caCert,omitempty"`
}

func (*KafkaSourceTLSSpec) DeepCopy

func (in *KafkaSourceTLSSpec) DeepCopy() *KafkaSourceTLSSpec

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

func (*KafkaSourceTLSSpec) DeepCopyInto

func (in *KafkaSourceTLSSpec) DeepCopyInto(out *KafkaSourceTLSSpec)

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

type SecretValueFromSource

type SecretValueFromSource struct {
	// The Secret key to select from.
	SecretKeyRef *corev1.SecretKeySelector `json:"secretKeyRef,omitempty"`
}

SecretValueFromSource represents the source of a secret value

func (*SecretValueFromSource) DeepCopy

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

func (*SecretValueFromSource) DeepCopyInto

func (in *SecretValueFromSource) DeepCopyInto(out *SecretValueFromSource)

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

Jump to

Keyboard shortcuts

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