v1alpha1

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Sep 9, 2019 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Overview

Package v1alpha1 contains API Schema definitions for the konsumerator v1alpha1 API group +kubebuilder:object:generate=true +groupName=konsumerator.lwolf.org

Index

Constants

This section is empty.

Variables

View Source
var (
	// GroupVersion is group version used to register these objects
	GroupVersion = schema.GroupVersion{Group: "konsumerator.lwolf.org", Version: "v1alpha1"}

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

	// AddToScheme adds the types in this group-version to the given scheme.
	AddToScheme = SchemeBuilder.AddToScheme
)

Functions

This section is empty.

Types

type AutoscalerSpec

type AutoscalerSpec struct {
	Mode AutoscalerType `json:"mode"`
	// +optional
	Prometheus *PrometheusAutoscalerSpec `json:"prometheus,omitempty"`
}

func (*AutoscalerSpec) DeepCopy

func (in *AutoscalerSpec) DeepCopy() *AutoscalerSpec

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

func (*AutoscalerSpec) DeepCopyInto

func (in *AutoscalerSpec) DeepCopyInto(out *AutoscalerSpec)

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

type AutoscalerType

type AutoscalerType string
const (
	AutoscalerTypePrometheus AutoscalerType = "prometheus"
	AutoscalerTypeVpa        AutoscalerType = "vpa"
	AutoscalerTypeNone       AutoscalerType = ""
)

type Consumer

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

	Spec   ConsumerSpec   `json:"spec,omitempty"`
	Status ConsumerStatus `json:"status,omitempty"`
}

Consumer is the Schema for the consumers API

func (*Consumer) DeepCopy

func (in *Consumer) DeepCopy() *Consumer

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

func (*Consumer) DeepCopyInto

func (in *Consumer) DeepCopyInto(out *Consumer)

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

func (*Consumer) DeepCopyObject

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

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

type ConsumerList

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

ConsumerList contains a list of Consumer

func (*ConsumerList) DeepCopy

func (in *ConsumerList) DeepCopy() *ConsumerList

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

func (*ConsumerList) DeepCopyInto

func (in *ConsumerList) DeepCopyInto(out *ConsumerList)

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

func (*ConsumerList) DeepCopyObject

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

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

type ConsumerSpec

type ConsumerSpec struct {
	// Important: Run "make" to regenerate code after modifying this file
	NumPartitions *int32 `json:"numPartitions"` // Number of partitions
	Name          string `json:"name"`          // Name of the instance to run
	Namespace     string `json:"namespace"`     // Namespace to run managed instances
	// +optional
	Autoscaler *AutoscalerSpec `json:"autoscaler,omitempty"`

	// +optional
	PartitionEnvKey    string                `json:"partitionEnvKey,omitempty"`
	DeploymentTemplate appsv1.DeploymentSpec `json:"deploymentTemplate"`
	// +optional
	ResourcePolicy *autoscalev1.PodResourcePolicy `json:"resourcePolicy,omitempty"`
}

ConsumerSpec defines the desired state of Consumer

func (*ConsumerSpec) DeepCopy

func (in *ConsumerSpec) DeepCopy() *ConsumerSpec

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

func (*ConsumerSpec) DeepCopyInto

func (in *ConsumerSpec) DeepCopyInto(out *ConsumerSpec)

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

type ConsumerStatus

type ConsumerStatus struct {
	// Important: Run "make" to regenerate code after modifying this file
	// +optional
	ObservedGeneration *int64 `json:"observedGeneration,omitempty"`
	// +optional
	Expected *int32 `json:"expected,omitempty"`
	// +optional
	Running *int32 `json:"running,omitempty"`
	// +optional
	Paused *int32 `json:"paused,omitempty"`
	// +optional
	Lagging *int32 `json:"lagging,omitempty"`
	// +optional
	Missing *int32 `json:"missing,omitempty"`
	// +optional
	Outdated *int32 `json:"outdated,omitempty"`
	// +optional
	LastSyncTime *metav1.Time `json:"lastSyncTime,omitempty"`
	// +optional
	LastSyncState map[string]InstanceState `json:"lastSyncState,omitempty"`
}

ConsumerStatus defines the observed state of Consumer

func (*ConsumerStatus) DeepCopy

func (in *ConsumerStatus) DeepCopy() *ConsumerStatus

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

func (*ConsumerStatus) DeepCopyInto

func (in *ConsumerStatus) DeepCopyInto(out *ConsumerStatus)

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

type ConsumptionQuerySpec

type ConsumptionQuerySpec struct {
	Query          string `json:"query"`
	PartitionLabel string `json:"partitionLabel"`
}

func (*ConsumptionQuerySpec) DeepCopy

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

func (*ConsumptionQuerySpec) DeepCopyInto

func (in *ConsumptionQuerySpec) DeepCopyInto(out *ConsumptionQuerySpec)

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

type InstanceState

type InstanceState struct {
	ProductionRate  int64 `json:"productionRate"`
	ConsumptionRate int64 `json:"consumptionRate"`
	MessagesBehind  int64 `json:"messageBehind"`
}

func (*InstanceState) DeepCopy

func (in *InstanceState) DeepCopy() *InstanceState

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

func (*InstanceState) DeepCopyInto

func (in *InstanceState) DeepCopyInto(out *InstanceState)

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

type OffsetQuerySpec

type OffsetQuerySpec struct {
	Query          string `json:"query"`
	PartitionLabel string `json:"partitionLabel"`
}

func (*OffsetQuerySpec) DeepCopy

func (in *OffsetQuerySpec) DeepCopy() *OffsetQuerySpec

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

func (*OffsetQuerySpec) DeepCopyInto

func (in *OffsetQuerySpec) DeepCopyInto(out *OffsetQuerySpec)

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

type ProductionQuerySpec

type ProductionQuerySpec struct {
	Query          string `json:"query"`
	PartitionLabel string `json:"partitionLabel"`
}

func (*ProductionQuerySpec) DeepCopy

func (in *ProductionQuerySpec) DeepCopy() *ProductionQuerySpec

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

func (*ProductionQuerySpec) DeepCopyInto

func (in *ProductionQuerySpec) DeepCopyInto(out *ProductionQuerySpec)

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

type PrometheusAutoscalerSpec

type PrometheusAutoscalerSpec struct {
	// TODO: needs to be extended to support protocol,address,tls,etc...
	// for now just http://prometheus:9091 should work
	Address       []string         `json:"address"`
	MinSyncPeriod *metav1.Duration `json:"minSyncPeriod"`

	Offset      OffsetQuerySpec      `json:"offset"`
	Production  ProductionQuerySpec  `json:"production"`
	Consumption ConsumptionQuerySpec `json:"consumption"`

	RatePerCore  *int64            `json:"ratePerCore"`
	RamPerCore   resource.Quantity `json:"ramPerCore"`
	TolerableLag *metav1.Duration  `json:"tolerableLag"`
	CriticalLag  *metav1.Duration  `json:"criticalLag"`
	RecoveryTime *metav1.Duration  `json:"recoveryTime"`
}

func (*PrometheusAutoscalerSpec) DeepCopy

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

func (*PrometheusAutoscalerSpec) DeepCopyInto

func (in *PrometheusAutoscalerSpec) DeepCopyInto(out *PrometheusAutoscalerSpec)

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