v1alpha1

package
v0.0.0-...-72da4f8 Latest Latest
Warning

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

Go to latest
Published: May 14, 2020 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Overview

Package v1alpha1 contains API Schema definitions for the kafkaconnect v1alpha1 API group +k8s:deepcopy-gen=package,register +groupName=kafkaconnect.operator.io

Package v1alpha1 contains API Schema definitions for the kafkaconnect v1alpha1 API group +k8s:deepcopy-gen=package,register +groupName=kafkaconnect.operator.io

Index

Constants

This section is empty.

Variables

View Source
var (
	// SchemeGroupVersion is group version used to register these objects
	SchemeGroupVersion = schema.GroupVersion{Group: "kafkaconnect.operator.io", Version: "v1alpha1"}

	// SchemeBuilder is used to add go types to the GroupVersionKind scheme
	SchemeBuilder = &scheme.Builder{GroupVersion: SchemeGroupVersion}
	// AddToScheme is a global function that registers this API group & version to a scheme
	AddToScheme = SchemeBuilder.AddToScheme
)

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 ConfigMap

type ConfigMap struct {
	Name string `json:"name"`
	Item string `json:"item"`
}

func (*ConfigMap) DeepCopy

func (in *ConfigMap) DeepCopy() *ConfigMap

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

func (*ConfigMap) DeepCopyInto

func (in *ConfigMap) DeepCopyInto(out *ConfigMap)

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

type IngressSpec

type IngressSpec struct {
	// Style define the style of the ingress created, either a subDomain or a path
	Style *IngressStyle `json:"style,omitempty"`
	// the parent domain from where the ingress will be created
	ParentDomain string `json:"parentDomain"`
}

IngressSpec defines how we need to create ingress to expose the kafka connect rest api

func (*IngressSpec) DeepCopy

func (in *IngressSpec) DeepCopy() *IngressSpec

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

func (*IngressSpec) DeepCopyInto

func (in *IngressSpec) DeepCopyInto(out *IngressSpec)

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

type IngressStyle

type IngressStyle string

IngressStyle define the style of the ingress created, either a subDomain or a path

const (
	// PathStyle will create ingress like parentDomain/kafkaconnectName
	PathStyle IngressStyle = "pathStyle"
	// DomainStyle will create ingress like kafkaconnectName.parentDomain
	DomainStyle IngressStyle = "domainStyle"
)

type KafkaConnect

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

	Spec   KafkaConnectSpec    `json:"spec"`
	Status *KafkaConnectStatus `json:"status,omitempty"`
}

KafkaConnect is the Schema for the kafkaconnects API +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object +k8s:openapi-gen=true +kubebuilder:subresource:status +kubebuilder:resource:path=kafkaconnects,scope=Namespaced +genclient

func CreateFakeKafkaConnect

func CreateFakeKafkaConnect() *KafkaConnect

CreateFakeKafkaConnect is the function to create kafkaconnect object for unit test only

func (*KafkaConnect) DeepCopy

func (in *KafkaConnect) DeepCopy() *KafkaConnect

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

func (*KafkaConnect) DeepCopyInto

func (in *KafkaConnect) DeepCopyInto(out *KafkaConnect)

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

func (*KafkaConnect) DeepCopyObject

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

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

type KafkaConnectAutoScaler

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

	Spec   KafkaConnectAutoScalerSpec   `json:"spec,omitempty"`
	Status KafkaConnectAutoScalerStatus `json:"status,omitempty"`
}

KafkaConnectAutoScaler is the Schema for the kafkaconnectautoscalers API +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object +k8s:openapi-gen=true +kubebuilder:subresource:status +kubebuilder:resource:path=kafkaconnectautoscalers,scope=Namespaced +genclient

func (*KafkaConnectAutoScaler) DeepCopy

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

func (*KafkaConnectAutoScaler) DeepCopyInto

func (in *KafkaConnectAutoScaler) DeepCopyInto(out *KafkaConnectAutoScaler)

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

func (*KafkaConnectAutoScaler) DeepCopyObject

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

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

type KafkaConnectAutoScalerList

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

KafkaConnectAutoScalerList contains a list of KafkaConnectAutoScaler +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object

func (*KafkaConnectAutoScalerList) DeepCopy

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

func (*KafkaConnectAutoScalerList) DeepCopyInto

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

func (*KafkaConnectAutoScalerList) DeepCopyObject

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

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

