The module is not enabled by default in any bundles.
The module is configured using the ModuleConfig custom resource named loki
(learn more about setting up Deckhouse…).
Example of the ModuleConfig/loki
resource for configuring the module:
apiVersion: deckhouse.io/v1alpha1
kind: ModuleConfig
metadata:
name: loki
spec:
version: 1
enabled: true
settings: # <-- Module parameters from the "Parameters" section below.
Parameters
Schema version: 1
- diskSizeGigabytesinteger
Disk size for log storage or PVC size when specifying the storageClass parameters. You should manually specify the required disk size for storing logs for the period defined by the
retentionPeriodHours
parameter. Loki cannot automatically delete old data when the disk is full. The extended-monitoring module automatically monitors the percentage of used disk space. CAUTION! If the Loki data disk becomes full, the application will stop working. You must find the right balance betweenretentionPeriodHours
anddiskSizeGigabytes
values.Default:
2
- nodeSelectorobject
The same as the Pods’
spec.nodeSelector
parameter in Kubernetes. If the parameter is omitted orfalse
,nodeSelector
will be determined automatically. - resourcesManagement
Settings for CPU and memory requests and limits by Loki pods.
Examples:
resourcesManagement: mode: VPA vpa: mode: Auto cpu: min: 50m max: 2 limitRatio: 1.5 memory: min: 256Mi max: 2Gi limitRatio: 1.5
resourcesManagement: mode: Static static: requests: cpu: 55m memory: 256Mi limits: cpu: 2 memory: 2Gi
- resourcesManagement.modestring
Resource management mode:
Default:
"VPA"
Allowed values:
VPA
,Static
- resourcesManagement.staticobject
Resource management options for the
Static
mode.- resourcesManagement.static.limitsobject
Configuring CPU and memory limits.
- resourcesManagement.static.limits.cpu
Configuring CPU limits.
- resourcesManagement.static.limits.memory
Configuring memory limits.
- resourcesManagement.static.limits.cpu
- resourcesManagement.static.requestsobject
Resource requests settings for pods.
- resourcesManagement.static.requests.cpu
Configuring CPU requests.
- resourcesManagement.static.requests.memory
Configuring memory requests.
- resourcesManagement.static.requests.cpu
- resourcesManagement.static.limitsobject
- resourcesManagement.vpaobject
Resource management options for the
VPA
mode.- resourcesManagement.vpa.cpuobject
CPU-related VPA settings.
- resourcesManagement.vpa.cpu.limitRationumber
The CPU limits/requests ratio.
This ratio is used for calculating the initial CPU limits for a pod.
If this parameter is set, the VPA will recalculate the CPU limits while maintaining the specified limits/requests ratio.
- resourcesManagement.vpa.cpu.max
The maximum value that the VPA can set for the CPU requests.
Default:
2
- resourcesManagement.vpa.cpu.min
The minimum value that the VPA can set for the CPU requests.
Default:
50m
- resourcesManagement.vpa.cpu.limitRationumber
- resourcesManagement.vpa.memoryobject
Memory-related VPA settings.
- resourcesManagement.vpa.memory.limitRationumber
The memory limits/requests ratio.
This ratio is used for calculating the initial memory limits for a pod.
If this parameter is set, the VPA will recalculate the memory limits while maintaining the specified limits/requests ratio.
- resourcesManagement.vpa.memory.max
The maximum memory requests the VPA can set.
Default:
2Gi
- resourcesManagement.vpa.memory.min
The minimum memory requests the VPA can set.
Default:
256Mi
- resourcesManagement.vpa.memory.limitRationumber
- resourcesManagement.vpa.modestring
VPA operating mode.
Default:
"Auto"
Allowed values:
Initial
,Auto
- resourcesManagement.vpa.cpuobject
- resourcesManagement.modestring
- retentionPeriodHoursinteger
How many hours to keep logs before deleting.
Default:
168
- storageClass
The name of the StorageClass to use. If omitted, the StorageClass of the existing Loki PVC is used. If there is no PVC yet, either the global StorageClass or
global.discovery.defaultStorageClass
is used, and if those are undefined, the emptyDir volume is used to store the data.storageClass: false
— forces theemptyDir
usage. You will need to delete the old PVC and restart the Pod manually. CAUTION! Setting a value other than the current one (in the existing PVC) will cause the Loki volume to be re-provisioned and the data to be lost.Examples:
storageClass: false
storageClass: default
- storeSystemLogsboolean
Save logs from the
d8-*
namespaces to loki.The log-shipper module must be enabled.
Default:
true
- tolerationsarray of objects
The same as the Pods’
spec.tolerations
parameter in Kubernetes. If the parameter is omitted orfalse
,tolerations
will be determined automatically.- tolerations.effectstring
- tolerations.keystring
- tolerations.operatorstring
- tolerations.tolerationSecondsinteger
- tolerations.valuestring
An example of the configuration
apiVersion: deckhouse.io/v1alpha1
kind: ModuleConfig
metadata:
name: loki
spec:
settings:
storageClass: ceph-csi-rbd
diskSizeGigabytes: 10
retentionPeriodHours: 48
enabled: true
version: 1