I am creating a production environment with loki-distributed and I want to keep our logs for about a year(for analysis purposes). However, since this will use a lot of storage I want to use some kind of different retention policies for some pods, apps, or namespaces.
You can refer to our documentation page on retention: Retention | Grafana Loki documentation
You can have different retention policies configured to keep certain streams (unique combinations of labels) around longer than others.