Architecture Of Konflux

58. MintMaker log persistence

# Status

Implementable

# Context and Problem Statement

As part of the UI functionality, we want to serve MintMaker logs to the users. This will enable them to check how the runs went.

This ADR regards the persisting of the log files and the permission scheme we will use to serve them to the UI and to the users.

# Considered Options

# Pros and Cons of the Options

Before we get into the options themselves, it’s worth mentioning that we envision all of them using Kubearchive, to persist the log files while not overloading cluster’s etcd.

# Extra SAR verification step

In this solution we leave the log files in MintMaker’s namespace, and perform an extra SAR check to verify if a certain user has access in a certain component namespace.

This extra step could be either in Konflux UI’s side, before sending the request for the log file to MintMaker’s backend, or in MintMaker’s backend side, after receiving that request.

# CRD for log files + copying to component namespace

In this solution, once MintMaker’s pipelineruns are finished, we copy their log files to the corresponding component namespace.

After this, standard RBAC rules will take care of the permissions as usual. We could also create a CRD for MintMaker log files, to increase granularity in the access control.

# Running pipelineruns in user namespaces

# Giving read-access to MintMaker pipelineruns and logs across all the cluster

# Decision Outcome

Chosen option: “give read-access across all the cluster”, because it is the option that is actionable and is the least likely to result in throw-away work, with the understanding that the preferred long-term solution is to run MM pipelines in user namespaces.

# Consequences