Documentation
¶
Overview ¶
Package action implements deploy, delete, list, and status business logic.
Each operation loads a manifest and delegates to Helm or Kubernetes through small interfaces so commands stay thin and tests can inject fakes.
Operations ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Delete ¶
type Delete struct {
// contains filtered or unexported fields
}
Delete encapsulates the delete business logic.
func NewDelete ¶
func NewDelete(deleter ReleaseDeleter) *Delete
NewDelete constructs a Delete with the given release deleter.
func (*Delete) Check ¶
func (d *Delete) Check(ctx context.Context, params DeleteParams) (*DeleteResult, error)
Check verifies the release exists and returns it. Does not perform deletion.
type DeleteParams ¶
DeleteParams holds the parameters for a delete operation.
type DeleteResult ¶
DeleteResult contains the outcome of a delete check.
type Deploy ¶
type Deploy struct {
// contains filtered or unexported fields
}
Deploy encapsulates the deploy business logic.
func NewDeploy ¶
func NewDeploy(deployer Deployer, loader ManifestLoader) *Deploy
NewDeploy constructs a Deploy with the given deployer and loader.
type Deployer ¶
type Deployer interface {
InstallApp(ctx context.Context, m *manifest.Manifest, environment string, dryRun bool) error
}
Deployer abstracts Helm install/upgrade operations.
type List ¶
type List struct {
// contains filtered or unexported fields
}
List encapsulates the list business logic.
func NewList ¶
func NewList(lister ReleaseLister) *List
NewList constructs a List with the given release lister.
type ListParams ¶
ListParams holds the filter parameters for listing releases.
type ManifestLoader ¶
type ManifestLoader interface {
Manifest(ctx context.Context, environment string) (*manifest.Manifest, error)
}
ManifestLoader loads and validates a manifest for an environment.
type ReleaseDeleter ¶
type ReleaseDeleter interface {
GetRelease(ctx context.Context, project, environment string) (*v1.Release, error)
DeleteRelease(ctx context.Context, project, environment string) error
}
ReleaseDeleter abstracts Helm get/delete operations.
type ReleaseGetter ¶
type ReleaseGetter interface {
ListReleases(ctx context.Context, selector labels.Selector) ([]*v1.Release, error)
}
ReleaseGetter abstracts fetching releases by project/environment.
type ReleaseLister ¶
type ReleaseLister interface {
ListReleases(ctx context.Context, selector labels.Selector) ([]*v1.Release, error)
}
ReleaseLister abstracts Helm list operations.
type Status ¶
type Status struct {
// contains filtered or unexported fields
}
Status encapsulates the status business logic.
func NewStatus ¶
func NewStatus(getter ReleaseGetter) *Status
NewStatus constructs a Status with the given release getter.
type StatusParams ¶
StatusParams holds the parameters for a status query.