carvel-dev / carvel-dev/kapp-controller

optional paths in template steps.

Open
#60 9 comments 3 reactions 0 assignees View on GitHub
carvel-accepted discussion
Dominant language
Go
Stars
323
Forks
127
Avg merge
2d 16h
Merged PRs (30d)
4

Description

**Describe the problem/challenge you have**
Right now every path under `ytt` or similar template steps in the App CR is required, and the App CR will fail if it's not present:
```
template:
error: 'Templating dir: exit status 1'
exitCode: 1
stderr: |
ytt: Error: Checking file '/etc/kappctrl-mem-tmp/kapp-controller-fetch-template-deploy695734710/config/aws': lstat /etc/kappctrl-mem-tmp/kapp-controller-fetch-template-deploy695734710/config/aws: no such file or directory
updatedAt: "2020-12-14T16:27:39Z"
```

**Describe the solution you'd like**
We have a standardized way we write out App CRs, providing an easy to override mechanism for different environments. Not all App CRs need that overriding capability, but having the folders there reduces complexity. If there was a way to say "this path is optional, don't fail if it's not there, just proceed without it" that would reduce the need to populate a bunch of folders with a `.gitkeep` file or similar.

**Anything else you would like to add:**
Not a high priority, as almost 99% of our apps do need some type of configuration per environment, just wanted to track it for posterity.

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.