carvel-dev / carvel-dev/kapp-controller

Could CRDAppFactory be made an interface?

Open
#1,494 1 comment 1 reaction 1 assignee Claimed by @sethiyash View on GitHub
carvel-accepted enhancement
Dominant language
Go
Stars
323
Forks
127
Avg merge
2d 10h
Merged PRs (30d)
6

Description

**Describe the problem/challenge you have**
When reusing/embedding kctrl dev mode into our own CLI, we want to be able to control output of the 3 different phases, fetch/template/deploy, and as such, we want to be able to provide 3 different CmdRunners to each phase.
Currently, as CRDAppFactory is a struct without an interface, we can't override behavior to provide our own here: https://github.com/carvel-dev/kapp-controller/blob/develop/pkg/app/app_factory.go#L25

**Describe the solution you'd like**
It'll be ideal that there be an interface so that we could replace the call in [kctrl local](https://github.com/carvel-dev/kapp-controller/blob/develop/cli/pkg/kctrl/local/reconciler.go#L224-L237) with an alternate version that provides different runners with different loggers.

**Anything else you would like to add:**
Alternatively, it'll be ideal to have detailed logging happening on each phase, so that logging can be properly customised for each phase.

---
Vote on this request

This is an invitation to the community to vote on issues, to help us prioritize our backlog. Use the "smiley face" up to the right of this comment to vote.

👍 "I would like to see this addressed as soon as possible"
👎 "There are other more important things to focus on right now"

We are also happy to receive and review Pull Requests if you want to help working on this issue.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.