I want to create a helm chart for my users who wants to deploy there own logging stack in my PaaS, my api is pretty much exactly the same as openshift api, but i don't know how a user can deploy fluentd in there project and get all the logs of all the pods inside of that project.
To get the logs of all the pods inside a project, one could use a bash script:
#!/usr/bin/env bash
for p in $(oc get pods -n $1 | cut -f 1 -d ' ' | tail -n +2); do
oc logs $p
done
pods-all-ns.sh
./pods-all-ns.sh default
To get all the logs of all the pods of a deployment, one could a label selector oc logs -l service=logevents