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(controller)!: queue Stages for Application changes using annotation #2617

Merged
merged 5 commits into from
Oct 1, 2024

Conversation

hiddeco
Copy link
Contributor

@hiddeco hiddeco commented Oct 1, 2024

Fixes #2593

This addresses the above issue by using the kargo.akuity.io/authorized-stage annotation to determine which Stage should be queued for reconciliation when a state transition of the Application occurs.

The support for glob expressions in the annotation had to be removed to facilitate this as we require an absolute reference. However, given what people were trying to do with this (see #2540), not allowing this is presumably better to protect people from making this mistake.

I tested this against all the examples in https://github.com/krancour/kargo-examples/tree/for-v0.9.0 (in bulk), and they all eventually reached a healthy state without requiring manual interference.

Copy link

netlify bot commented Oct 1, 2024

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

Name Link
🔨 Latest commit e117745
🔍 Latest deploy log https://app.netlify.com/sites/docs-kargo-akuity-io/deploys/66fbe78d9106750008492d14
😎 Deploy Preview https://deploy-preview-2617.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 Oct 1, 2024

Codecov Report

Attention: Patch coverage is 40.90909% with 26 lines in your changes missing coverage. Please review.

Project coverage is 50.98%. Comparing base (ae41016) to head (e117745).
Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
internal/controller/stages/watches.go 0.00% 23 Missing ⚠️
internal/controller/stages/stages.go 0.00% 3 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2617      +/-   ##
==========================================
- Coverage   51.04%   50.98%   -0.07%     
==========================================
  Files         282      282              
  Lines       21056    21015      -41     
==========================================
- Hits        10748    10714      -34     
+ Misses       9635     9630       -5     
+ Partials      673      671       -2     

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

Signed-off-by: Hidde Beydals <[email protected]>
Comment on lines -11 to 16
// AnnotationKeyOIDCPrefix is the prefix of an annotation key that can be set on a
// ServiceAccount to associate it with any user authenticated via OIDC and having
// the claim indicated by the full annotation key with any of the values indicated by
// the annotation. The value of the annotation may be either a scalar string value or a
// comma-separated list.
// AnnotationKeyOIDCClaimNamePrefix is the prefix of an annotation key that
// can be set on a ServiceAccount to associate it with any user authenticated
// via OIDC and having the claim indicated by the full annotation key with
// any of the values indicated by the annotation. The value of the annotation
// may be either a scalar string value or a comma-separated list.
AnnotationKeyOIDCClaimNamePrefix = "rbac.kargo.akuity.io/claim."
Copy link
Member

Choose a reason for hiding this comment

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

Thank you for fixing this.

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 hiddeco added this pull request to the merge queue Oct 1, 2024
Merged via the queue into akuity:main with commit 0e79db7 Oct 1, 2024
15 of 17 checks passed
@hiddeco hiddeco deleted the fix-app-event-handler branch October 1, 2024 14:10
github-actions bot pushed a commit that referenced this pull request Oct 1, 2024
…ion (#2617)

Signed-off-by: Hidde Beydals <[email protected]>
(cherry picked from commit 0e79db7)
@akuitybot
Copy link

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.

bug: comparison error in health check
4 participants