config

package
v0.0.0-...-8c8647d Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const (
	// LokiConfigFileName is the name of the config file in the configmap
	LokiConfigFileName = "config.yaml"
	// LokiRuntimeConfigFileName is the name of the runtime config file in the configmap
	LokiRuntimeConfigFileName = "runtime-config.yaml"
	// LokiConfigMountDir is the path that is mounted from the configmap
	LokiConfigMountDir = "/etc/loki/config"
)

Variables

This section is empty.

Functions

func Build

func Build(opts Options) ([]byte, []byte, error)

Build builds a loki stack configuration files

Types

type Address

type Address struct {
	// FQDN is required
	FQDN string
	// Port is required
	Port int
}

Address FQDN and port for a k8s service.

type ObjectStorage

type ObjectStorage struct {
	Endpoint        string
	Region          string
	Buckets         string
	AccessKeyID     string
	AccessKeySecret string
}

ObjectStorage for storage config.

type Options

type Options struct {
	Stack lokiv1beta1.LokiStackSpec

	Namespace        string
	Name             string
	FrontendWorker   Address
	GossipRing       Address
	Querier          Address
	IndexGateway     Address
	StorageDirectory string
	ObjectStorage    ObjectStorage
	QueryParallelism Parallelism
	WriteAheadLog    WriteAheadLog
}

Options is used to render the loki-config.yaml file template

type Parallelism

type Parallelism struct {
	QuerierCPULimits      int64
	QueryFrontendReplicas int32
}

Parallelism for query processing parallelism and rate limiting.

func (Parallelism) Value

func (p Parallelism) Value() int32

Value calculates the floor of the division of querier cpu limits to the query frontend replicas available.

type WriteAheadLog

type WriteAheadLog struct {
	Directory             string
	IngesterMemoryRequest int64
}

WriteAheadLog for ingester processing

func (WriteAheadLog) ReplayMemoryCeiling

func (w WriteAheadLog) ReplayMemoryCeiling() string

ReplayMemoryCeiling calculates 50% of the ingester memory for the ingester to use for the write-ahead-log capbability.

Jump to

Keyboard shortcuts

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