Skip to content

Unify deployer interface across helm, argocd, argocd-helm #571

Description

@lockwobr

Feature Summary

Migrate all three deployers (helm, argocd, argocd-helm) to the deployer.Deployer interface introduced in #527. Have the bundler accept the interface for mockability instead of constructing concrete generators.

Problem/Use Case

PR #527 introduced deployer.Deployer interface and deployer.Output in pkg/bundler/deployer/deployer.go, but only argocdhelm implements it. The helm and argocd deployers still use their own GeneratorInput/GeneratorOutput types and are called directly from bundler.go via concrete methods (makeHelmBundle, makeArgoCD).

This means:

  • Bundler tests can't mock deployers — they must exercise real file I/O
  • Each deployer has its own output type despite identical fields
  • The shared/ sub-package could be consolidated into deployer/

Proposed Solution

  1. Migrate helm.Generator and argocd.Generator to the "Generator IS the input" pattern (configure struct, call Generate(ctx, outputDir))
  2. Have all three implement deployer.Deployer
  3. Refactor bundler.go routing to accept deployer.Deployer instead of calling concrete methods
  4. Consolidate pkg/bundler/deployer/shared/ utilities into pkg/bundler/deployer/

Component

Bundlers

Priority

Nice to have (improves codebase quality)

Related

Metadata

Metadata

Type

No type

Fields

No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions