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: promotion directives foundation #2536

Merged
merged 26 commits into from
Sep 16, 2024
Merged

Conversation

hiddeco
Copy link
Contributor

@hiddeco hiddeco commented Sep 16, 2024

This adds the low-level code for Promotion directives as described in #2219. It does not include the wiring of the Promotion directives engine into any controller and/or reconciler, nor does it contain changes to Kargo's declarative API.

It does contain:

  • A primitive engine to run directive steps
  • A set of "Promotion directives"
    • copy
    • helm-update-image
    • helm-update-chart
    • helm-template
    • kustomize-set-image
    • kustomize-build
  • Not fully implemented:
    • git-checkout
    • git-commit
    • git-push

hiddeco and others added 26 commits September 16, 2024 17:10
Signed-off-by: Hidde Beydals <hidde@hhh.computer>
Signed-off-by: Hidde Beydals <hidde@hhh.computer>
Signed-off-by: Hidde Beydals <hidde@hhh.computer>
Signed-off-by: Kent Rancourt <kent.rancourt@gmail.com>
Signed-off-by: Kent Rancourt <kent.rancourt@gmail.com>
…privileges

Signed-off-by: Kent Rancourt <kent.rancourt@gmail.com>
…f a dir

Signed-off-by: Kent Rancourt <kent.rancourt@gmail.com>
Signed-off-by: Hidde Beydals <hidde@hhh.computer>
Signed-off-by: Kent Rancourt <kent.rancourt@gmail.com>
With an eye on more status types getting introduced later. It is of
importance to maintain control over what `Result` is being returned,
instead of marking everything as a `Failure` on any error.

Signed-off-by: Hidde Beydals <hidde@hhh.computer>
Signed-off-by: Hidde Beydals <hidde@hhh.computer>
Signed-off-by: Hidde Beydals <hidde@hhh.computer>
Signed-off-by: Hidde Beydals <hidde@hhh.computer>
Signed-off-by: Hidde Beydals <hidde@hhh.computer>
Signed-off-by: Hidde Beydals <hidde@hhh.computer>
Signed-off-by: Hidde Beydals <hidde@hhh.computer>
Signed-off-by: Hidde Beydals <hidde@hhh.computer>
Signed-off-by: Hidde Beydals <hidde@hhh.computer>
Signed-off-by: Hidde Beydals <hidde@hhh.computer>
Signed-off-by: Hidde Beydals <hidde@hhh.computer>
Signed-off-by: Hidde Beydals <hidde@hhh.computer>
Signed-off-by: Hidde Beydals <hidde@hhh.computer>
This includes some tiny changes to existing Helm directive configs.
In the hope it would solve the issue of the origin suddenly being
generated as `ChartFromOrigin`, which (sadly) did not resolve the
issue.

Signed-off-by: Hidde Beydals <hidde@hhh.computer>
Signed-off-by: Hidde Beydals <hidde@hhh.computer>
Signed-off-by: Hidde Beydals <hidde@hhh.computer>
Signed-off-by: Hidde Beydals <hidde@hhh.computer>
@hiddeco hiddeco requested a review from a team as a code owner September 16, 2024 15:13
Copy link

netlify bot commented Sep 16, 2024

Deploy Preview for docs-kargo-akuity-io ready!

Name Link
🔨 Latest commit 41b3181
🔍 Latest deploy log https://app.netlify.com/sites/docs-kargo-akuity-io/deploys/66e84b2839dd9c0008cd7186
😎 Deploy Preview https://deploy-preview-2536.kargo.akuity.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.

Copy link

codecov bot commented Sep 16, 2024

Codecov Report

Attention: Patch coverage is 77.88066% with 215 lines in your changes missing coverage. Please review.

Project coverage is 49.74%. Comparing base (7a07a29) to head (41b3181).
Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
...ternal/directives/kustomize_set_image_directive.go 73.18% 34 Missing and 14 partials ⚠️
internal/directives/helm_update_chart_directive.go 79.39% 29 Missing and 12 partials ⚠️
internal/directives/helm_template_directive.go 76.74% 16 Missing and 4 partials ⚠️
internal/directives/kustomize_build_directive.go 54.54% 14 Missing and 6 partials ⚠️
internal/directives/helm_update_image_directive.go 83.33% 14 Missing and 2 partials ⚠️
internal/helm/registry.go 0.00% 14 Missing ⚠️
internal/directives/copy_directive.go 70.73% 10 Missing and 2 partials ⚠️
internal/directives/engine.go 73.68% 5 Missing and 5 partials ⚠️
internal/yaml/update.go 90.00% 6 Missing and 3 partials ⚠️
internal/directives/directive.go 72.72% 3 Missing and 3 partials ⚠️
... and 8 more
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2536      +/-   ##
==========================================
+ Coverage   48.26%   49.74%   +1.48%     
==========================================
  Files         255      272      +17     
  Lines       18141    19078     +937     
==========================================
+ Hits         8755     9490     +735     
- Misses       8897     9044     +147     
- Partials      489      544      +55     

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

Copy link
Member

@krancour krancour left a comment

Choose a reason for hiding this comment

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

@hiddeco and I have closely collaborated on what is in hiddeco:promotion-directives, so this is a token LGTM.

@krancour krancour added this to the v0.9.0 milestone Sep 16, 2024
@hiddeco hiddeco added this pull request to the merge queue Sep 16, 2024
Merged via the queue into akuity:main with commit a03e949 Sep 16, 2024
24 checks passed
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.

2 participants