Open jenia opened 1 year ago
I guess this is the chart you're using. If so, you can override default affinity for write component here, by simply passing an empty object:
write:
...
affinity: {}
and it should work (you'll probably need to override it everywhere it's used),
Did work? for me, using grafana/loki 6.18.0 it did not. I tried with affinity: {}
affinity: null
affinity:
podAntiAffinity:
preferredDuringSchedulingIgnoredDuringExecution:
- labelSelector:
matchLabels:
app.kubernetes.io/component: write
topologyKey: kubernetes.io/hostname
For first two cases I got the default value as if nothing happened. For the last I got both values merged:
spec:
affinity:
podAntiAffinity:
preferredDuringSchedulingIgnoredDuringExecution:
- labelSelector:
matchLabels:
app.kubernetes.io/component: write
topologyKey: kubernetes.io/hostname
requiredDuringSchedulingIgnoredDuringExecution:
- labelSelector:
matchLabels:
app.kubernetes.io/component: write
topologyKey: kubernetes.io/hostname
It seems it does a merge of the values, not an override as expected. So for now I just declared the same affinity but with a bogus component "nonexistent": affinity: podAntiAffinity: requiredDuringSchedulingIgnoredDuringExecution:
This seems silly though. If someone finds a more elegant solution, it would be nice.
Hello.
I'm installing Loki to Kubernetes. I'm using minikube on my PC right now :blush: and Loki fails to starts because 2/3 of the loki-write pods have affinity errors:
How do I specify to the this affinity rule for all loki pods:
P.S. I know I can use monolith Loki but the problem is that it doesn't support minio but only the filesystem as storage. So if possible, I'd like to use the scalable Loki with minio but run it all on one node.