Commit Graph

109 Commits

Author SHA1 Message Date
Francesco Romani
816eee64e8 cpumanager: hack: add golang ci config for contextual logging
add cpumanager to contextual logging linter
regenerate with
```hack/update-golangci-lint-config.sh```

Signed-off-by: Francesco Romani <fromani@redhat.com>
2025-10-27 08:38:58 +01:00
Kubernetes Prow Robot
60e1f61a63 Merge pull request #133511 from BenTheElder/no-md5
eliminate md5 usage, block new usage
2025-10-24 10:59:35 -07:00
Kubernetes Prow Robot
ee58e792cc Merge pull request #134812 from skitt/enable-gocritic-unlambda
Avoid no-change lambdas
2025-10-23 15:43:34 -07:00
Kubernetes Prow Robot
ab34215bab Merge pull request #134229 from yongruilin/kal-vg
Use kube-api-linter linting for declarative validation tags
2025-10-23 08:11:35 -07:00
Stephen Kitt
1e2817d589 Avoid no-change lambdas
This replaces functions that wrap another function with no change with
a direct reference to the wrapped function.

Signed-off-by: Stephen Kitt <skitt@redhat.com>
2025-10-23 09:46:15 +02:00
yongruilin
7d1500bb1e feat: Add exceptions for conflicting markers in kube-api-linter 2025-10-22 18:02:06 +00:00
yongruilin
5fc2f3e5a9 feat: Enable conflicting markers linter to detect mutually exclusive field markers 2025-10-22 17:06:11 +00:00
Stephen Kitt
5bfc9aba9f Disable unwanted gocritic checks instead of filtering them
The golangci-lint docs indicate that, for gocritic, disabled-checks
and enabled-checks can't be combined. That is however not accurate;
enabled-checks adds checks, disabled-checks disables them, in that
order. If disable-all isn't set, then the setup starts with the checks
enabled by default, adds any additional checks specified in
enabled-checks, and removes checks specified in disabled-checks.

This means that instead of filtering unwanted checks, we can disable
them entirely. This makes the set of disabled checks easier to read,
and perhaps easier to clean up in future.

For singleCaseSwitch and wrapperFunc, we only want to ignore specific
instances, so this is still done by filtering.

Signed-off-by: Stephen Kitt <skitt@redhat.com>
2025-10-22 15:00:53 +02:00
Benjamin Elder
886fdeefae forbid new use of md5 2025-10-21 15:25:11 -07:00
Tim Hockin
b1c85ef2fe golangci-lint: no need to enable deprecatedComment 2025-10-21 12:47:38 -07:00
phuhung273
7ed61cfde1 chore(kubelet): migrate topologymanager to contextual logging 2025-10-14 18:32:20 +07:00
Ed Bartosh
bb91913017 Migrate sample-device-lugin to contextual logging 2025-09-28 21:13:41 +03:00
Ed Bartosh
d45a4557c1 Migrate device manager to contextual logging 2025-09-26 16:50:34 +03:00
Joel Speed
4e71993917 Enable SSATags linter to enforce +listType on lists in APIs 2025-09-19 13:57:07 +01:00
Kubernetes Prow Robot
d1af46054f Merge pull request #133605 from JoelSpeed/enable-conditions-kal
Enforce API conventions around Conditions fields via Kube API Linter
2025-09-16 08:08:13 -07:00
Joel Speed
d2ba13dac9 Add exceptions for existing issues for conditions linter 2025-09-12 18:07:54 +01:00
Joel Speed
894d724f98 Enable conditions linter for Kube API Linter 2025-09-12 18:06:55 +01:00
Joel Speed
e3b08f9871 Update KAL to latest and add shadow config for new options 2025-09-12 18:06:17 +01:00
Ed Bartosh
bf0429ed07 migrate kubelet/certificate to contextual logging 2025-09-10 12:33:33 +03:00
Ed Bartosh
b276c96ef8 Migrate kubelet/server to contextual logging 2025-09-09 12:49:42 +03:00
Kubernetes Prow Robot
3b687533aa Merge pull request #133217 from bart0sh/PR187-migrate-utils-logs-to-contextual-logging
Kubelet: Migrate util/ and logs/ to contextual logging
2025-09-05 14:37:34 -07:00
Kubernetes Prow Robot
078a8f1894 Merge pull request #130581 from zhifei92/migrate-kubelet-config-to-contextual-logging
chore(kubelet):  migrate config to contextual logging
2025-09-05 05:25:26 -07:00
Omer Aplatony
d75d4860e7 kubelet: migrate module logs to contextual logging
Signed-off-by: Omer Aplatony <omerap12@gmail.com>
Co-authored-by: Ed Bartosh <eduard.bartosh@intel.com>
2025-09-05 13:22:00 +03:00
Omer Aplatony
9c1cf79d74 kubelet: migrate utils to contextual logging
Signed-off-by: Omer Aplatony <omerap12@gmail.com>
Co-authored-by: Ed Bartosh <eduard.bartosh@intel.com>
2025-09-05 13:19:56 +03:00
Kubernetes Prow Robot
b8257c1667 Merge pull request #133699 from pohly/log-check-update
hack/logcheck.conf: add several converted packages
2025-08-29 08:17:16 -07:00
Kubernetes Prow Robot
22a567ac31 Merge pull request #133571 from BenTheElder/deprecated-missing-oh-no
fix many incorrect deprecation warnings in godoc, enable deprecatedComment linter
2025-08-27 18:30:53 -07:00
Kubernetes Prow Robot
ba8b1a3edb Merge pull request #133475 from aramase/aramase/c/better_logging_credential_provider
Migrate pkg/credentialprovider to structured logging
2025-08-27 18:29:54 -07:00
Kubernetes Prow Robot
346a49599e Merge pull request #133287 from ahmedtd/disable-ci-lint-check
golangci: Disable staticcheck QF1008 in hints
2025-08-27 16:06:33 -07:00
Patrick Ohly
4fa6c70604 hack/logcheck.conf: add several converted packages
Several packages in `pkg` already have no log calls which need to be
updated. Adding them to the logcheck.conf prevents regressions.
2025-08-26 09:31:57 +02:00
Benjamin Elder
b9d5edd444 remove stray strailing tabs from gocritic settings 2025-08-18 11:22:40 -07:00
Benjamin Elder
535b4e07e9 enable gocritic deprecatedComment check to help lint for malformed deprecation comments 2025-08-18 11:22:08 -07:00
Anish Ramasekar
39e7b2ce5e Migrate pkg/credentialprovider to structured logging
Signed-off-by: Anish Ramasekar <anish.ramasekar@gmail.com>
2025-08-11 16:41:55 -07:00
Taahir Ahmed
c11759bdbf golangci: Disable staticcheck QF1008 in hints
Disable QF1008 in pull-kubernetes-linter-hints, based on discussion in
\#k8s-code-organization.  We might want a check that forced a consistent
style within a single file, but there is no reason to prefer a global
choice between `obj.ObjectMeta.Name` and `obj.Name`.

