helm: helm lint: [WARNING] templates/: directory not found
Output of helm version:
version.BuildInfo{Version:"v3.1.1", GitCommit:"afe70585407b420d0097d07b21c47dc511525ac8", GitTreeState:"clean", GoVersion:"go1.13.8"}
Some charts don’t need a templates directory; we have real-world examples in our project. Nevertheless, these cause helm lint to display a warning in our CI pipeline. One might think the solution is simple enough: just add a templates directory. But empty directories can’t be added in Git, so one would have to employ some kind of hacky ad-hoc workaround with an empty .gitignore or something. Not very practical.
I don’t know what solution to suggest, but this is a bit of an issue for us, so I’ll post it here and see where the discussion takes us.
About this issue
- Original URL
- State: closed
- Created 4 years ago
- Reactions: 2
- Comments: 38 (24 by maintainers)
I’d like to see a solution to this too. We intentionally do not have a
templates/directory for multiple deployments because we are just passing values to dependencies. If we use the--strictoption, that causes failures in our CI/CD pipeline. For now, I’m only using--strictfor deployments with templates to catch issues with deprecated K8s resources. Would love to be able to use it across the board though.Thanks for raising again @lindhe. I mis-read issue #8418 and even though it has similarities to this, they are different issues. I am going to re-open this issue and raise it at the dev weekly meeting today on how best to proceed.
Hey Team - I’ve had a go at resolving this issue via #11586. There are some test failures coming back from CircleCI due to golden test data comparisons and just removing the warning from the golden test data doesn’t resolve it as further differences are emerging.
Before I go too much further I’m definitely keen for any gentle guidance on the preferred way of addressing those 🙏🏻
Strange. I tried it now with
v3.4.0-rc.1and the warning is still there. What am I missing?Setup
Chart.yaml:
Commands:
@lindhe @dntosas This should be fixed by changes in PR #7970 which will be in 3.4.0 release. You can test against main branch to see if it works. It is also similar to issue #8418.
I am therefore going to close this issue and we can re-open if need be.
Yes, meant to add that to https://github.com/helm/helm/issues/8033#issuecomment-624534020 to show when it is ok to have no
templatedirectoryThat sounds like it would make a lot of sense. My most common use-case for not having
templates/is when I put together an umbrella chart (with dependencies) that doesn’t have any template files of its own. And it sounds like that would be correctly handled by your suggestion! And not creating a release without anything to deploy sounds like an error case…All in all, I like it!