type KafkaConnectAutoScalerSpec

type KafkaConnectAutoScalerSpec struct {
	// kcScaleTargetRef points to the kafka connector to scale, and is used to the kafkaconnect for which metrics
	// should be collected, as well as to actually change the replica count.
	KafkaConnectorScaleTargetRef KafkaConnectorReference `json:"kcScaleTargetRef" protobuf:"bytes,1,opt,name=kcScaleTargetRef"`
	// minTasks is the lower limit for the number of replicas to which the autoscaler
	// can scale down.  It defaults to 1 pod.  minTasks is allowed to be 0 if the
	// alpha feature gate HPAScaleToZero is enabled and at least one Object or External
	// metric is configured.  Scaling is active as long as at least one metric value is
	// available.
	// +optional
	MinTasks *int32 `json:"minTasks,omitempty" protobuf:"varint,2,opt,name=minTasks"`
	// maxTasks is the upper limit for the number of replicas to which the autoscaler can scale up.
	// It cannot be less that minTasks.
	MaxTasks int32 `json:"maxTasks" protobuf:"varint,3,opt,name=maxTasks"`
	// metrics contains the specifications for which to use to calculate the
	// desired replica count (the maximum replica count across all metrics will
	// be used).  The desired replica count is calculated multiplying the
	// ratio between the target value and the current value by the current
	// number of pods.  Ergo, metrics used must decrease as the pod count is
	// increased, and vice-versa.  See the individual metric source types for
	// more information about how each type of metric must respond.
	// If not set, the default metric will be set to 80% average CPU utilization.
	// +optional
	Metrics []autoscalingv2beta2.MetricSpec `json:"metrics,omitempty" protobuf:"bytes,4,rep,name=metrics"`
}

KafkaConnectAutoScalerSpec defines the desired state of KafkaConnectAutoScaler +k8s:openapi-gen=true

func (*KafkaConnectAutoScalerSpec) DeepCopy

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

func (*KafkaConnectAutoScalerSpec) DeepCopyInto

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

type KafkaConnectAutoScalerStatus

type KafkaConnectAutoScalerStatus struct {
	autoscalingv2beta2.HorizontalPodAutoscalerStatus `json:",inline"`
}

KafkaConnectAutoScalerStatus defines the observed state of KafkaConnectAutoScaler +k8s:openapi-gen=true

func (*KafkaConnectAutoScalerStatus) DeepCopy

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

func (*KafkaConnectAutoScalerStatus) DeepCopyInto

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

type KafkaConnectList

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

KafkaConnectList contains a list of KafkaConnect +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object

func (*KafkaConnectList) DeepCopy

func (in *KafkaConnectList) DeepCopy() *KafkaConnectList

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

func (*KafkaConnectList) DeepCopyInto

func (in *KafkaConnectList) DeepCopyInto(out *KafkaConnectList)

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

func (*KafkaConnectList) DeepCopyObject

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

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

type KafkaConnectSpec

type KafkaConnectSpec struct {
	// PodSpec use the default k8s.io/api/core/v1/PodSpec
	// for more information check https://godoc.org/k8s.io/api/core/v1#PodSpec
	PodSpec corev1.PodSpec `json:"podSpec"`
	// IngressSpec define how the ingress object should be created
	// special role should be given to the related service account.
	// if nil no ingress object will be created by operator, you can always creat your own ingress
	IngressSpec *IngressSpec `json:"ingressSpec,omitempty"`
	// KafkaConnectorsSpec define the different
	KafkaConnectorsSpec *KafkaConnectorsSpec `json:"connectors,omitempty"`
	//scaleStabilizationSec is the duration in sec between each scale action
	ScaleStabilizationSec *int64 `json:"scaleStabilizationSec,omitempty"`
	// RestApiPort tell which one is the port for rest api, if more than one port exist in pod spec
	KafkaConnectRestAPIPort int32 `json:"kafkaConnectRestAPIPort"`
}

KafkaConnectSpec defines the desired state of KafkaConnect this resource will create a Deployment and a Service by default if IngressSpec is given, then it will also create an ingress obj

func (*KafkaConnectSpec) DeepCopy

func (in *KafkaConnectSpec) DeepCopy() *KafkaConnectSpec

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

func (*KafkaConnectSpec) DeepCopyInto

