Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pipeline promotions designs #76

Merged
merged 53 commits into from
Oct 28, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
53 commits
Select commit Hold shift + click to select a range
bb0dc4a
adding adr for change detection
enekofb Sep 26, 2022
fb57569
adding adr
enekofb Sep 26, 2022
126df4d
consequences added
enekofb Sep 26, 2022
5ec346c
slicing promotion designs
enekofb Oct 5, 2022
f28fc7b
updated ADR
enekofb Oct 5, 2022
9e41851
updated notification change rfc
enekofb Oct 5, 2022
49860d3
detect deployment changes
enekofb Oct 5, 2022
0a6a5e7
added ADR for promotions solution
enekofb Oct 5, 2022
7c70e6b
unified promotions rfcs into one
enekofb Oct 6, 2022
e2b44a5
rfc promotions completed
enekofb Oct 6, 2022
ad93f0a
section on nfrs
enekofb Oct 6, 2022
d4165b1
RFC and ADR ready for draft
enekofb Oct 6, 2022
ee90b89
adr updated
enekofb Oct 7, 2022
21a4bab
promotions rfc reviewed
enekofb Oct 7, 2022
0ff3a15
change detection rfc updated
enekofb Oct 7, 2022
261354f
completing arguments for pipeline controller
enekofb Oct 10, 2022
104f79f
wording reviewed
enekofb Oct 10, 2022
4d43115
updated ADR justification
enekofb Oct 10, 2022
d532d57
wording from PR review
enekofb Oct 10, 2022
f59cc58
Fix typos
yiannistri Oct 10, 2022
faa409d
Fix typos
yiannistri Oct 10, 2022
50353c8
update ADR - typos + more context
Oct 10, 2022
d7750fb
typos
Oct 10, 2022
bb8d0a0
removed the part of the motivation that doesnt talk on problem state…
enekofb Oct 11, 2022
d5940d9
updated the token section to reflect the supported scenario
enekofb Oct 11, 2022
d53e62f
added cons for api layer
enekofb Oct 11, 2022
472ea7a
Merge remote-tracking branch 'origin/promotions-comparison' into prom…
enekofb Oct 11, 2022
dbbcd59
a bit more wordings around last alertnative
enekofb Oct 11, 2022
c3c0963
Small tweaks
yiannistri Oct 11, 2022
10fe75b
rfc split in: overview doc + deeper detail doc by stage in the path
enekofb Oct 12, 2022
84c130f
execute promotion document reviewed
enekofb Oct 12, 2022
3c8807d
detect deployment changes refactored
enekofb Oct 13, 2022
a43bc5f
reviewed promotion needs section / document
enekofb Oct 13, 2022
2227e0f
execute promotions
enekofb Oct 13, 2022
8431f05
pr suggestions applied (mostly)
enekofb Oct 13, 2022
a5ba247
Merge remote-tracking branch 'origin/promotions-comparison' into prom…
enekofb Oct 13, 2022
a6897c7
started with scenarios
enekofb Oct 13, 2022
34e6762
scenarios covered
enekofb Oct 13, 2022
d24e001
scenarios reviewed
enekofb Oct 13, 2022
234a61d
some more definitions
enekofb Oct 13, 2022
a87a2c6
hmac security updated
enekofb Oct 14, 2022
712b4ae
updated reliability section
enekofb Oct 14, 2022
4f651ba
strategies reviewed
enekofb Oct 14, 2022
c2756e4
added modularity reason
enekofb Oct 24, 2022
79f4bfd
Update docs/rfcs/0003-pipelines-promotion/execute-promotion.md
enekofb Oct 25, 2022
d5bc894
Update docs/rfcs/0003-pipelines-promotion/detect-deployment-changes.md
enekofb Oct 25, 2022
2623f38
changed comment
enekofb Oct 25, 2022
cdc7f87
Update docs/rfcs/0003-pipelines-promotion/README.md
enekofb Oct 26, 2022
5d56f99
Update docs/rfcs/0003-pipelines-promotion/README.md
enekofb Oct 26, 2022
cf766ab
Update docs/rfcs/0003-pipelines-promotion/README.md
enekofb Oct 26, 2022
42aba60
Update docs/rfcs/0003-pipelines-promotion/README.md
enekofb Oct 26, 2022
8a2b403
pr comments
enekofb Oct 26, 2022
f46679a
changed status to merge
enekofb Oct 28, 2022
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
75 changes: 75 additions & 0 deletions docs/adrs/0013-pipelines-promotions.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
# 13. Pipelines Promotions

