feat(argocd): install charts from bundle BOM - #742
Conversation
8abb9b0 to
c589994
Compare
| return fmt.Errorf("registry must not be empty") | ||
| } | ||
|
|
||
| rewrite := func(value string) (string, error) { |
There was a problem hiding this comment.
Why not create a new function? Would be way easier to read and maintain than this internal one
There was a problem hiding this comment.
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.
| registryURL := strings.TrimSuffix(strings.TrimPrefix(b.Env.ContainerRegistryURL, "oci://"), "/") | ||
| if registryURL != "" { | ||
| b.Env.InstallConfig.Registry.Server = registryURL | ||
| } |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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.
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>
Stack
local-improvementsargocd-bomSummary
--registryoverride to local and GCP bootstrap flowsconfig.yaml, rewrite BOM image and chart references, and configureglobal.imageRegistryfor pc-applicationsregistry.serverwhen no override is configuredTesting
go test ./...