func (in *KafkaConnectSpec) DeepCopyInto(out *KafkaConnectSpec)

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

type KafkaConnectStatus

type KafkaConnectStatus struct {
	KafkaConnectorStatus []KafkaConnectorStatus `json:"connectorStatus"`
	PodNb                int32                  `json:"podNb"`
	Updating             bool                   `json:"updating"`
	LastScaleTime        metav1.Time            `json:"lastScaleTime"`
}

KafkaConnectStatus defines the observed state of KafkaConnect +k8s:openapi-gen=true

func (*KafkaConnectStatus) DeepCopy

func (in *KafkaConnectStatus) DeepCopy() *KafkaConnectStatus

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

func (*KafkaConnectStatus) DeepCopyInto

func (in *KafkaConnectStatus) DeepCopyInto(out *KafkaConnectStatus)

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

type KafkaConnectorConfig

type KafkaConnectorConfig struct {
	// Name is the Name should be used as the connector
	Name string `json:"name"`
	// URL is the link will connector config could be found
	URL *string `json:"url,omitempty"`
	// configMap is the link will connector config could be found
	ConfigMap *ConfigMap `json:"configMap,omitempty"`
	// TasksMax define number of task for connector it will override the value in config. the default value is the nb defined in the config
	TasksMax *int32 `json:"taskMax,omitempty"`
	//exposeLagMetric tell if lag should be expose or not
	ExposeLagMetric bool `json:"exposeLagMetric,omitempty"`
}

KafkaConnectorConfig define one connector will be created if it's different from the existing one

func (*KafkaConnectorConfig) DeepCopy

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

func (*KafkaConnectorConfig) DeepCopyInto

func (in *KafkaConnectorConfig) DeepCopyInto(out *KafkaConnectorConfig)

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

type KafkaConnectorReference

type KafkaConnectorReference struct {
	// the name of the kafkaconnect CR
	Name string `json:"name" protobuf:"bytes,2,opt,name=name"`
	// API version of the referent
	// +optional
	APIVersion string `json:"apiVersion,omitempty" protobuf:"bytes,3,opt,name=apiVersion"`
	//kafkaConnectorName name of a specific kafka connector in the kafka connect resource object
	KafkaConnectorName string `json:"kafkaConnectorName"`
}

KafkaConnectorReference contains enough information to let you identify the referred kafka connector.

func (*KafkaConnectorReference) DeepCopy

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

func (*KafkaConnectorReference) DeepCopyInto

func (in *KafkaConnectorReference) DeepCopyInto(out *KafkaConnectorReference)

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

type KafkaConnectorStatus

type KafkaConnectorStatus struct {
	Name   string `json:"name"`
	TaskNb int32  `json:"taskNb"`
	Error  string `json:"error,omitempty"`
}

KafkaConnectorStatus defines the observed state of each KafkaConnector +k8s:openapi-gen=true

func (*KafkaConnectorStatus) DeepCopy

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

func (*KafkaConnectorStatus) DeepCopyInto

func (in *KafkaConnectorStatus) DeepCopyInto(out *KafkaConnectorStatus)

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

type KafkaConnectorsSpec

type KafkaConnectorsSpec struct {
	// connectorConfigs is the list of the kafka connector config
	Configs []KafkaConnectorConfig `json:"connectorConfigs,omitempty"`
	// taskPerPod is the number of the task per pod, default: 1, if <=0 autoscaler will never work and initPodReplicas will be used to create deployment
	TaskPerPod *int32 `json:"taskPerPod,omitempty"`
	//initPodReplicas is the initial number of the pod if TaskPerPod is <=0
	InitDeploymentReplicas *int32 `json:"initPodReplicas,omitempty"`
	//keepUnknownConnectors by default false, if false, it will delete all unknown connector in the cluster
	KeepUnknownConnectors bool `json:"keepUnknownConnectors,omitempty"`
	//kafkaBrokers is the brokers of kafka cluster
	KafkaBrokers string `json:"kafkaBrokers"`
}

KafkaConnectorsSpec define the list of the connector config and the number of task per pod

func (*KafkaConnectorsSpec) DeepCopy

func (in *KafkaConnectorsSpec) DeepCopy() *KafkaConnectorsSpec

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

func (*KafkaConnectorsSpec) DeepCopyInto

func (in *KafkaConnectorsSpec) DeepCopyInto(out *KafkaConnectorsSpec)

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