-
Notifications
You must be signed in to change notification settings - Fork 4k
Singlebinary mode is not handled in -ingress networkpolicy #19199
Description
Describe the bug
When deploying loki in single-binary mode, the -ingress networkpolicy does not match the loki pods as it only matches app.kubernetes.io write and read, but not single-binary.
This prevents traffic from alloy to the loki pods as though the networkingpolicy matches the alloy namespace and pods, it does not match the target loki pods correctly.
Tested using chart versioin helm-loki 6.30.1.
To Reproduce
Steps to reproduce the behavior:
- Deploy loki in single-binary mode without gateway enabled (using
loki.name=testlokifor example) - kubectl get -n loki networkpolicy -o yaml testloki-ingress
- You get a
matchExpressionwith the only member in the array being:
key: app.kubernetes.io/component
operator: In
values:
- read
- writeExpected behavior
You'll get instead (or also) the value single-binary.
Environment:
- Infrastructure: kubernetes
- Deployment tool: helm
Screenshots, Promtail config, or terminal output
We are using this helmfile to deploy it:
https://gitlab.wikimedia.org/repos/cloud/toolforge/toolforge-deploy/-/blob/main/components/logging/helmfile.yaml?ref_type=heads
The one having the issues is the local environment, https://gitlab.wikimedia.org/repos/cloud/toolforge/toolforge-deploy/-/blob/main/components/logging/values/loki/local.yaml?ref_type=heads