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: Added support to expose ArgoCD instance URL #20327

Open
wants to merge 9 commits into
base: master
Choose a base branch
from

Conversation

rahulbollisetty
Copy link

@rahulbollisetty rahulbollisetty commented Oct 10, 2024

FIXES #19547
This PR adds the support for exposing the info about the argocd instance in the clusters/namespaces it manages, by adding a annotation to each resource manifests when URL is configure in argocd-cm.

Checklist:

  • Either (a) I've created an enhancement proposal and discussed it with the community, (b) this is a bug fix, or (c) this does not need to be in the release notes.
  • The title of the PR states what changed and the related issues number (used for the release note).
  • The title of the PR conforms to the Toolchain Guide
  • I've included "Closes [ISSUE #]" or "Fixes [ISSUE #]" in the description to automatically close the associated issue.
  • I've updated both the CLI and UI to expose my feature, or I plan to submit a second PR with them.
  • Does this PR require documentation updates?
  • I've updated documentation as required by this PR.
  • I have signed off all my commits as required by DCO
  • I have written unit and/or e2e tests for my change. PRs without these are unlikely to be merged.
  • My build is green (troubleshooting builds).
  • My new feature complies with the feature status guidelines.
  • I have added a brief description of why this PR is necessary and/or what this PR solves.
  • Optional. My organization is added to USERS.md.
  • Optional. For bug fixes, I've indicated what older releases this fix should be cherry-picked into (this may or may not happen depending on risk/complexity).

Copy link

bunnyshell bot commented Oct 10, 2024

🔴 Preview Environment stopped on Bunnyshell

See: Environment Details | Pipeline Logs

Available commands (reply to this comment):

  • 🔵 /bns:start to start the environment
  • 🚀 /bns:deploy to redeploy the environment
  • /bns:delete to remove the environment

Signed-off-by: B Rahul <rahul20bollisetty@gmail.com>
Signed-off-by: B Rahul <rahul20bollisetty@gmail.com>
@rahulbollisetty rahulbollisetty marked this pull request as ready for review October 10, 2024 12:36
@rahulbollisetty rahulbollisetty requested review from a team as code owners October 10, 2024 12:36
Copy link

codecov bot commented Oct 10, 2024

Codecov Report

Attention: Patch coverage is 76.00000% with 6 lines in your changes missing coverage. Please review.

Please upload report for BASE (master@ed4c0ee). Learn more about missing BASE report.

Files with missing lines Patch % Lines
util/argo/resource_tracking.go 71.42% 2 Missing and 2 partials ⚠️
cmd/argocd/commands/app.go 0.00% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff            @@
##             master   #20327   +/-   ##
=========================================
  Coverage          ?   56.07%           
=========================================
  Files             ?      322           
  Lines             ?    44826           
  Branches          ?        0           
=========================================
  Hits              ?    25135           
  Misses            ?    17083           
  Partials          ?     2608           

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

Signed-off-by: B Rahul <rahul20bollisetty@gmail.com>
Signed-off-by: B Rahul <rahul20bollisetty@gmail.com>
Copy link
Member

@reggie-k reggie-k left a comment

Choose a reason for hiding this comment

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

I wonder whether we can make use of the AnnotationInstallationID introduced here:
#20222
It seems to tackle a slightly different but similar scenario of being able to know what instance of the multiple ArgoCDs in the cluster manages the resource.
Can this eliminate the need to specify the ArgoCD instance URL explicitly by the user?

@rahulbollisetty
Copy link
Author

rahulbollisetty commented Oct 14, 2024

I wonder whether we can make use of the AnnotationInstallationID introduced here: #20222 It seems to tackle a slightly different but similar scenario of being able to know what instance of the multiple ArgoCDs in the cluster manages the resource. Can this eliminate the need to specify the ArgoCD instance URL explicitly by the user?

Well that's a good addition for tracking the resources, but let's say you have multiple ArgoCD (~ 100 instance) instance, and you have access to a cluster, now you want to figure out which ArgoCD instance is managing a resource by looking at the manifest of the resource, it would be really difficult and not user-friendly to find out by just the AnnotationInstallationID, because you do not have a centralized storing mechanism which maps the AnnotationInstallationID: uuid to the ArgoCD instance URL. The PR #20222 helps in differentiating the instances. Keeping a URL annotation would be helpful as well, in my opinion.

@reggie-k
Copy link
Member

reggie-k commented Oct 15, 2024

Yeah, that makes sense to me, this PR is definitely a valuable addition, thank you for the implementation and for the explanation!

I wonder whether there is an alternative to the user having to specify the URL explicitly? Like maybe some auto-calculation based on url in ArgoCD config (if url exists, as it is not mandatory) or something else?

@rahulbollisetty
Copy link
Author

Yeah, that makes sense to me, this PR is definitely a valuable addition, thank you for the implementation and for the explanation!

I wonder whether there is an alternative to the user having to specify the URL explicitly? Like maybe some auto-calculation based on url in ArgoCD config (if url exists, as it is not mandatory) or something else?

Getting the URL for an ArgoCD instance automatically is tricky because it depends on where and how it's deployed—locally or on a cloud platform like AWS EKS, GKE, or Azure AKS. For cloud deployments, you often need to manually find the LoadBalancer IP. Since there's no built-in way for ArgoCD to automatically grab the URL, you usually have to set it up manually based on your specific setup.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Expose info about the argocd instance in the clusters/namespaces it manages
2 participants