Accepted
As part of Weave GitOps Enterprise, Sunglow is working on delivering Continuous Delivery Pipelines where the current iteration is to enable manual promotions, which requires keeping track of the approval state.
This ADR records the decision on which solution to explore around this problem.
There are different alternatives to maintain the state. Some of them were explored in the discovery:
- to hold state in the Pipeline CR status as Flagger does
- to hold state in a database as Spinnaker or Keptn does
- to hold state in another CR as Tekton does between Pipeline and PipelineRuns
- to use a Configmap
- to use Pipeline CR metadata / annotations
The direction is to explore Pipeline CR status as an alternative because it is the most straightforward, natural next step given the current understanding of the solution space.
The rest alternatives are de-prioritized due to the following reasons:
- Configmap, Pipeline CR metadata are considered a variation of the same use case as Pipeline CR status but with more limitations like external resource (configmap) or less structured data (annotations).
- An external database was discarded at this stage for the operational overhead to maintain it without clear need at this stage.
- Another CR is discarded due to the need for maintenance costs while not yet having a clear use case.
We might be limited by how we can structure the data and query, but as of now, we do not need anything complex. On the other hand, it should be straightforward to implement without adding any external dependency.
It has been envisioned that for complex scenarios an evolution from CR status to other more sophisticated solution might be required. At this stage, we cannot envision major future risks doing so. This decision should be reviewed then.