Commit Graph

291 Commits (master)

Author SHA1 Message Date
Moritz Rieger efbdc716e5
fix: add app version (#153)
* fix: add app version

version is returned by executing clusterlint --version

* inject version as build time variable
2022-10-14 17:22:49 +02:00
elijahomolo 813049225d
Merge pull request #152 from digitalocean/CON-7651/update-dependencies
Upgrade kubernetes dependencies to 0.25.2
2022-10-13 12:43:57 -04:00
elijahomolo 97dc16097f update dependencies 2022-10-13 12:24:55 -04:00
Varsha Varadarajan 60d060978a
Merge pull request #151 from digitalocean/varsha/new-release-workflow
Update release workflow
2022-08-16 10:02:34 -04:00
Varsha Varadarajan 7b44dec9be update README with release process doc 2022-08-11 11:04:10 -04:00
Varsha Varadarajan 444acee23d use go 1.17 to build docker image 2022-08-11 10:55:58 -04:00
Varsha Varadarajan 0784bd266f use workflow dispatcher to simplify release
* drive-by: use softprops/actions-gh-release to upload release assets
2022-08-11 10:54:59 -04:00
Moritz Rieger 40b8be288b
support storageclass from annotations (#149)
providing the storage-class via annotations is deprecated but still respected when provided

CLOSES #150
2022-08-11 13:40:23 +02:00
Moritz Rieger 1f3819e971
Merge pull request #148 from digitalocean/mrieger/fix/CON-7086
fix: Clusterlint panic on valid PVCs when storageClassName specified as annotation
2022-08-05 13:58:13 +02:00
Moritz Rieger f741391698 fix: loop assignment
https://github.com/golang/go/wiki/CommonMistakes#using-reference-to-loop-iterator-variable
2022-08-05 12:42:50 +02:00
Moritz Rieger 87ddf5edc8
Merge pull request #147 from digitalocean/CON-7031
update k8s.io/client-go to v0.24.3
2022-08-04 15:28:43 +02:00
Moritz Rieger 9a9b9e64d0 update k8s.io/client-go@v0.24.3
go get k8s.io/client-go@v0.24.3
go mod tidy
go mod vendor
2022-08-04 10:52:49 +02:00
Dylan Scott 0cfdf8806d
Sync 1.23 product docs changes with upstream (#146) 2022-07-28 12:59:39 +01:00
Dylan Scott a8c53040ec
CON-5812 Extend clusterlint to raise an error-level violation when invalid snapshots are found (#143) 2022-07-04 17:53:02 +01:00
Dylan Scott 9617526dcc
CON-6265 Update Kubernetes dependencies in clusterlint (#142)
Co-authored-by: Dylan Scott <dscott@digitalocean.com>
2022-05-18 15:02:51 +01:00
Sharmita Das c40b7ff149
Merge pull request #139 from larshp/patch-1
docs: fix anchor for resource-requirements
2022-04-21 17:47:20 -04:00
Ingo Gottwald 043bb8bc4e
Merge pull request #141 from digitalocean/ig/reduce-mem-leak
Don't let client-go leak memory
2022-04-07 16:02:58 +02:00
Ingo Gottwald 3032659810 Don't let client-go leak memory 2022-04-07 12:37:44 +02:00
Adam Wolfe Gordon efcb2aa3c2
Merge pull request #138 from digitalocean/awg/fix-node-name-issue
Return the correct node names in the node labels and taints check
2022-03-16 11:57:19 -06:00
Lars Hvam 27812d2f86
docs: fix anchor for resource-requirements 2022-03-12 08:38:05 +01:00
Adam Wolfe Gordon 91df975aee Return the correct node names in the node labels and taints check
Previously a loop variable was being used for the node name in the diagnostic
returned from the node labels and taints check. If the offending node wasn't the
last one in the list, the wrong node name would be returned.

Add a test to reproduce the issue, and copy the loop variable to fix it.
2022-02-24 16:16:06 -07:00
Sharmita Das 7769a03544
Merge pull request #136 from digitalocean/sdas/check-added-to-overview
Cluster linter checks in node's Overview tab
2022-02-08 11:43:59 -05:00
Sharmita Das 65671f2138 Update contet for PDOCS-1370 2022-02-07 17:38:16 -05:00
Collin Shoop 76507549b7
Merge pull request #135 from digitalocean/cshoop/remove-v1beta1-admission-controller-webhooks
Remove v1beta1 admission/controller webhook checks
2022-01-26 12:09:22 -05:00
Collin Shoop 7f663e5c23 Remove v1beta1 admission/controller webhook checks 2022-01-26 11:20:30 -05:00
Varsha Varadarajan 394f0bc265
Merge pull request #134 from digitalocean/varsha/clusterlint-dockerfile
add dockerfile to build the clusterlint image to use in-cluster
2022-01-26 10:01:24 -05:00
Varsha Varadarajan 376bbebba1
Merge pull request #132 from digitalocean/varshavaradarajan-add-darwin-arm64
Cross compile clusterlint for darwin arm64
2022-01-18 15:59:47 -05:00
Varsha Varadarajan 8927abd07d add dockerfile to build the clusterlint image to use in-cluster 2022-01-18 15:58:27 -05:00
Varsha Varadarajan a7a723028a
Merge pull request #129 from sundowndev/feat/in-cluster
Add the ability to run in-cluster
2022-01-18 15:52:21 -05:00
Varsha Varadarajan c1e8541783
Cross compile clusterlint for darwin arm64 2022-01-12 21:19:52 -05:00
Collin Shoop dbed5ed5de
Merge pull request #131 from digitalocean/cshoop/update-k8s-0.22.5
Upgrade kubernetes dependencies to 0.22.5
2022-01-12 15:03:01 -05:00
Collin Shoop b1be746dfa Upgrade kubernetes dependencies to 0.22.5 2022-01-11 12:12:34 -05:00
sundowndev 1517859b74
docs: running in-cluster with RBAC 2021-12-20 16:13:45 +04:00
sundowndev 15087dbab6
refactor(kube): add in-cluster option validation 2021-12-20 15:43:51 +04:00
Varsha Varadarajan 2564cd4ef7
Merge pull request #130 from digitalocean/varsha/fix-dobs-pod-owner
dobs-pod-owner: initialize loop iterator variable as we are passing by object details by reference
2021-12-10 10:25:27 -05:00
Varsha Varadarajan 1a5de2fdc2 dobs-pod-owner: initialize loop iterator variable as we are passing by object details by reference 2021-12-10 10:22:45 -05:00
sundowndev 3399b475c6 docs: in-cluster usage 2021-11-30 23:08:52 +01:00
sundowndev f55ebf5cba feat: add ability to run in-cluster
Until now, clusterlint was designed to be run locally using a kubeconfig file to access the Kubernetes API. But some users may want to run it in-cluster so it can be run as a CronJob for example.
2021-11-30 22:56:44 +01:00
Timo Reimann 8e59edeb32
Update dependencies to fix crash on Go 1.17 (#126)
When running clusterlint on Go 1.17, it panics right on startup. The
issue is our usage of github.com/mattn/go-isatty (consumed by
github.com/fatih/color) which had a bug until [1]. Updating to the
latest v0.0.14 release fixes the issue.

Also bump the minimum (library) dependency to 1.16 in go.mod since that
is the oldest, officially supported Go version. Bumping to 1.17 actually
enables us to fix the issue by simply updating to the latest
github.com/fatih/color, as opposed to adding an indirect import of
github.com/mattn/go-isatty which this change does right now (which I
suppose works due to Go 1.17 module management improvements); however,
that'd come at the price of breaking compatibility with 1.16 users which
is non-ideal.
Regardless, update github.com/fatih/color as well while we're here.

Also bump the version of the Go image used for testing.

[1] https://github.com/mattn/go-isatty/pull/66
2021-09-19 16:52:07 +02:00
Timo Reimann c0110ddbbb
Merge pull request #127 from digitalocean/fix-webhook-test-expectations
Fix webhook test expectations
2021-09-19 16:46:00 +02:00
Timo Reimann d0800c1fc4 Fix webhook test expectations
The beta tests need to use the beta expectations as well.
2021-09-19 16:03:08 +02:00
Adam Wolfe Gordon 5eeabb8136
Support both v1beta1 and v1 admission control webhooks (#124)
We have a number of checks that operate on admission control webhook 
configuration. Older clusters support only v1beta1 of admission control, while 
newer clusters support v1. Currently clusterlint fails to run on these older 
clusters because we can't fetch v1 admission control objects from them. 

This change covers the following modifications:

- When listing objects, ignore "not found" errors, which mean the cluster 
  doesn't support the resource we're trying to list.
- Duplicate our existing admission control webhook checks for v1beta1, so that 
  older clusters get the same checks as newer clusters. 
- Enhance the errors we return when listing objects fails so that we can tell 
  which resource we failed to list.
- Remove extraneous empty import: client auth plugins are already loaded in 
  objects.go, so no need for the import in object_filter.go. 
- Ensure all object lists are non-nil after fetching objects. (Since we now 
  ignore not found errors, it's possible for some object lists to be nil.) 
- Skip v1beta1 admission control tests when v1 objects exist.

Co-authored-by: Timo Reimann <treimann@digitalocean.com>
2021-09-19 15:47:35 +02:00
Ingo Gottwald 9cd6ee5887
Merge pull request #123 from digitalocean/ig-webhook-timeout-err-msg
Fix webhook timeout diagnostics message
2021-07-05 18:24:51 +02:00
Ingo Gottwald 98f22c21a7 Fix webhook timeout diagnostics message
The message now includes all tested criteria.
2021-07-05 13:58:50 +02:00
Adam Wolfe Gordon 7d20651046
Merge pull request #121 from digitalocean/awg/k8s-1.21
Update Kubernetes dependencies to 1.21.2
2021-06-22 13:31:19 -06:00
Adam Wolfe Gordon 4712329589 Update Kubernetes dependencies to 1.21.2 2021-06-21 16:34:20 -06:00
Varsha Varadarajan e655114336
Merge pull request #120 from fish-dango/resourceRequirement
Added resource requirement to doks group
2021-06-21 08:14:16 -07:00
fish-dango d0bcc7f160 Added resource requirement to doks group 2021-06-19 19:15:45 -07:00
Adam Wolfe Gordon 6600f6f16f
Merge pull request #118 from digitalocean/sdas/some-edits-checks
Clusterlint checks minor edits
2021-05-25 16:56:42 -06:00
Sharmita Das 3513d3f237 Minor edits 2021-05-25 16:10:39 -04:00