carvel-dev / kapp

kapp is a simple deployment tool focused on the concept of "Kubernetes application" — a set of resources with the same label

Home Page:https://carvel.dev/kapp

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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

matt-royal opened this issue · comments

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