carvel-dev / carvel-dev/kapp

Errors due to the default rebase rules should explain the source of the rule

Open
#749 0 comments 0 reactions 0 assignees View on GitHub
carvel accepted enhancement priority/unprioritized-backlog
Dominant language
Go
Stars
1.1k
Forks
134
PR merge metrics
No merged PRs in 30d

Description

**Describe the problem/challenge you have**
My `kapp deploy` command was failing due to a rebase rule, but the rebase rule was not in my yaml. I was unaware that kapp has its own set of rebase rules that it includes by default. The error message I received didn't indicate the source of the failing rule.

**Describe the solution you'd like**
Ideally I'd like the error message to point me directly to the rule that is failing. This could be by printing out the rule's yaml, providing a file location or a URL. If none of those are feasible, then simply stating that the rebase rule is a default rule and pointing me to the `kapp deploy-config` command would suffice.

**Anything else you would like to add:**
Here's the output I received:

```
5:32:23PM: create serviceaccount/kp-default-repository-serviceaccount (v1) namespace: cf

kapp: Error: create serviceaccount/kp-default-repository-serviceaccount (v1) namespace: cf:
Calculating change after the save:
Applying rebase rule to serviceaccount/kp-default-repository-serviceaccount (v1) namespace: cf:
Applying ytt (overlayContractV1):
Evaluating:
- struct has no .name field or method
in
overlay.yml:20 | #@ if k.name.startswith(res_name+"-token-"):
```

Note that `overlay.yml` is listed as the rule source, but it's not a complete file path and it wasn't in my working directory.

---
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.