Commit Graph

20 Commits (fee585542d86e7177e4ca43e03500d9f7044b4df)

Author SHA1 Message Date
Varsha Varadarajan fee585542d Namespace check: Check if there are k8s objects in the default namespace 2019-06-13 12:58:53 -04:00
Varsha Varadarajan 744341199b
Merge pull request #7 from digitalocean/varsha/remove-unused-const
Remove unused const left out during refactoring.
2019-06-12 16:24:43 -04:00
Varsha Varadarajan 4c8f2b22d1 Remove unused const left out during refactoring. 2019-06-12 16:18:36 -04:00
Adam Wolfe Gordon 4989a51f31
Merge pull request #6 from digitalocean/awg/check-imports
Import all checks from one package
2019-06-12 16:09:40 -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
Varsha Varadarajan 16996ec947
Merge pull request #5 from digitalocean/awg/refactor
Factor kubernetes-related code out of main
2019-06-12 15:25:58 -04:00
Adam Wolfe Gordon 0dd7e3acde Factor object fetching into the kube package
Add a `Client` type to the `kube` package that knows how to fetch
objects from a cluster. Use this package from main, and simplify main a
little bit now that the k8s-related code is moved out.
2019-06-12 14:46:30 -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 b7196f4964
Merge pull request #4 from digitalocean/varsha/run-checks
Add run command to run all checks
2019-06-12 13:21:12 -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
Varsha Varadarajan d4ef6bf02f
Merge pull request #3 from digitalocean/varsha/list-checks
Add list command to list all checks.
2019-06-11 17:01:03 -04:00
Varsha Varadarajan fedefb22fe Add list command to list all checks.
* Optionally takes in a group flag to filter checks by group name.
2019-06-11 16:40:32 -04:00
Varsha Varadarajan 0c9667c110
Merge pull request #2 from digitalocean/varsha/context
Provide a cli arg for context
2019-06-11 15:12:06 -04:00
Varsha Varadarajan 4ee6bfdf2b Provide a cli arg for context 2019-06-11 14:49:14 -04:00
Varsha Varadarajan 3eb9179335
Merge pull request #1 from digitalocean/awg/checks
Create check registry with initial noop check, and vendor dependencies
2019-06-11 14:39:27 -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
Varsha Varadarajan 6195e47bb4 Inject client to fetch function, add main_test.go 2019-06-11 13:50:09 -04:00
Varsha Varadarajan ea812eea20 Rename variable name - Objects => objects 2019-06-11 09:04:32 -04:00
Varsha Varadarajan e99acbcbc9 Introduce flag to accept kubeconfig from cli 2019-06-11 08:57:07 -04:00
Varsha Varadarajan 9b34ff7393 Fetch all core k8s objects. 2019-06-10 18:06:14 -04:00