zhoumingcheng
8dfb7af374
update unit test for pkg/util/node
...
Remove duplicate testcases for func TestGetNodeHostIPs
Signed-off-by: zhoumingcheng <zhoumingcheng@beyondcent.com >
2022-06-28 17:40:04 +08:00
zhoumingcheng
540ec51196
add unit test coverage for pkg/util/node
...
Signed-off-by: zhoumingcheng <zhoumingcheng@beyondcent.com >
2022-06-28 16:07:30 +08:00
21kyu
df168d5b5c
Change reflect.Ptr to reflect.Pointer
2022-06-26 01:23:43 +09:00
Lars Ekman
c1e5a9e6f0
Prevent host access on VIP addresses in proxy-mode=ipvs
2022-06-24 08:33:58 +02:00
Kubernetes Prow Robot
dc4e91a875
Merge pull request #109844 from danwinship/iptables-tests-new
...
improve parsing in iptables unit tests
2022-06-10 14:27:44 -07:00
Dan Winship
913f4bc0ba
pkg/util/iptables/testing: Fix FakeIPTables
...
FakeIPTables barely implemented any of the iptables interface, and the
main part that it did implement, it implemented incorrectly. Fix it:
- Implement EnsureChain, DeleteChain, EnsureRule, and DeleteRule, not
just SaveInto/Restore/RestoreAll.
- Restore/RestoreAll now correctly merge the provided state with the
existing state, rather than simply overwriting it.
- SaveInto now returns the table that was requested, rather than just
echoing back the Restore/RestoreAll.
2022-05-09 11:29:08 -04:00
Dan Winship
10a72a9e03
pkg/util/iptables/testing: Add IPTables dump-parsing helpers
2022-05-09 11:29:06 -04:00
Dan Winship
f2fa1033d0
pkg/util/iptables/testing: Add better IPTables rule-parsing helpers
...
There were previously some strange iptables-rule-parsing functions
that were only used by two unit tests in pkg/proxy/ipvs. Get rid of
them and replace them with some much better iptables-rule-parsing
functions.
2022-05-09 11:19:26 -04:00
Benjamin Elder
830456e027
correct coverage MainStart argument order
2022-05-05 14:00:21 -07:00
Benjamin Elder
5d8f6f1213
fix e2e coverage package for go 1.18
2022-04-27 10:05:51 -07:00
Ashutosh Kumar
c00975370a
Handle Non-graceful Node Shutdown ( #108486 )
...
Signed-off-by: Ashutosh Kumar <sonasingh46@gmail.com >
Co-authored-by: Ashutosh Kumar <sonasingh46@gmail.com >
Co-authored-by: xing-yang <xingyang105@gmail.com >
2022-03-26 09:23:21 -07:00
Carlos Eduardo Arango Gutierrez
a435ad33f4
Cleanup: pkg/util/ipset
...
Signed-off-by: Carlos Eduardo Arango Gutierrez <carangog@redhat.com >
2022-03-25 14:14:17 -04:00
Kubernetes Prow Robot
cbf4186a57
Merge pull request #108452 from HirazawaUi/master
...
show error details removing or adding ipset entry
2022-03-20 16:31:12 -07:00
Kubernetes Prow Robot
54ee338758
Merge pull request #108351 from mengjiao-liu/fix_ipset_test
...
Fix incorrect test cases to cover code that needs to be tested in `TestValidateIPSet`
2022-03-18 15:01:56 -07:00
Mengjiao Liu
63f600eef4
Improve unit test coverage and readability in pkg/util/netsh/
2022-03-11 17:04:39 +08:00
HirazawaUi
279fd9abe8
After adding or deleting an ipset entry error, the cause of the error will be displayed
2022-03-02 21:51:20 +08:00
Kubernetes Prow Robot
2de37aa9fa
Merge pull request #108276 from AllenZMC/improve_util_test_coverage
...
improve test coverage
2022-03-01 16:57:13 -08:00
Mengjiao Liu
63667626d9
Fix incorrect test cases to cover code that needs to be tested in TestValidateIPSet
2022-02-25 16:01:37 +08:00
czm
f31bf3ff12
improve test coverage
2022-02-22 23:04:44 +08:00
Dan Winship
4af471f8be
proxy/iptables: move GetChainLines unit tests to the right package
...
GetChainLines is a utiliptables method, so it should be part of the
unit tests there.
2022-02-21 09:16:22 -05:00
Kubernetes Prow Robot
1659924a97
Merge pull request #108070 from jsafrane/remove-selinux
...
Remove util/selinux package
2022-02-11 18:19:47 -08:00
Jan Safranek
77aa06d0c8
Remove util/selinux package
...
The package says:
> the libcontainer SELinux package is only built for Linux, so it is
> necessary to have a NOP wrapper which is built for non-Linux platforms
This is not true, Kubernetes now imports
github.com/opencontainers/selinux/go-selinux and it has proper
multiplatform support (i.e. NOOP on non-Linux platforms).
Removing the whole package and calling go-selinux directly.
2022-02-11 15:20:35 +01:00
Mengjiao Liu
bc55118b5b
Improve test coverage: add unit tests TestReadAtMost
in pkg/util/tail
2022-02-11 10:20:42 +08:00
Kubernetes Prow Robot
f90267f062
Merge pull request #106840 from Nordix/multi-numa
...
ReservedMemory Configuration for NUMA
2022-01-27 06:46:25 -08:00
Kubernetes Prow Robot
3bd422dc76
Merge pull request #107293 from dims/jan-1-owners-cleanup
...
Cleanup OWNERS files - Jan 2021 Week 1
2022-01-13 10:30:30 -08:00
Kubernetes Prow Robot
a0dfd958d5
Merge pull request #107163 from cyclinder/fix_leak_goroutine
...
fix goroutine leaks in TestConfigurationChannels
2022-01-10 17:23:16 -08:00
Davanum Srinivas
9682b7248f
OWNERS cleanup - Jan 2021 Week 1
...
Signed-off-by: Davanum Srinivas <davanum@gmail.com >
2022-01-10 08:14:29 -05:00
cyclinder
928e686877
fix goroutine leaks in TestConfigurationChannels
...
Signed-off-by: cyclinder <qifeng.guo@daocloud.io >
2022-01-10 19:51:16 +08:00
Kubernetes Prow Robot
098b0e05d1
Merge pull request #107001 from mk46/unix_lib
...
replace syscall with sys/unix pkg in pkg/util/ipvs
2022-01-05 13:54:13 -08:00
Kubernetes Prow Robot
0fc6edeb1d
Merge pull request #106847 from cyclinder/log_the_payload
...
kube-proxy should log the payload when iptables-restore fails
2021-12-23 17:24:14 -08:00
cyclinder
97bd6e977d
kube-proxy should log the payload when iptables-restore fails
...
Signed-off-by: cyclinder <qifeng.guo@daocloud.io >
2021-12-23 09:50:56 +08:00
songlh
8cceaa051d
apply gofmt
2021-12-17 17:35:09 -05:00
songlh
d4f3dde804
time -> timer
2021-12-17 16:03:46 -05:00
songlh
a108393b8c
add spaces to comments
2021-12-17 15:41:34 -05:00
songlh
8886e58ae9
add comments to the fix
2021-12-17 15:22:27 -05:00
songlh
ed1823a6c2
fixing three goroutine leaks in bounded_frequency_runner_test.go
2021-12-16 23:31:11 -05:00
Davanum Srinivas
497e9c1971
Cleanup OWNERS files (No Activity in the last year)
...
Signed-off-by: Davanum Srinivas <davanum@gmail.com >
2021-12-15 10:34:02 -05:00
Ravindra Thakur
a1f73cc247
ReservedMemory Configuration for NUMA
...
Kubelet throws error when multiple numa nodes are specified for memory
reservation. This is due to "," being used as separator for different
memory types within same numa node as well as for different numa nodes.
This PR fixes the error by using ";" as the separator for
specifying multiple numa node configuration.
Signed-off-by: Ravindra Thakur <ravindra.nath.thakur@est.tech >
2021-12-14 16:15:23 +05:30
Manish Kumar
0a013e9a79
replace syscall with sys/unix pkg in pkg/util/ipvs
2021-12-14 00:09:02 +05:30
Davanum Srinivas
9405e9b55e
Check in OWNERS modified by update-yamlfmt.sh
...
Signed-off-by: Davanum Srinivas <davanum@gmail.com >
2021-12-09 21:31:26 -05:00
Kubernetes Prow Robot
b8c1b38261
Merge pull request #106406 from cyclinder/remove_DeleteChain_TODO
...
kube-proxy remove todo: call iptables -S first when delete chain
2021-12-07 17:26:56 -08:00
Antonio Ojea
d126b14838
migrate nolint coments to golangci-lint
2021-11-17 13:58:53 +01:00
Hanna Lee
30ea05ae7b
Update IPVar and IPPortVar functions to have pointer receivers to fix 'ineffective assignment'
2021-11-17 08:56:00 +01:00
cyclinder
d8a801a7a2
kube-proxy remove todo: call iptables -S first when delete chain
...
Signed-off-by: cyclinder <qifeng.guo@daocloud.io >
2021-11-17 10:12:57 +08:00
caozhiyuan
bad4faf1b9
migrate --register-with-taints to KubeletConfiguration
2021-11-16 19:10:36 +08:00
Neha Lohia
fa1b6765d5
move pkg/util/node to component-helpers/node/util ( #105347 )
...
Signed-off-by: Neha Lohia <nehapithadiya444@gmail.com >
2021-11-12 07:52:27 -08:00
Kubernetes Prow Robot
c98b388a84
Merge pull request #105450 from danwinship/ipvs-dead-code
...
Remove some dead code in the ipvs proxy
2021-11-11 20:50:27 -08:00
ravisantoshgudimetla
02c1bac0b6
[kubelet]: Sync label periodically
2021-11-05 18:47:43 -04:00
ml
a2441a256b
fix multiple typos
2021-10-29 21:43:52 +02:00
Dan Winship
508d574921
Remove some dead code in the ipvs proxy
2021-10-04 09:04:35 -04:00