## Status

Accepted

## Context
As part of Weave GitOps Enterprise, Sunglow is working on delivering [Continuous Delivery Pipelines](https://www.notion.so/weaveworks/CD-Pipeline-39a6df44798c4b9fbd140f9d0df1212a) where
[first iteration has been delivered](https://docs.gitops.weave.works/docs/next/enterprise/pipelines/intro/index.html)
covering the ability to view an application deployed across different environments.

The [second iteration](https://www.notion.so/weaveworks/Pipeline-promotion-061bb790e2e345cbab09370076ff3258) aims
to enable promotions between environments.

This ADR records a couple of decisions we think are important:

- how the promotion solution looks like end to end.
- how deployment changes are detected.

## Decision

### How the promotion solution looks like end to end

As [discussed in RFC](../rfcs/0003-pipelines-promotion/README.md) four alternatives were discussed:

- weave gitops backend
- pipeline controller
- weave gitops + pipeline controller + promotion executor
- promotions service

The `pipeline controller` solution has been chosen over other alternatives (see alternatives section) due to

- It enables promotions.
- It allows to separations roles, therefore permissions between the components notifying the change and executing the promotion.
- It follows [notification controller pattern](https://fluxcd.io/flux/guides/webhook-receivers/#expose-the-webhook-receiver).
- It is easier to develop over other alternatives.
- It keeps split user-experience and machine-experience apis.
sympatheticmoose marked this conversation as resolved.
Show resolved Hide resolved
- It provides reasonable modularity for the feature.

On the flip side, the solution has the following constraints:

- Need to manage another api surface.
- Non-canonical usage of controllers as its behaviour is driven by ingested event than change in the declared state of a resource.
- We accept this tradeoff as pipeline controller provides us with a balanced approach between tech-debt and easy to start delivering
over other alternatives (like creating another component).

### How deployment changes are detected
Copy link
Contributor

@enekofb enekofb Oct 13, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would consider removing this section to simplify the ADR to just have a decision at the level for the solution.


As [discussed in RFC](../rfcs/0003-pipelines-promotion/detect-deployment-changes.md) each approach has associated unknowns.

The major ones are:

- Webhooks: the need for a new network flow in the product, from leaf cluster to management, and the potential impediments that it would impose for customers while adopting the solution, as well its security management.
- Watching: how reliable the solution could be as not having existing examples of products using it for watching remote clusters.

We envision Weave GitOps will need to offer a flexible solution, and would eventually support both approaches
to accommodate the range of potential enterprise users.

In order to optimise velocity, we are starting with one approach - the `webhooks` solution due to:

- It allows us to provide promotions for WGE customers with suspected better scalability.
- Reinforces the vision of weave gitops being a continuum of Flux by using Flux core components, in this context, [notification
controller](https://fluxcd.io/flux/components/notification/), to provide the basic building blocks around deployment notification.
- Leverages existing, tried-and-tested functionality from Flux to reduce amount of new functionality we need to write.
- Team is taking on responsibilities for Flux primitives, which includes Notification Controller related objects, and therefore presents a good opportunity to improve the UX for working with this capability.

## Consequences

- A path forward for pipelines to deliver promotions capability. Sunglow could deliver promotions based on this approach.
- A set of further actions needs to be risks that needs management:
- To manage the risk associated with the network flow between leaf to management cluster for deployment notifications.
- To determine concrete CI scenarios that we need to integrate with.
- To discover the reliability aspects of the watchers approach to understand its feasibility.


Loading