Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

feat: allow dynamic loading of ArgoCD URLs from secrets#5521

Open
ksawerykarwacki wants to merge 5 commits into
akuity:mainakuity/kargo:mainfrom
ksawerykarwacki:feature/4971-dynamic-argocd-urlsksawerykarwacki/kargo:feature/4971-dynamic-argocd-urlsCopy head branch name to clipboard
Open

feat: allow dynamic loading of ArgoCD URLs from secrets#5521
ksawerykarwacki wants to merge 5 commits into
akuity:mainakuity/kargo:mainfrom
ksawerykarwacki:feature/4971-dynamic-argocd-urlsksawerykarwacki/kargo:feature/4971-dynamic-argocd-urlsCopy head branch name to clipboard

Conversation

@ksawerykarwacki

Copy link
Copy Markdown
Contributor

Summary

Add support for dynamically loading ArgoCD shard URLs from Kubernetes secrets without requiring Helm chart redeployment.

  • Secrets labeled with kargo.akuity.io/argocd-shard=true in the Kargo namespace are watched and used to configure ArgoCD shard URLs
  • Dynamic shards override static (Helm) configuration with the same name
  • When a secret is deleted, any static configuration is restored
  • Backwards compatible - existing Helm configuration continues to work unchanged

Secret Format

apiVersion: v1
kind: Secret
metadata:
  name: argocd-shard-production
  namespace: kargo
  labels:
    kargo.akuity.io/argocd-shard: "true"
type: Opaque
stringData:
  name: "production"                      # Shard identifier (empty for default)
  url: "https://argocd.example.com"       # ArgoCD base URL

Closes #4971

Signed-off-by: Ksawery Karwacki <ksawery.karwacki@gmail.com>
@ksawerykarwacki
ksawerykarwacki requested a review from a team as a code owner December 19, 2025 14:34
@netlify

netlify Bot commented Dec 19, 2025

Copy link
Copy Markdown

Deploy Preview for docs-kargo-io canceled.

Name Link
🔨 Latest commit e6aae4b
🔍 Latest deploy log https://app.netlify.com/projects/docs-kargo-io/deploys/6a018c628338be00081aac5c

@ksawerykarwacki

Copy link
Copy Markdown
Contributor Author

Any chances that soemone will look at this? @krancour, @hiddeco?

This is small change but lack of it is rather frustrating in the sharded deployement.

Resolved conflict in pkg/server/server.go:
- Removed serviceAccountsDB field (upstream change)
- Preserved argoCDURLStore field (feature change)
@codecov

codecov Bot commented Jan 20, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 82.12291% with 32 lines in your changes missing coverage. Please review.
✅ Project coverage is 56.42%. Comparing base (9c066ee) to head (efcb486).
⚠️ Report is 86 commits behind head on main.

Files with missing lines Patch % Lines
pkg/server/argocd/watcher.go 84.49% 20 Missing ⚠️
cmd/controlplane/api.go 0.00% 9 Missing ⚠️
pkg/cli/cmd/server/server.go 0.00% 3 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #5521      +/-   ##
==========================================
+ Coverage   56.29%   56.42%   +0.13%     
==========================================
  Files         426      428       +2     
  Lines       32262    32432     +170     
==========================================
+ Hits        18163    18301     +138     
- Misses      13045    13077      +32     
  Partials     1054     1054              

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

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Signed-off-by: Ksawery Karwacki <ksawery.karwacki@gmail.com>
@ksawerykarwacki
ksawerykarwacki force-pushed the feature/4971-dynamic-argocd-urls branch from 3391533 to 6300c69 Compare January 20, 2026 18:38
Fixes linter warnings about unused parameters in test reactor functions.

Signed-off-by: Ksawery Karwacki <ksawery.karwacki@gmail.com>
@krancour krancour added kind/enhancement An entirely new feature area/api-server Affects Kargo's API server needs/priority Priority has not yet been determined; a good signal that maintainers aren't fully committed needs discussion A maintainer explicitly requests no action be taken without further discussion kind/proposal Indicates maintainers have not yet committed to a feature request labels Mar 4, 2026
@krancour

Copy link
Copy Markdown
Member

I understand the value of the proposed change, but am perplexed by the approach. Why would Secrets be used for this purpose? In general, I'd like us to be doing a lot less with Secrets when it's feasible to do so. I don't see what's sensitive about this configuration and it predicates the proper functioning of this feature on relatively privileged level of access. Even if the API server might already have that, this shouldn't become one of the reasons it does.

Why wouldn't this have been art of ClusterConfiguration instead?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/api-server Affects Kargo's API server kind/enhancement An entirely new feature kind/proposal Indicates maintainers have not yet committed to a feature request needs discussion A maintainer explicitly requests no action be taken without further discussion needs/priority Priority has not yet been determined; a good signal that maintainers aren't fully committed

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Allow dynamic loading of argocd urls

2 participants

Morty Proxy This is a proxified and sanitized view of the page, visit original site.