carvel-dev / carvel-dev/kapp-controller
`kctrl package install … --dry-run --ytt-overlay-file …` does not stamp out overlays
- Dominant language
- Go
- Stars
- 323
- Forks
- 127
- Avg merge
- 2d 10h
- Merged PRs (30d)
- 6
Description
**What steps did you take:**
I am using `kctrl` to stamp out package installation resources and pipe those into `ytt` (or `kapp`):
```
kctrl package install \
… \
--ytt-overlay-file overlays.yaml \
--dry-run \
| ytt -f -
```
**What happened:**
The overlay-related resources are not stamped out. As if `--ytt-overlay-file overlays.yaml` is ignored.
**What did you expect:**
The overlay-related resources are stamped out.
**Anything else you would like to add:**
The reason is that `o.DryRun` [short-circuits](https://github.com/carvel-dev/kapp-controller/blob/606e658868de2b2c1b40ec01a91938528be618a2/cli/pkg/kctrl/cmd/package/installed/create_or_update.go#L228) before [overlays are processed](https://github.com/carvel-dev/kapp-controller/blob/606e658868de2b2c1b40ec01a91938528be618a2/cli/pkg/kctrl/cmd/package/installed/create_or_update.go#L276).
**Environment:**
```
❯ kctrl --version
kctrl version 0.48.1
Succeeded
```
---
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
Research direction
Start in cli/pkg/kctrl/cmd/package/installed/create_or_update.go around the DryRun short-circuit and the later overlay-processing code. Reproduce the reported kctrl package install command with --dry-run and pipe its output to ytt. Done means the dry-run output includes resources generated from --ytt-overlay-file overlays.yaml.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go, kubernetes
- Domain
- cli
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 55/100