https://github.com/mslapek/kubedirlint
A simple program that checks the placement of Kubernetes YAML files in your project.
https://github.com/mslapek/kubedirlint
cloud kubernetes linter yaml
Last synced: about 2 months ago
JSON representation
A simple program that checks the placement of Kubernetes YAML files in your project.
- Host: GitHub
- URL: https://github.com/mslapek/kubedirlint
- Owner: mslapek
- License: mit
- Created: 2022-11-27T16:07:53.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2022-12-18T09:52:47.000Z (over 3 years ago)
- Last Synced: 2025-07-13T17:49:03.202Z (12 months ago)
- Topics: cloud, kubernetes, linter, yaml
- Language: Go
- Homepage:
- Size: 7.81 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# kubedirlint
A simple program that checks the placement of
[Kubernetes YAML files](https://kubernetes.io/docs/concepts/overview/working-with-objects/kubernetes-objects/)
in your project.
`kubedirlint` expects files to follow the following pattern:
```
//.yaml
```
For instance:
```
accounting/deployment/tax-compute.yaml
```
All violations are reported to the stderr.
If violations are present, the program exits with an error code.
## Installation
Run this to build and install the application:
```
go install
```
It should place the application in `~/go/bin/kubedirlint`.
The whole application is self-contained in one executable file.
You might consider adding the directory `~/go/bin` to the `PATH`
environment variable.
## Usage
Change the directory to the catalog with your project.
Then just run the application:
```
cd myproject
kubedirlint
```
If everything is OK, it will print:
```
all 5 files are OK
```
But if something is wrong...
```
got 1 error
file accounting/tax.yml has wrong path, should be accounting/service/tax-calc.yaml
```
## Design Principles
Keep it simple.
Read-only operations.
Automated tests are cool.
Print all errors nicely to the stderr.
No network connections.
## Contributing
Issues are tracked on [GitHub](https://github.com/mslapek/kubedirlint/issues).
## Changelog
Please see [CHANGELOG.md](CHANGELOG.md).