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 ¶
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 ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Consumer.
func (*Consumer) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*Consumer) DeepCopyObject ¶
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 deployments to run
Namespace string `json:"namespace"` // Namespace to run managed deployments
// +optional
Autoscaler *AutoscalerSpec `json:"autoscaler,omitempty"`
// +optional
PartitionEnvKey string `json:"partitionEnvKey,omitempty"`
DeploymentTemplate appsv1.DeploymentSpec `json:"deploymentTemplate"`
ResourcePolicy *autoscalev1.PodResourcePolicy `json:"resourcePolicy"`
}
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
Lagging *int32 `json:"lagging,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 ¶
func (in *ConsumptionQuerySpec) DeepCopy() *ConsumptionQuerySpec
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/graph 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"`
PreferableCatchupPeriod *metav1.Duration `json:"preferableCatchupPeriod"`
}
func (*PrometheusAutoscalerSpec) DeepCopy ¶
func (in *PrometheusAutoscalerSpec) DeepCopy() *PrometheusAutoscalerSpec
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.