Commit Graph

60 Commits (6aab1337967984238dfb4483655abb03df7dde10)

Author SHA1 Message Date
Varsha Varadarajan 3e795268b3 Add tests for the default namespace check. 2019-06-14 14:10:05 -04:00
Varsha Varadarajan dded19b6f2 Move warn functions to the alert struct 2019-06-14 14:10:05 -04:00
Varsha Varadarajan 60b63afcd0 Introduce alert struct to store errors, warnings and mutex.
*Better names for the namespace check.
2019-06-14 14:10:05 -04:00
Varsha Varadarajan fc66985ec3 Extract methods from Run, extract common methods 2019-06-14 14:09:50 -04:00
Varsha Varadarajan c9c34c2fee Check non default services in the default namespace. 2019-06-13 13:06:23 -04:00
Varsha Varadarajan fee585542d Namespace check: Check if there are k8s objects in the default namespace 2019-06-13 12:58:53 -04:00
Adam Wolfe Gordon 572e3b1cf9 Import all checks from one package
Introduce a "meta" check package, `checks/all`, that will import all the
other packages that contain checks. Then main or other packages that
want to use checks need only import `checks/all` and will get all the
checks registered.

This doesn't feel like a perfect solution, but I think it's tidy enough
to go with for the moment at least.
2019-06-12 16:09:13 -04:00
Adam Wolfe Gordon e00d41aa65 Move KubeObjects into a new package
The new `kube` package will handle Kubernetes interactions.
2019-06-12 14:13:31 -04:00
Varsha Varadarajan c1c27fd576 Add run command to run all checks
* Optionally takes in a group flag to filter checks by group name.
* Optionally takes in a name flag to run a specific check.
2019-06-12 13:17:47 -04:00
Adam Wolfe Gordon f63933a0eb Create check registry with initial noop check, and vendor dependencies
Factor the KubeObjects type out of package main and into the top-level
clusterlint package. For now still populate it in main, though we'll
likely want to pull this out later.

Add a check type that checks will implement, and implement an initial
noop check that satisfies it. Create a registry for checks.

Vendor dependencies so that we can do a consistent build. For now we're
depending on the master version of client-go since they don't have a
release that supports modules yet, but we should move to a release once
they do.
2019-06-11 14:25:39 -04:00