v1alpha1

package
v0.0.0-...-3bfead5 Latest Latest
Warning

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

Go to latest
Published: Jul 26, 2021 License: Apache-2.0 Imports: 20 Imported by: 0

Documentation

Overview

Package v1alpha1 contains API Schema definitions for the cortex v1alpha1 API group +kubebuilder:object:generate=true +groupName=cortex.opstrace.io

Index

Constants

View Source
const DefaultCortexConfigTemplate = `` /* 2280-byte string literal not displayed */

Variables

View Source
var (
	// GroupVersion is group version used to register these objects
	GroupVersion = schema.GroupVersion{Group: "cortex.opstrace.io", 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 Cortex

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

	Spec   CortexSpec   `json:"spec,omitempty"`
	Status CortexStatus `json:"status,omitempty"`
}

Cortex is the Schema for the cortices API

func (*Cortex) AsCortexConfig

func (r *Cortex) AsCortexConfig() (*cortex.Config, error)

AsCortexConfig converts the configuration to an upstream cortex.Config object.

func (*Cortex) AsJSON

func (r *Cortex) AsJSON() ([]byte, error)

func (*Cortex) AsYAML

func (r *Cortex) AsYAML() ([]byte, error)

func (*Cortex) DeepCopy

func (in *Cortex) DeepCopy() *Cortex

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

func (*Cortex) DeepCopyInto

func (in *Cortex) DeepCopyInto(out *Cortex)

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

func (*Cortex) DeepCopyObject

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

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

func (*Cortex) Default

func (r *Cortex) Default()

Default implements webhook.Defaulter so a webhook will be registered for the type

func (*Cortex) RuntimeConfigAsYAML

func (r *Cortex) RuntimeConfigAsYAML() ([]byte, error)

func (*Cortex) SetupWebhookWithManager

func (r *Cortex) SetupWebhookWithManager(mgr ctrl.Manager) error

func (*Cortex) Validate

func (r *Cortex) Validate() error

func (*Cortex) ValidateCreate

func (r *Cortex) ValidateCreate() error

ValidateCreate implements webhook.Validator so a webhook will be registered for the type

func (*Cortex) ValidateDelete

func (r *Cortex) ValidateDelete() error

ValidateDelete implements webhook.Validator so a webhook will be registered for the type

func (*Cortex) ValidateUpdate

func (r *Cortex) ValidateUpdate(old runtime.Object) error

ValidateUpdate implements webhook.Validator so a webhook will be registered for the type

type CortexList

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

CortexList contains a list of Cortex

func (*CortexList) DeepCopy

func (in *CortexList) DeepCopy() *CortexList

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

func (*CortexList) DeepCopyInto

func (in *CortexList) DeepCopyInto(out *CortexList)

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

func (*CortexList) DeepCopyObject

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

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

type CortexSpec

type CortexSpec struct {

	// Image of Cortex to deploy.
	Image string `json:"image,omitempty"`

	ServiceAccountSpec *ServiceAccountSpec `json:"service_account_spec,omitempty"`

	IngesterSpec      *StatefulSetSpec `json:"ingester_spec,omitempty"`
	CompactorSpec     *StatefulSetSpec `json:"compactor_spec,omitempty"`
	StoreGatewaySpec  *StatefulSetSpec `json:"store_gateway_spec,omitempty"`
	DistributorSpec   *DeploymentSpec  `json:"distributor_spec,omitempty"`
	QuerierSpec       *DeploymentSpec  `json:"querier_spec,omitempty"`
	QueryFrontendSpec *DeploymentSpec  `json:"query_frontend_spec,omitempty"`
	AlertManagerSpec  *DeploymentSpec  `json:"alertmanager_spec,omitempty"`
	RulerSpec         *DeploymentSpec  `json:"ruler_spec,omitempty"`

	Memcached *MemcachedSpec `json:"memcached,omitempty"`

	// Config accepts any object, meaning it accepts any valid Cortex config
	// yaml. Defaulting and Validation are done in the webhooks.
	// +kubebuilder:pruning:PreserveUnknownFields
	Config runtime.RawExtension `json:"config,omitempty"`

	// +kubebuilder:pruning:PreserveUnknownFields
	RuntimeConfig *runtime.RawExtension `json:"runtime_config,omitempty"`
}

CortexSpec defines the desired state of Cortex

func (*CortexSpec) ConfigSHA

func (c *CortexSpec) ConfigSHA() string

func (*CortexSpec) DeepCopy

func (in *CortexSpec) DeepCopy() *CortexSpec

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

func (*CortexSpec) DeepCopyInto

func (in *CortexSpec) DeepCopyInto(out *CortexSpec)

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

type CortexStatus

type CortexStatus struct {
	MemcachedRef     *MemcachedReference          `json:"memcached,omitempty"`
	IngesterRef      *corev1.LocalObjectReference `json:"ingester,omitempty"`
	DistributorRef   *corev1.LocalObjectReference `json:"distributor,omitempty"`
	QuerierRef       *corev1.LocalObjectReference `json:"querier,omitempty"`
	QueryFrontendRef *corev1.LocalObjectReference `json:"query_frontend,omitempty"`
	CompactorRef     *corev1.LocalObjectReference `json:"compactor,omitempty"`
	StoreGatewayRef  *corev1.LocalObjectReference `json:"store_gateway,omitempty"`
	AlertManagerRef  *corev1.LocalObjectReference `json:"alertmanager,omitempty"`
	RulerRef         *corev1.LocalObjectReference `json:"ruler,omitempty"`
}

CortexStatus defines the observed state of Cortex

func (*CortexStatus) DeepCopy

func (in *CortexStatus) DeepCopy() *CortexStatus

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

func (*CortexStatus) DeepCopyInto

func (in *CortexStatus) DeepCopyInto(out *CortexStatus)

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

type DeploymentSpec

type DeploymentSpec struct {
	Replicas *int32 `json:"replicas,omitempty"`
}

func (*DeploymentSpec) DeepCopy

func (in *DeploymentSpec) DeepCopy() *DeploymentSpec

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

func (*DeploymentSpec) DeepCopyInto

func (in *DeploymentSpec) DeepCopyInto(out *DeploymentSpec)

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

func (*DeploymentSpec) Default

func (s *DeploymentSpec) Default()

type MemcachedReference

type MemcachedReference struct {
	ChunksCacheRef       *corev1.LocalObjectReference `json:"chunks_cache,omitempty"`
	IndexQueriesCacheRef *corev1.LocalObjectReference `json:"index_queries_cache,omitempty"`
	IndexWritesCacheRef  *corev1.LocalObjectReference `json:"index_writes_cache,omitempty"`
	ResultsCacheRef      *corev1.LocalObjectReference `json:"results_cache,omitempty"`
	MetadataCacheRef     *corev1.LocalObjectReference `json:"metadata_cache,omitempty"`
}

MemcachedReference holds references to all the Memcached StatefulSets

func (*MemcachedReference) DeepCopy

func (in *MemcachedReference) DeepCopy() *MemcachedReference

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

func (*MemcachedReference) DeepCopyInto

func (in *MemcachedReference) DeepCopyInto(out *MemcachedReference)

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

func (*MemcachedReference) IsSet

func (r *MemcachedReference) IsSet() bool

IsSet returns true if all the resource references are not nil

type MemcachedSpec

type MemcachedSpec struct {
	Image string `json:"image,omitempty"`

	ChunksCacheSpec       *MemcachedStatefulSetSpec `json:"chunks_cache_spec,omitempty"`
	IndexQueriesCacheSpec *MemcachedStatefulSetSpec `json:"index_queries_cache_spec,omitempty"`
	IndexWritesCacheSpec  *MemcachedStatefulSetSpec `json:"index_writes_cache_spec,omitempty"`
	ResultsCacheSpec      *MemcachedStatefulSetSpec `json:"results_cache_spec,omitempty"`
	MetadataCacheSpec     *MemcachedStatefulSetSpec `json:"metadata_cache_spec,omitempty"`
}

func (*MemcachedSpec) DeepCopy

func (in *MemcachedSpec) DeepCopy() *MemcachedSpec

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

func (*MemcachedSpec) DeepCopyInto

func (in *MemcachedSpec) DeepCopyInto(out *MemcachedSpec)

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

func (*MemcachedSpec) Default

func (m *MemcachedSpec) Default()

type MemcachedStatefulSetSpec

type MemcachedStatefulSetSpec struct {
	Replicas *int32 `json:"replicas,omitempty"`
	// MemoryLimit is the item memory in megabytes
	MemoryLimit *int32 `json:"memory_limit,omitempty"`
	// MaxItemSize adjusts max item size
	MaxItemSize *string `json:"max_item_size,omitempty"`
}

func (*MemcachedStatefulSetSpec) AsArgs

func (m *MemcachedStatefulSetSpec) AsArgs() []string

func (*MemcachedStatefulSetSpec) DeepCopy

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

func (*MemcachedStatefulSetSpec) DeepCopyInto

func (in *MemcachedStatefulSetSpec) DeepCopyInto(out *MemcachedStatefulSetSpec)

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

func (*MemcachedStatefulSetSpec) Default

func (m *MemcachedStatefulSetSpec) Default()

type ServiceAccountSpec

type ServiceAccountSpec struct {
	Annotations map[string]string `json:"annotations,omitempty"`
	// ImagePullSecrets is a list of references to secrets in the same namespace
	// to use for pulling any images in pods that reference this ServiceAccount.
	// More info:
	// https://kubernetes.io/docs/concepts/containers/images/#specifying-imagepullsecrets-on-a-pod
	ImagePullSecrets []corev1.LocalObjectReference `json:"image_pull_secrets,omitempty"`
}

func (*ServiceAccountSpec) DeepCopy

func (in *ServiceAccountSpec) DeepCopy() *ServiceAccountSpec

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

func (*ServiceAccountSpec) DeepCopyInto

func (in *ServiceAccountSpec) DeepCopyInto(out *ServiceAccountSpec)

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

type StatefulSetSpec

type StatefulSetSpec struct {
	DatadirSize      *resource.Quantity `json:"datadir_size,omitempty"`
	StorageClassName *string            `json:"storage_class_name,omitempty"`
	Replicas         *int32             `json:"replicas,omitempty"`
}

func (*StatefulSetSpec) DeepCopy

func (in *StatefulSetSpec) DeepCopy() *StatefulSetSpec

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

func (*StatefulSetSpec) DeepCopyInto

func (in *StatefulSetSpec) DeepCopyInto(out *StatefulSetSpec)

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

func (*StatefulSetSpec) Default

func (s *StatefulSetSpec) Default()

Jump to

Keyboard shortcuts

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