Skip to content

Commit

Permalink
Merge pull request #464 from danskernesdigitalebibliotek/add-tolerati…
Browse files Browse the repository at this point in the history
…ons-and-affinity-to-loki

Add affinity and tolerations for loki workloads
  • Loading branch information
ath88 authored Sep 18, 2024
2 parents fba0662 + 229e7d6 commit 93833d5
Showing 1 changed file with 104 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,26 @@ backend:
accessModes:
- ReadWriteOnce
size: 32Gi
tolerations:
- key: CriticalAddonsOnly
operator: Exists
affinity: |
podAntiAffinity:
requiredDuringSchedulingIgnoredDuringExecution:
- labelSelector:
matchLabels:
app.kubernetes.io/name: loki
app.kubernetes.io/instance: loki
app.kubernetes.io/component: backend
topologyKey: kubernetes.io/hostname
nodeAffinity:
requiredDuringSchedulingIgnoredDuringExecution:
nodeSelectorTerms:
- matchExpressions:
- key: noderole.dplplatform
operator: In
values:
- system
loki:
auth_enabled: false
Expand Down Expand Up @@ -60,13 +80,74 @@ write:
# Size of persistent disk, make sure to match a azure disk size or you will
# just provision a larger disk capped to a smaller size.
size: 16Gi
tolerations:
- key: CriticalAddonsOnly
operator: Exists
affinity: |
podAntiAffinity:
requiredDuringSchedulingIgnoredDuringExecution:
- labelSelector:
matchLabels:
app.kubernetes.io/name: loki
app.kubernetes.io/instance: loki
app.kubernetes.io/component: write
topologyKey: kubernetes.io/hostname
nodeAffinity:
requiredDuringSchedulingIgnoredDuringExecution:
nodeSelectorTerms:
- matchExpressions:
- key: noderole.dplplatform
operator: In
values:
- system
read:
replicas: 2
persistence:
# Size of persistent disk, make sure to match a azure disk size or you will
# just provision a larger disk capped to a smaller size.
size: 16Gi
tolerations:
- key: CriticalAddonsOnly
operator: Exists
affinity: |
podAntiAffinity:
requiredDuringSchedulingIgnoredDuringExecution:
- labelSelector:
matchLabels:
app.kubernetes.io/name: loki
app.kubernetes.io/instance: loki
app.kubernetes.io/component: read
topologyKey: kubernetes.io/hostname
nodeAffinity:
requiredDuringSchedulingIgnoredDuringExecution:
nodeSelectorTerms:
- matchExpressions:
- key: noderole.dplplatform
operator: In
values:
- system
gateway:
tolerations:
- key: CriticalAddonsOnly
operator: Exists
affinity: |
podAntiAffinity:
requiredDuringSchedulingIgnoredDuringExecution:
- labelSelector:
matchLabels:
app.kubernetes.io/name: loki
app.kubernetes.io/instance: loki
app.kubernetes.io/component: gateway
topologyKey: kubernetes.io/hostname
nodeAffinity:
requiredDuringSchedulingIgnoredDuringExecution:
nodeSelectorTerms:
- matchExpressions:
- key: noderole.dplplatform
operator: In
values:
- system
monitoring:
lokiCanary:
Expand All @@ -75,3 +156,26 @@ monitoring:
operator: Exists
- key: noderole.dplplatform
operator: Exists
selfMonitoring:
grafanaAgent:
tolerations:
- key: CriticalAddonsOnly
operator: Exists
# grafana operator agent does not support affinity in this version of the chart - should be fixed later
# affinity: |
# podAntiAffinity:
# requiredDuringSchedulingIgnoredDuringExecution:
# - labelSelector:
# matchLabels:
# app.kubernetes.io/name: loki
# app.kubernetes.io/instance: loki
# app.kubernetes.io/component: write
# topologyKey: kubernetes.io/hostname
# nodeAffinity:
# requiredDuringSchedulingIgnoredDuringExecution:
# nodeSelectorTerms:
# - matchExpressions:
# - key: noderole.dplplatform
# operator: In
# values:
# - system

0 comments on commit 93833d5

Please sign in to comment.