Skip to content

feat: support Argo CD Git auth modes - #388

Open
Matthiator wants to merge 9 commits into
mainfrom
feat/argocd-repo-auth-modes
Open

feat: support Argo CD Git auth modes#388
Matthiator wants to merge 9 commits into
mainfrom
feat/argocd-repo-auth-modes

Conversation

@Matthiator

@Matthiator Matthiator commented Jun 9, 2026

Copy link
Copy Markdown
Contributor

📝 Summary

Adds mode-aware Argo CD Git repository authentication and updates the configuration schema on top of the external catalog architecture merged in #515.

  • supports https, ssh, and github-app through ARGOCD_GIT_AUTH_MODE
  • introduces ARGOCD_GIT_URL while retaining ARGOCD_GIT_HTTPS_URL as the legacy HTTPS fallback
  • creates the initial Argo CD repository Secret with the fields required by the selected auth mode
  • allows public HTTPS repositories without credentials and requires username/password as an all-or-none pair for private repositories
  • validates repository URL formats for HTTPS, SSH, and GitHub App modes
  • records repository settings under argocd.repo.git and retains OCI repository support
  • replaces the redundant Terraform DNS block with terraform.dnsContactEmail
  • updates the default bootstrap and general catalogs to version 1.1.0

Because #515 introduced config version v1alpha4, this PR now introduces v1alpha5. The v1alpha4 to v1alpha5 migration moves argocd.repo.https to argocd.repo.git, moves terraform.dns.email to terraform.dnsContactEmail, derives the zone name from cluster.dnsName, and warns if the former DNS names differ. Existing migrations continue to run in sequence.

Catalog templates are intentionally excluded from this PR and moved to kubara-io/catalogs#6.

🧩 Type of change

  • 🔧 CLI / Go code
  • 📦 Helm chart
  • 🧱 Terraform module
  • 📝 Documentation
  • 🧪 Test or CI change
  • ♻️ Refactor / cleanup

⚠️ Is this a breaking change?

  • Yes, this change breaks existing functionality (explain in summary)

Supported older configurations are migrated automatically when kubara loads and saves them.

🧪 Testing

  • CI passed
  • Manually tested (local/dev cluster)
  • Unit tested
  • Not tested (explain why below)

Validated with the full Go test suite, static analysis, CodeQL, strict documentation validation, catalog-backed init/generate, Helm validation, and Terraform validation.

🔗 Related Issues / Tickets

Closes #246
Related to kubara-io/catalogs#6

✅ Checklist

  • Code compiles and passes all tests
  • Linting and style checks pass
  • Comments added for complex logic
  • Documentation updated (if applicable)

📎 Additional Context (optional)

The matching catalog release is prepared in kubara-io/catalogs#6. Until version 1.1.0 is published, CI packages that branch locally; the workflow contains a TODO to remove this temporary bridge after publication.

@Matthiator Matthiator mentioned this pull request Jun 9, 2026
15 tasks
@Matthiator
Matthiator marked this pull request as ready for review June 9, 2026 17:49
@Matthiator
Matthiator requested review from a team, la-cc and tuunit June 9, 2026 17:49
Comment thread src/internal/config/store.go Outdated
Address review feedback:

- introduce v1alpha2 config version and migrate v1alpha1 configs
  through an explicit version check instead of shape detection
- move the argocd.repo.https -> argocd.repo.git migration into the
  v1alpha1 -> v1alpha2 migration
- remove the terraform.dns block: the zone name is derived from the
  cluster dnsName, the contact email moves to terraform.dnsContactEmail
@Matthiator
Matthiator requested a review from tuunit June 12, 2026 12:14
Re-port the Argo CD Git auth-modes feature onto main's refactored config
architecture:

- express the argocd.repo.https->git rename and terraform.dns->dnsContactEmail
  change as a new v1alpha3->v1alpha4 migration in the migrations/ package
  (the branch's inline v1alpha2 approach collided with main's already-shipped
  v1alpha2/v1alpha3 layout migration)
- apply the auth modes (https/ssh/github-app) to RepoProto, envconfig,
  createGitRepositorySecret, factory and orchestrator
- keep main's public-repo support (https username/PAT stay optional)
- update argo-cd values + stackit/t-cloud-public tfvars templates to repo.git
  and cluster.dnsName / terraform.dnsContactEmail
- adapt tests to the new schema and add auth-mode + v1alpha4 migration coverage
@Matthiator
Matthiator removed the request for review from la-cc July 21, 2026 09:14
@tuunit

tuunit commented Jul 22, 2026

Copy link
Copy Markdown
Contributor

needs to be split into 2 PRs. one for the go code and the template changes need to go into the catalogs repository

@Matthiator

Copy link
Copy Markdown
Contributor Author

Done: this PR now contains only the Go/config, migration, CI, and documentation changes. The catalog templates were moved to kubara-io/catalogs#6.

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.

[Feature]: Support Argo CD repo auth via SSH/GitHub App and clarify PAT best practices

2 participants