feat: support Argo CD Git auth modes#388
Open
Matthiator wants to merge 2 commits into
Open
Conversation
15 tasks
tuunit
requested changes
Jun 12, 2026
Comment on lines
+58
to
+61
| shapeMigrated, err := migrateConfigShape(raw) | ||
| if err != nil { | ||
| return fmt.Errorf("migrate config shape: %w", err) | ||
| } |
Contributor
There was a problem hiding this comment.
as this is a change to the config, we should bump the config version and therefore check isV1Alpha1 and then reshpae
Contributor
There was a problem hiding this comment.
lets take the opportunity while changing the config anyways to get rid of the unnecessary dns field in terraform and instead use the dnsName field from the cluster
Contributor
Author
There was a problem hiding this comment.
Done in f710814:
- Added
ConfigVersionV1Alpha2.Load()now checksisV1Alpha1and runs an explicitmigrateV1Alpha1ToV1Alpha2instead of the shape detection. Theargocd.repo.https->argocd.repo.gitmove is now part of that versioned migration. Configs without aversionfield still go through the legacy migration first and are then migrated tov1alpha2in the same load. - Removed
terraform.dns:dns_nameis now rendered from the clusterdnsName. One thing the dns block also carried was the zone contact email (contact_emailonstackit_dns_zone), which cannot be derived fromdnsName- I moved it toterraform.dnsContactEmailand the migration relocatesdns.emailthere automatically. Let me know if you'd rather have it somewhere else.
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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
📝 Summary
Adds mode-aware Argo CD Git repository authentication for bootstrap:
https,ssh, andgithub-appviaARGOCD_GIT_AUTH_MODEARGOCD_GIT_HTTPS_URLargocd.repo.gitv1alpha2and migrates existingv1alpha1configs on load/saveargocd.repo.httpstoargocd.repo.gitterraform.dns.name; Terraform now uses the clusterdnsNameterraform.dns.emailtoterraform.dnsContactEmailExample from
kubara init --prep:Generated
config.yamlfor HTTPS/PAT:Generated
config.yamlfor SSH:Generated
config.yamlfor GitHub App:🧩 Type of change
No manual migration is expected. Existing configs without a
versionfield first go through the legacy migration, thenv1alpha1configs are migrated automatically tov1alpha2when kubara loads and saves the config:argocd.repo.httpsmoves toargocd.repo.gitterraform.dns.nameis removed because Terraform now derivesdns_namefrom the clusterdnsNameterraform.dns.emailmoves toterraform.dnsContactEmail🧪 Testing
Validated locally:
cd src && make testmake docs-buildgit diff --checkkubara init --prepandkubara initinhttps,ssh, andgithub-appmodes🔗 Related Issues / Tickets
Closes #246
✅ Checklist
📎 Additional Context (optional)
This PR intentionally leaves the generated ExternalSecret helper for additional app repositories on the existing HTTPS/PAT path. SSH and GitHub App support for additional app repositories is planned as a follow-up so the bootstrap auth changes stay reviewable.
terraform.dnsContactEmailis kept because the Stackit DNS zonecontact_emailvalue cannot be derived from the clusterdnsName.