mirror of
https://github.com/openshift/openshift-docs.git
synced 2026-02-05 12:46:18 +01:00
41 lines
1.4 KiB
Plaintext
41 lines
1.4 KiB
Plaintext
// Module included in the following assemblies:
|
|
//
|
|
// * logging/cluster-logging-loki.adoc
|
|
// * observability/logging/logging-6.2/log6x-loki-6.2.adoc
|
|
|
|
:_mod-docs-content-type: CONCEPT
|
|
[id="logging-loki-reliability-hardening_{context}"]
|
|
= Configuring Loki to tolerate node failure
|
|
|
|
The {loki-op} supports setting pod anti-affinity rules to request that pods of the same component are scheduled on different available nodes in the cluster.
|
|
|
|
include::snippets/about-pod-affinity.adoc[]
|
|
|
|
The Operator sets default, preferred `podAntiAffinity` rules for all Loki components, which includes the `compactor`, `distributor`, `gateway`, `indexGateway`, `ingester`, `querier`, `queryFrontend`, and `ruler` components.
|
|
|
|
You can override the preferred `podAntiAffinity` settings for Loki components by configuring required settings in the `requiredDuringSchedulingIgnoredDuringExecution` field:
|
|
|
|
.Example user settings for the ingester component
|
|
[source,yaml]
|
|
----
|
|
apiVersion: loki.grafana.com/v1
|
|
kind: LokiStack
|
|
metadata:
|
|
name: logging-loki
|
|
namespace: openshift-logging
|
|
spec:
|
|
# ...
|
|
template:
|
|
ingester:
|
|
podAntiAffinity:
|
|
# ...
|
|
requiredDuringSchedulingIgnoredDuringExecution: <1>
|
|
- labelSelector:
|
|
matchLabels: <2>
|
|
app.kubernetes.io/component: ingester
|
|
topologyKey: kubernetes.io/hostname
|
|
# ...
|
|
----
|
|
<1> The stanza to define a required rule.
|
|
<2> The key-value pair (label) that must be matched to apply the rule.
|