Change-Id: If2e7a3a464cdf1ac83fdaaa18b065df1f19e8568
2025-07-29 21:06:22 +00:00
Kubernetes Prow Robot
d12fae55d0 Merge pull request #131001 from Chulong-Li/winstats-contextual-logging
Migrate pkg/kubelet/winstats to contextual logging
2025-07-24 17:58:26 -07:00
Kubernetes Prow Robot
9eb462ef4a Merge pull request #131306 from Chulong-Li/volumemanager-contextual-logging
Migrate pkg/kubelet/volumemanager to contextual logging
2025-07-24 10:50:27 -07:00
Chulong Li
bf98e45afb Migrate pkg/kubelet/volumemanager to contextual logging
Remove context.TODO and context.Background

Fix linter error in volume_manager_test

Fix QF1008: Could remove embedded field "ObjectMeta" from selector

Remove the extra code change

Remove the extra change

Update the NewTestContext
2025-07-24 21:20:12 +08:00
Chulong Li
f626e847e7 Migrate pkg/kubelet/winstats to contextual logging
Update the order of imports to follow the standard convention

Quick update on import order for cadvisor_windows.go

Update the hack files

Update contextual logging in Test_convertWinApiToCadvisorApi
2025-07-22 20:44:53 +08:00
zhangzhifei16
2b1f38a83b chore(kubelet): migrate config to contextual logging. 2025-07-22 10:57:04 +08:00
zhangzhifei16
911df655d3 chore: migrate kubelet lifecycle to contextual logging. 2025-07-22 10:14:42 +08:00
Kubernetes Prow Robot
ba35c0613d Merge pull request #132427 from soma00333/kuberuntime-contextual-logging-1
feat(kubelet): migrate kuberuntime to contextual logging
2025-07-21 05:50:36 -07:00
Swati Sehgal
b8758ac31b node: mm-mgr: migrate to contextual logging
Signed-off-by: Swati Sehgal <swsehgal@redhat.com>
2025-07-20 21:50:58 +01:00
soma00333
ab839c93ff feat(kubelet): migrate kuberuntime to contextual logging 2025-07-20 09:47:50 +09:00
soma00333
7ddb042626 feat(cmd/kubelet): support structured and contextual logging 2025-07-19 17:10:37 +09:00
Ed Bartosh
4bc2ad6eea migrate pkg/kubelet/preemption to contextual logging 2025-07-17 10:16:03 +03:00
Ed Bartosh
b96e3cac74 migrate pkg/kubelet/pod to contextual logging 2025-07-17 10:16:03 +03:00
Ed Bartosh
0cb31bc407 migrate pkg/kubelet/nodeshutdown to contextual logging 2025-07-17 10:16:03 +03:00
Ed Bartosh
75ccd69bab migrate pkg/kubelet/kubeletconfig to contextual logging 2025-07-17 10:16:03 +03:00
Ed Bartosh
7dad9e2af6 migrate pkg/kubelet/apis to contextual logging 2025-07-17 10:15:58 +03:00
Kubernetes Prow Robot
9a50e30636 Merge pull request #132668 from dims/fix-todos-from-sorted-features-original-pr
Fix todos from sorted features golangci-lint plugin PR
2025-07-09 13:15:26 -07:00
Patrick Ohly
b22ffdb48f golangci-lint: exclude naming convention check for swagger docs
This started to show up now as linter hints at the start of the 1.34 cycle in
all PRs which modify the API. We don't want to enforce that convention in that
generated code, so suppressing it.
2025-07-06 16:54:04 +02:00