-
Notifications
You must be signed in to change notification settings - Fork 153
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
feat(api): make PromotionTemplate dedicated resource #3022
Conversation
✅ Deploy Preview for docs-kargo-io ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #3022 +/- ##
==========================================
+ Coverage 51.07% 51.11% +0.04%
==========================================
Files 283 284 +1
Lines 25382 25474 +92
==========================================
+ Hits 12963 13022 +59
- Misses 11720 11751 +31
- Partials 699 701 +2 ☔ View full report in Codecov by Sentry. |
98480c5
to
2934704
Compare
Signed-off-by: Hidde Beydals <[email protected]>
Signed-off-by: Hidde Beydals <[email protected]>
Signed-off-by: Hidde Beydals <[email protected]>
Signed-off-by: Hidde Beydals <[email protected]>
Signed-off-by: Hidde Beydals <[email protected]>
Signed-off-by: Hidde Beydals <[email protected]>
Signed-off-by: Hidde Beydals <[email protected]>
Signed-off-by: Hidde Beydals <[email protected]>
Signed-off-by: Hidde Beydals <[email protected]>
Signed-off-by: Hidde Beydals <[email protected]>
Signed-off-by: Hidde Beydals <[email protected]>
Signed-off-by: Hidde Beydals <[email protected]>
Signed-off-by: Hidde Beydals <[email protected]>
2934704
to
56368c3
Compare
Instead of a single ref, I think we should support chaining together multiple, so they can be composed apiVersion: kargo.akuity.io/v1alpha1
kind: Stage
metadata:
name: staging
namespace: guestbook
spec:
steps:
- templateRef:
name: precheck-stuff
- templateRef:
name: gitops-stuff
- uses: http
config:
url: http://foo.com/
- templateRef:
name: notification-stuff |
Safe to close, knowing #3121 is the new direction? |
Fixes: #2827
This makes the
PromotionTemplate
a namespaced resource and allows it to be referenced in a Stage in addition to being embedded. By doing this, and in combination with the support for variables introduced in Kargo 1.1.x, promotions that are the same across Stages can now avoid duplication.For example:
Note: While working on this, I could think of two future improvements people may desire:
if
on a step to only execute ifctx.stage == "dev"
. This would allow a PromotionTemplate to be used for a wider set of Stages and could further avoid duplication and/or a desire to do "compositions" as is being opted in [Feature Idea/Suggestion] promotionTemplates as a CRD of its own? #2827.