Kubernetes Prow Robot
b005b40027
Merge pull request #125136 from mauri870/feature/wsl2-kernel-test
...
util: add test case for WSL kernel version parsing
2024-09-19 20:23:27 +01:00
Kubernetes Prow Robot
9c763a9c9f
Merge pull request #126104 from cji/5321
...
Add funcs in pkg/filesystem/util to set file permissions on Windows and update container log dir perms
2024-07-16 10:33:05 -07:00
Mark Rossetti
b377dfba0c
Add funcs in pkg/filesystem/util that can actually set file permissiosn
...
on Windows and update container log dir perms to 660 on Windows
2024-07-15 14:22:59 -07:00
Kubernetes Prow Robot
fe1840205c
Merge pull request #125926 from MadhavJivrajani/bump-staticcheck-exclude-SA1006
...
[go1.23] hack: bump go-tools and exclude SA1006
2024-07-15 10:05:19 -07:00
Madhav Jivrajani
c5481b0413
.*: fix lint errors
...
Fix SA4032 and SA3000 which are flagged after bumping to go1.23rc1
and v0.5.0-rc1 of go-tools.
Signed-off-by: Madhav Jivrajani <madhav.jiv@gmail.com >
2024-07-15 15:03:15 +05:30
Dan Winship
505f6833d9
Require kernel 5.13 for nftables kube-proxy
2024-07-01 10:07:27 -04:00
Antonio Ojea
f36975b193
remove iptree from tree
2024-06-27 11:33:36 +00:00
Kubernetes Prow Robot
eb6840928d
Merge pull request #124160 from Karthik-K-N/fix-buildconstraints
...
Add doc.go file without any buildconstraint to run tests on non linux platforms
2024-06-13 16:29:06 -07:00
Sascha Grunert
0c9949b6ec
Move pkg/kubelet/kuberuntime/logs to k8s.io/cri-client staging
...
Particulary helpful to decouple cri-tools from k/k.
Signed-off-by: Sascha Grunert <sgrunert@redhat.com >
2024-05-30 15:13:22 +02:00
Mauri de Souza Meneguzzo
b8e5a3ed32
pkg/util/coverage: update fakeTestDeps methods
...
Go 1.23 changed the signature of the testDeps interface so we need to
add a blank implementation for InitRuntimeCoverage to fakeTestDeps.
2024-05-29 12:31:22 -03:00
Mauri de Souza Meneguzzo
7fcaaa5585
util: add test case for WSL kernel version parsing
2024-05-26 18:40:10 -03:00
Itamar Holder
2a174d09fa
If the kernel version is at least 6.4, assume tmpfs noswap is supported
...
Signed-off-by: Itamar Holder <iholder@redhat.com >
2024-05-21 13:18:16 +03:00
Davanum Srinivas
8597b343fa
Enforce the Minimum Kernel Version 6.3 for UserNamespacesSupport feature
...
Signed-off-by: Davanum Srinivas <davanum@gmail.com >
2024-05-07 16:01:42 -04:00
Kubernetes Prow Robot
7f67cb5960
Merge pull request #123969 from liangyuanpeng/cleanup_rand
...
cleanup: delete rand.Seed(time.Now().UnixNano()) and using global number generator.
2024-04-18 02:10:26 -07:00
Maksym Pavlenko
be4b7176dc
Fix Abs path validation on Windows ( #124084 )
...
* Windows: Consider slash-prefixed paths as absolute
filepath.IsAbs does not consider "/" or "\" as absolute paths, even
though files can be addressed as such. [1][2]
Currently, there are some unit tests that are failing on Windows due to
this reason.
[1] https://learn.microsoft.com/en-us/dotnet/standard/io/file-path-formats#traditional-dos-paths
[2] https://learn.microsoft.com/en-us/windows/win32/fileio/naming-a-file#fully-qualified-vs-relative-paths
* Add test to verify IsAbs for windows
Signed-off-by: Maksym Pavlenko <pavlenko.maksym@gmail.com >
* Fix abs path validation on windows
Signed-off-by: Maksym Pavlenko <pavlenko.maksym@gmail.com >
* Skipp path clean check for podLogDir on windows
Signed-off-by: Maksym Pavlenko <pavlenko.maksym@gmail.com >
* Implement IsPathClean to validate path
Signed-off-by: Maksym Pavlenko <pavlenko.maksym@gmail.com >
* Add warn comment for IsAbs
Signed-off-by: Maksym Pavlenko <pavlenko.maksym@gmail.com >
---------
Signed-off-by: Maksym Pavlenko <pavlenko.maksym@gmail.com >
Co-authored-by: Claudiu Belu <cbelu@cloudbasesolutions.com >
2024-04-10 10:13:59 -07:00
Karthik K N
134e43c279
Add doc.go file without any buildconstraint to run tests on non linux systems
2024-04-03 12:30:59 +05:30
Lan Liang
dc992adad3
cleanup: delete rand.Seed(time.Now().UnixNano()) and using global number generator.
...
see https://tip.golang.org/doc/go1.20
Signed-off-by: Lan Liang <gcslyp@gmail.com >
2024-03-18 08:10:12 +00:00
Tim Hockin
6dbc754ed6
Retool typecheck to be simpler
...
Instead of walking paths ourselves, just let Go's packages library do
it. This is a slight CLI change - it wants "./foo" rather than "foo".
This also flagged a few things which seem to be legit failures.
2024-02-29 22:07:00 -08:00
Jordan Liggitt
5dc92ada06
Implement authz config file reloading
2024-02-14 18:09:15 -05:00
Tim Allclair
01155f59c3
Merge pkg/util/config into pkg/kubelet/config
2024-01-30 11:57:35 -08:00
Tim Allclair
049261aca1
Delete unused config utilities
2024-01-30 11:46:18 -08:00
Kubernetes Prow Robot
56ee53faf5
Merge pull request #110601 from claudiubelu/path-filepath-update
...
Replaces path.Operation with filepath.Operation
2024-01-29 06:49:26 -08:00
Claudiu Belu
c65d9e4d59
Replaces path.Operation with filepath.Operation
...
The path module has a few different functions:
Clean, Split, Join, Ext, Dir, Base, IsAbs. These functions do not
take into account the OS-specific path separator, meaning that they
won't behave as intended on Windows.
For example, Dir is supposed to return all but the last element of the
path. For the path "C:\some\dir\somewhere", it is supposed to return
"C:\some\dir\", however, it returns ".".
Instead of these functions, the ones in filepath should be used instead.
2024-01-15 20:35:13 +00:00
Dan Winship
c1ce1e00ee
Properly build-tag the Linux kube-proxy backend code
...
This had to be able to build on OS X before to make verify-typecheck
pass, but now that that's fixed we can tag the code properly as being
linux-only.
2023-12-18 20:20:51 -05:00
Kubernetes Prow Robot
b54e719509
Merge pull request #122111 from danwinship/proxy-chain-creation-cleanup
...
proxy chain creation cleanup
2023-12-14 06:17:40 +01:00
Kubernetes Prow Robot
d43e9a2654
Merge pull request #122093 from npolshakova/small-fix-getchainsfromtable
...
Fix error check in GetChainsFromTables
2023-12-14 06:17:31 +01:00
npolshakova
a82ee6d416
fix error check
2023-11-29 11:55:30 -05:00
Dan Winship
8acf185791
Use a generic Set for utiliptables.GetChainsFromTable
2023-11-29 11:12:27 -05:00
21kyu
fec63d5ea0
fix: use generic set in pkg/util/iptables
2023-11-08 15:21:59 +00:00
Antonio Ojea
d3386e171a
add iptree radix tree util
...
A radix tree is required to optimize operations with subnets and
IP addresses.
Change-Id: I9fecc291efd39bdd7403c9675c047d6dee6018d2
Change-Id: I72c7bd5920a42bf35305443450c4ba97f857c492
2023-10-31 21:05:04 +00:00
Daman Arora
a375aa28ee
pkg/proxy: move get kernel version out of ipvs proxier
...
Signed-off-by: Daman Arora <aroradaman@gmail.com >
2023-10-28 00:54:34 +05:30
Kubernetes Prow Robot
7824ac0f3e
Merge pull request #114336 from claudiubelu/fixes-test-get-file-type
...
unittests: Fixes hostutil.GetFileType for Windows
2023-10-17 20:07:39 +02:00
Akanksha Panse
38935b787e
Do not fail volume attach operation at kubelet if staging target path already exists on windows worker node.
2023-10-03 13:08:14 +05:30
Davanum Srinivas
fcff996909
adjust error message a bit
...
Signed-off-by: Davanum Srinivas <davanum@gmail.com >
2023-08-31 21:53:43 -04:00
Davanum Srinivas
889c8e919b
New repo who dis? distribution/reference
...
github.com/docker/distribution/reference has a new home github.com/distribution/reference
and a new tag v0.5.0. Let's switch to that.
Signed-off-by: Davanum Srinivas <davanum@gmail.com >
2023-08-31 21:53:40 -04:00
Kubernetes Prow Robot
b2042d6ce4
Merge pull request #118338 from aroradaman/mv-ipset
...
move pkg/util/ipset inside pkg/proxy/ipvs
2023-06-09 08:14:24 -07:00
TommyStarK
1fcfd1d509
pkg/util/iptables: use buf.String() instead of string(buf.Bytes())
...
Signed-off-by: TommyStarK <thomasmilox@gmail.com >
2023-06-05 19:47:47 +02:00
Claudiu Belu
b4d1440063
unittests: Fixes hostutil.GetFileType for Windows
...
GetFileType is meant to return the type of the given file by using os.Stat.
However, os.Stat doesn't work on Windows for Unix Sockets, causing an error to occur:
[2-Socket Test] unexpected error :
CreateFile C:\Users\Administrator\AppData\Local\Temp\test-get-filetype-2776877299\mt.sock:
The file cannot be accessed by the system.
This is a known issue and we're already using a workaround for this in
pkg/kubelet/util/util_windows.go.
This commit fixes this issue for GetFileType on Windows.
2023-06-01 16:02:07 +00:00
Daman Arora
2d8c820741
move pkg/util/ipset inside pkg/proxy/ipvs
...
Signed-off-by: Daman Arora <aroradaman@gmail.com >
2023-05-31 00:30:20 +05:30
Lars Ekman
4aa5441de2
Move pkg/util/ipvs inside pkg/proxy/ipvs
...
Ipvs will never be used by any other component within K8s than
the proxy/ipvs
Signed-off-by: Lars Ekman <uablrek@gmail.com >
2023-05-27 18:37:50 +02:00
Daman Arora
c68f858658
proxy/ipvs: github user name change: daman1807 -> aroradaman
...
Signed-off-by: Daman Arora <aroradaman@gmail.com >
2023-05-24 16:00:20 +05:30
kannon92
0819d34204
using parsers in applyDefaultImageTag
2023-05-15 15:53:47 +00:00
Daman Arora
a0133b7cc4
proxy/ipvs: added daman1807 as reviewer
...
Signed-off-by: Daman Arora <aroradaman@gmail.com >
2023-05-14 16:29:43 +05:30
Kubernetes Prow Robot
a2e2df61a1
Merge pull request #117198 from charles-chenzz/deprecated_function
...
replace ioutil with os, update doc in kubelet
2023-05-02 08:18:14 -07:00
Kubernetes Prow Robot
8353d4623b
Merge pull request #117427 from cbandy/pkg-testing-setenv
...
Replace os.Setenv with testing.T.Setenv in tests
2023-04-29 08:28:16 -07:00
Chris Bandy
d38ac7e7c6
Replace os.Setenv with testing.T.Setenv in tests
...
T.Setenv ensures that the environment is returned to its prior state
when the test ends. It also panics when called from a parallel test to
prevent racy test interdependencies.
2023-04-17 20:39:46 -05:00
Daman
efb0563094
proxy/conntrack: moved pkg/util/conntrack -> pkg/proxy/conntrack
2023-04-16 15:52:52 +05:30
charles-chenzz
ccf7ddacfc
replace ioutil with os, update doc
2023-04-13 09:02:46 +08:00
Kubernetes Prow Robot
dcf3792310
Merge pull request #116730 from danwinship/network-owners
...
sig-network OWNERS fixups
2023-04-11 18:19:44 -07:00
Kubernetes Prow Robot
d0fc9d16ce
Merge pull request #114800 from haoruan/feature-8976-spew-sprintf-refactor
...
Capture spew.Sprintf() with all our favorite config into a util func
2023-04-11 15:34:57 -07:00