Skip to content

feat(argocd): install charts from bundle BOM - #742

Open
schrodit wants to merge 5 commits into
mainfrom
argocd-bom
Open

feat(argocd): install charts from bundle BOM#742
schrodit wants to merge 5 commits into
mainfrom
argocd-bom

Conversation

@schrodit

Copy link
Copy Markdown
Member

Stack

  • Base: local-improvements
  • This PR: argocd-bom

Summary

  • prepare and parse the installer BOM once before local bootstrap dependencies are installed
  • install the Argo CD and pc-applications charts using versions and OCI references from the bundle BOM
  • add an opt-in --registry override to local and GCP bootstrap flows
  • persist explicit registry overrides in config.yaml, rewrite BOM image and chart references, and configure global.imageRegistry for pc-applications
  • preserve BOM references and omit registry.server when no override is configured

Testing

  • go test ./...

@schrodit
schrodit requested a review from joka134 August 26, 2026 12:08
@schrodit schrodit self-assigned this Aug 26, 2026
Base automatically changed from local-improvements to main August 27, 2026 08:41
@schrodit
schrodit force-pushed the argocd-bom branch 2 times, most recently from 8abb9b0 to c589994 Compare August 27, 2026 12:48
Comment thread internal/installer/bom/bom.go Outdated
return fmt.Errorf("registry must not be empty")
}

rewrite := func(value string) (string, error) {

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Why not create a new function? Would be way easier to read and maintain than this internal one

@schrodit schrodit Sep 9, 2026

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

extracted the registry-reference rewrite into the private package-level rewriteRegistry helper, leaving UseRegistry focused on traversing the BOM and adding component context to errors. Validated with go test ./...; the full suite passes.

Comment thread internal/bootstrap/gcp/gcp.go Outdated
Comment on lines +1032 to +1035
registryURL := strings.TrimSuffix(strings.TrimPrefix(b.Env.ContainerRegistryURL, "oci://"), "/")
if registryURL != "" {
b.Env.InstallConfig.Registry.Server = registryURL
}

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

The GitHubPat is still required even if we use another registry? Also this change is done in EnsureGitHubAccessConfigured even if it is not related to github. Should be renamed to ensureRegistryConfigured or split up?

@schrodit schrodit Sep 9, 2026

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

alternative registries now use a separate external-registry path with explicit --registry-user and --registry-password credentials. GitHubPAT is only used for GitHub registry access and GitHub API features. The configuration step is now EnsureRegistryAccessConfigured, and external registries use the lite-package/direct-pull path. Added focused credential and package-selection coverage; go test ./... passes.

schrodit and others added 3 commits September 9, 2026 11:51
Prepare the installer bundle before bootstrap so its BOM is available during Argo CD installation. Resolve the Argo CD OCI chart and version from the BOM, nest wrapper chart values appropriately, and retain the upstream chart fallback when no usable BOM entry exists.
Add an opt-in --registry flag to local and GCP bootstrap flows and persist explicit overrides in config.yaml. Rewrite BOM image and chart references for the selected registry and propagate it to the pc-applications Helm values.
Signed-off-by: schrodit <7979201+schrodit@users.noreply.github.com>
Signed-off-by: schrodit <7979201+schrodit@users.noreply.github.com>
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.

2 participants