Skip to content

Commit 23a2f10

Browse files
mowiesthisthat
andauthored
KEP 98: Promotion Phase for GitOps use cases (#107)
* add KEP Signed-off-by: Moritz Wiesinger <[email protected]> * Update text/0098-promotion-phase.md Co-authored-by: Giovanni Liva <[email protected]> Signed-off-by: Moritz Wiesinger <[email protected]> * add open question about failure state Signed-off-by: Moritz Wiesinger <[email protected]> * review Signed-off-by: Moritz Wiesinger <[email protected]> --------- Signed-off-by: Moritz Wiesinger <[email protected]> Co-authored-by: Giovanni Liva <[email protected]>
1 parent ddbcd5e commit 23a2f10

File tree

1 file changed

+47
-0
lines changed

1 file changed

+47
-0
lines changed

text/0098-promotion-phase.md

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
# Promotion Phase for GitOps use cases
2+
3+
Add a new lifecycle phase after post deployment dedicated to GitOps promotion tasks.
4+
5+
**State: DRAFTING**
6+
7+
## Motivation
8+
9+
By introducing a dedicated stage after the post Application deployment phase for promotion tasks, we will
10+
enable users to automatically promote their apps into another stage/cluster/environment.
11+
This will make it much clearer for Keptn users how to set up their GitOps-assisted workflows in multi-stage
12+
environments.
13+
14+
## Explanation
15+
16+
The new promotion phase can be used by adding a list of references to `KeptnTaskDefinition` resources to a new field
17+
called `promotionTasks` inside the `KeptnAppContext` CRD. Keptn will use this list the same way as for other phases
18+
like post-deployment and execute the referenced tasks in parallel using Kubernetes Job resources.
19+
20+
## Trade-offs and mitigations
21+
22+
No real drawbacks come to mind, except some slight slowdown in progression of the lifecycle since the new phase
23+
needs to be executed and the lifecycle-operator needs to check if any tasks need to be run.
24+
25+
## Breaking changes
26+
27+
This KEP would not have any breaking changes. The `KeptnAppContext` CRD would get an additional field called
28+
`PromotionTasks` which contains a list of references to `KeptnTaskDefintion` resources that should be executed in this
29+
phase.
30+
31+
## Prior art and alternatives
32+
33+
The alternative to this KEP is that users re-purpose the post-deployment phase for promotion, which would limit
34+
flexibility since users lose the option to not promote when post-deployment tasks fail.
35+
36+
## Open questions
37+
38+
One open point is how the new phase influences the failure or passing state of the overall deployment of a user's
39+
application.
40+
What happens when everything passes, but a promotion task fails?
41+
My suggestion would be to let users configure this through some settings. Similar to the non-blocking behaviour
42+
suggested in [#1934](https://github.com/keptn/lifecycle-toolkit/issues/1934), users could then decide
43+
if a failing promotion task should fail the overall deployment.
44+
45+
## Future possibilities
46+
47+
For now, none.

0 commit comments

Comments
 (0)