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

feat: (cluster) Promotion tasks #3121

Draft
wants to merge 20 commits into
base: main
Choose a base branch
from
Draft

Conversation

hiddeco
Copy link
Contributor

@hiddeco hiddeco commented Dec 11, 2024

This is very much a work in progress, and will supersede #3022.

Copy link

netlify bot commented Dec 11, 2024

Deploy Preview for docs-kargo-io ready!

Name Link
🔨 Latest commit 63db956
🔍 Latest deploy log https://app.netlify.com/sites/docs-kargo-io/deploys/67608f183d05cd00084ddffe
😎 Deploy Preview https://deploy-preview-3121.docs.kargo.io
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@hiddeco hiddeco added this to the v1.2.0 milestone Dec 11, 2024
@hiddeco hiddeco self-assigned this Dec 11, 2024
Copy link

codecov bot commented Dec 11, 2024

Codecov Report

Attention: Patch coverage is 85.45455% with 32 lines in your changes missing coverage. Please review.

Project coverage is 51.49%. Comparing base (29b5f5a) to head (63db956).

Files with missing lines Patch % Lines
internal/directives/output_composer.go 33.33% 16 Missing ⚠️
api/v1alpha1/promotion_types.go 0.00% 8 Missing ⚠️
internal/directives/promotions.go 63.63% 3 Missing and 1 partial ⚠️
internal/kargo/promotion_builder.go 97.95% 2 Missing and 1 partial ⚠️
internal/controller/promotions/promotions.go 0.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #3121      +/-   ##
==========================================
+ Coverage   51.26%   51.49%   +0.23%     
==========================================
  Files         283      285       +2     
  Lines       25563    25734     +171     
==========================================
+ Hits        13104    13251     +147     
- Misses      11762    11786      +24     
  Partials      697      697              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Signed-off-by: Hidde Beydals <[email protected]>
Signed-off-by: Hidde Beydals <[email protected]>
Signed-off-by: Hidde Beydals <[email protected]>
- `PromotionTemplate` steps can contain either a reference to `uses` OR
  to a `task`.
- `PromotionTask` steps can not contain a reference to another `task`,
  but must contain a `uses` reference.
- `Promotion` steps can not contain a reference to a `task` (as we
  expect a `Promotion` to contain deflated tasks), but must contain
  a `uses` reference.
- Small other tweaks, to e.g. ensure we limit the max lenght of fields
  that contain name references to Kubernetes objects.

Signed-off-by: Hidde Beydals <[email protected]>
Signed-off-by: Hidde Beydals <[email protected]>
This includes validation rules to ensure a `PromotionTask` step can
not have `inputs` defined, but `Promotion` and `PromotionTemplate`
steps can (unless they reference a `task` themselves).

Signed-off-by: Hidde Beydals <[email protected]>
Signed-off-by: Hidde Beydals <[email protected]>
Signed-off-by: Hidde Beydals <[email protected]>
The builder is capable of inflating steps from a (Cluster)PromotionTask
into the Promotion it constructs.

To support this, a helper method has been added to the `PromotionStep`
in the (public) API to generate an alias for the step if none is
configured.

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]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant