clusterlint icon indicating copy to clipboard operation
clusterlint copied to clipboard

Subcommand to lint manifests before they are deployed onto a cluster

Open varshavaradarajan opened this issue 4 years ago • 3 comments

Right now, clusterlint analyzes the workloads after they have been deployed on a managed/self hosted platform. This is great because:

  • Users may not deploy everything into a cluster from one place, and actual deployments can diverge from manifests.
  • It can be used to identify problems that can occur on a cluster even if manifests were alright (example: not setting resource requests and limits)

Adding a feature to lint the manifests before attempting to deploy the workloads on a cluster can be useful to prevent bad configs. This will be particularly useful if there is CI/CD in place to automatically deploy the workloads after making sure that all the configs are fine. This can act as a sanity check before the config is merged in a SCM repository.

varshavaradarajan avatar Jun 09 '20 17:06 varshavaradarajan

I came here just for this suggestion. Any thoughts?

webdz9r avatar Oct 11 '22 19:10 webdz9r

Hey @varshavaradarajan, I'd like to work on this!

Should it be a subcommand of run ? Like clusterlint run manifest -f ./nginx.yaml

sundowndev avatar Dec 06 '22 08:12 sundowndev

Hi @sundowndev ! Thanks for your interest! To be honest, I'm not sure if clusterlint should support this. We haven't had feature requests on this issue and there are tons of yaml linting tools that can be used in the CI.

varshavaradarajan avatar Dec 06 '22 15:12 varshavaradarajan