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

docs: authorizing kargo stages to modify argo apps #2921

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

fykaa
Copy link
Contributor

@fykaa fykaa commented Nov 13, 2024

closes #2440

I have made the documentation placement for the kargo.akuity.io/authorized-stage annotation in "Managing User Permissions" section because imo it is a key component in managing permissions between Kargo and Argo CD.

While I also considered options like a dedicated annotation reference guide or including it in key concepts, I believe current placement is most relevant. Please let me know if this location works or if there's an alternative section recommended.

@fykaa fykaa self-assigned this Nov 13, 2024
@fykaa fykaa requested review from a team as code owners November 13, 2024 12:03
Copy link

netlify bot commented Nov 13, 2024

Deploy Preview for docs-kargo-io ready!

Name Link
🔨 Latest commit ce15e55
🔍 Latest deploy log https://app.netlify.com/sites/docs-kargo-io/deploys/673c1a5d2c31cf000868e455
😎 Deploy Preview https://deploy-preview-2921.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.

Copy link

codecov bot commented Nov 13, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 50.92%. Comparing base (c0d47e0) to head (ce15e55).
Report is 14 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2921      +/-   ##
==========================================
+ Coverage   49.92%   50.92%   +1.00%     
==========================================
  Files         275      279       +4     
  Lines       24668    25180     +512     
==========================================
+ Hits        12315    12823     +508     
+ Misses      11676    11666      -10     
- Partials      677      691      +14     

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


🚨 Try these New Features:

@krancour
Copy link
Member

I have made the documentation placement for the kargo.akuity.io/authorized-stage annotation in "Managing User Permissions" section because imo it is a key component in managing permissions between Kargo and Argo CD.

I'm not sure I agree with this. It has nothing to do with user permissions.

We probably need to carve out a whole separate page for "Argo CD Integration". It can be very light on content for now with a notice that the page is under construction and the real content can, for now, be limited to what you're adding here.

Signed-off-by: Faeka Ansari <faeka6@gmail.com>
@fykaa fykaa force-pushed the docs/add-authorized-stage-annotation branch from 4f203d7 to e0a6a70 Compare November 15, 2024 19:43
@@ -0,0 +1,49 @@
---
description: Learn how to set up Argo CD to work with Kargo-managed projects.
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
description: Learn how to set up Argo CD to work with Kargo-managed projects.
description: Learn how to integrate Kargo Stages with Argo CD Applications.

annotations:
kargo.akuity.io/authorized-stage: kargo-demo:{{stage}}
spec:
# Application Specifications
Copy link
Member

Choose a reason for hiding this comment

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

As an ApplicationSet, the example asks the reader to understand more about Argo CD than is actually necessary for you to get your point across. The example would be more accessible as an Application.


# Argo CD Integration

Kargo integrates seamlessly with Argo CD to facilitate a more streamlined application lifecycle management process. While Argo CD helps with deploying Kubernetes objects and synchronizing changes in the cluster, Kargo focuses on orchestrating the promotion of these changes through various `Stage`s of development, such as from `development` to `testing` and then to `production`.
Copy link
Member

Choose a reason for hiding this comment

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

It totally makes sense to say a bit here about Kargo's relationship to Argo CD.

I might reword this a bit for clarity. I'll come back to it.

Comment on lines 17 to 27
To enable Kargo `Stage`s to interact with and modify Argo CD applications, applications need to explicitly authorize Kargo to perform these actions. This is accomplished using the `kargo.akuity.io/authorized-stage` annotation.

Kargo requires the annotation in the following format:

```yaml
kargo.akuity.io/authorized-stage: "<project-name>:<stage-name>"
```

This annotation signifies consent for Kargo to manage the application on behalf of the designated `Project` and `Stage`.

In the following example, the `ApplicationSet` manifest is configured to allow Kargo management by dynamically setting the `kargo.akuity.io/authorized-stage: kargo-demo:{{stage}}` annotation for each `Stage` (`test`, `uat`, `prod`) to ensure that each `Stage` in the `kargo-demo` `Project` is authorized to modify its respective Argo CD Application:
Copy link
Member

Choose a reason for hiding this comment

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

It occurs to me now that this information probably needs to be surfaced here as this is where the information is most relevant. I failed to notice prior to my suggestion of making a whole separate page for Argo CD integration.

https://main.docs.kargo.io/references/promotion-steps#argocd-update

I wouldn't scrap this PR however. I think we should continue to expand on this topic because there's a lot to say about it.

If you open a separate PR for incorporating this information into the step documentation, that can easily be merged sooner than this new page.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

opened #2962

Signed-off-by: Faeka Ansari <faeka6@gmail.com>
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.

docs: need to document the kargo.akuity.io/authorized-stage annotation
2 participants