grafana / helm-charts

Apache License 2.0
1.67k stars 2.28k forks source link

Promtail permission issue in Openshift #3372

Open Iyappanj opened 1 month ago

Iyappanj commented 1 month ago

I am trying to deploy loki-stack using helm in Openshift platform. I do see the below error

level=warn ts=2024-10-22T09:14:21.943245192Z caller=logging.go:123 msg="GET /ready (500) 76.422µs Response: \"Not ready: Unable to find any logs to tail. Please verify permissions, volumes, scrape_config, etc.\n\" ws: false; Accept: /; Connection: close; User-Agent: kube-probe/1.27; " level=error ts=2024-10-22T09:14:23.647414005Z caller=positions.go:179 msg="error writing positions file" error="open /run/promtail/.positions.yaml968875795508461302: permission denied"

I tried the below things to fix the issue:

  1. Changing Pods security context
  2. Changing the mount to /tmp/promtail instead of /run promtail
  3. Running a init container to provide permission for /run/promtail

none of the above could solve the issue. Any help would be appreciated.