Kubernetes Prow Robot
232c0de57a
Merge pull request #115101 from HirazawaUi/delte-pkg-kubelet-unused-functions
...
delete unused functions in pkg/kubelet directory
2023-01-29 17:21:08 -08:00
Tim Hockin
60ffa47f4f
Set proto go_package: kubelet example_plugin_apis
...
This creates some diff to the *.pb.go files to note that
in the "options".
You can dump the gzipped blob with the following program (thanks
StackOverflow!):
```go
package main
import (
"bytes"
"compress/gzip"
"encoding/json"
"fmt"
"os"
"io/ioutil"
proto "github.com/golang/protobuf/proto"
dpb "github.com/golang/protobuf/protoc-gen-go/descriptor"
)
func main() {
m := map[string][]byte{
"before": blobv1,
"after": blobv2,
}
arg := os.Args[1]
dump(m[arg])
}
func dump(bytes []byte) {
fd, err := decodeFileDesc(bytes)
if err != nil {
panic(err)
}
b, err := json.MarshalIndent(fd, "", " ")
if err != nil {
panic(err)
}
fmt.Println(string(b))
}
// decompress does gzip decompression.
func decompress(b []byte) ([]byte, error) {
r, err := gzip.NewReader(bytes.NewReader(b))
if err != nil {
return nil, fmt.Errorf("bad gzipped descriptor: %v", err)
}
out, err := ioutil.ReadAll(r)
if err != nil {
return nil, fmt.Errorf("bad gzipped descriptor: %v", err)
}
return out, nil
}
func decodeFileDesc(enc []byte) (*dpb.FileDescriptorProto, error) {
raw, err := decompress(enc)
if err != nil {
return nil, fmt.Errorf("failed to decompress enc: %v", err)
}
fd := new(dpb.FileDescriptorProto)
if err := proto.Unmarshal(raw, fd); err != nil {
return nil, fmt.Errorf("bad descriptor: %v", err)
}
return fd, nil
}
```
2023-01-23 09:31:18 -08:00
HirazawaUi
a8173eded3
delete unused functions in pkg/kubelet directory
2023-01-16 20:00:49 +08:00
sorkinl
71d44a9348
Refactors kubelet's plugin watcher
...
Refactors platform specific code into separate files (*_linux.go / *_windows.go / *_others.go)
Adds unit tests for the pluginwatcher changes.
2023-01-01 00:26:37 +00:00
Claudiu Belu
9f95b7b18c
unittests: Fixes unit tests for Windows (part 3)
...
Currently, there are some unit tests that are failing on Windows due to
various reasons:
- paths not properly joined (filepath.Join should be used).
- Proxy Mode IPVS not supported on Windows.
- DeadlineExceeded can occur when trying to read data from an UDP
socket. This can be used to detect whether the port was closed or not.
- In Windows, with long file name support enabled, file names can have
up to 32,767 characters. In this case, the error
windows.ERROR_FILENAME_EXCED_RANGE will be encountered instead.
- files not closed, which means that they cannot be removed / renamed.
- time.Now() is not as precise on Windows, which means that 2
consecutive calls may return the same timestamp.
- path.Base() will return the same path. filepath.Base() should be used
instead.
- path.Join() will always join the paths with a / instead of the OS
specific separator. filepath.Join() should be used instead.
2022-10-21 19:25:48 +03:00
Paco Xu
2ce7a81169
fsnotify: use event.Has instead of "event.Op&h == h"
2022-10-13 13:42:26 +08:00
inosato
3b95d3b076
Remove ioutil in kubelet and its tests
...
Signed-off-by: inosato <si17_21@yahoo.co.jp>
2022-07-30 12:35:26 +09:00
Kubernetes Prow Robot
25cdaccf0d
Merge pull request #111439 from claudiubelu/fix-plugin-watcher
...
kubelet: Fixes plugin Watcher for Windows
2022-07-29 19:29:44 -07:00
Claudiu Belu
f567b85cc4
kubelet: Fixes plugin Watcher for Windows
...
Currently, the plugin Watcher checks if a file is a socket or not by
running mode&os.ModeSocket != 0, which can't be True on Windows.
util.IsUnixDomainSocket should be used instead.
2022-07-26 18:45:10 +03:00
Mikko Ylinen
2c8bfad910
grpc: move to use grpc.WithTransportCredentials()
...
v1.43.0 marked grpc.WithInsecure() deprecated so this commit moves to use
what is the recommended replacement:
grpc.WithTransportCredentials(insecure.NewCredentials())
Signed-off-by: Mikko Ylinen <mikko.ylinen@intel.com>
2022-05-30 21:41:47 +03:00
qingwave
f405c797ff
migrate pkg/kubelet/pluginmanager to structured logging
2021-03-10 15:44:16 +08:00
Jing Xu
d669cb1b17
Fix issue in checking domain socket for plugin watcher
...
Due to recent os.Stat() issue for Windows 20H2, added the logic to use
os.Lstat() if os.Stat() fails for Windows
Change-Id: Ic9fc07ecc6e9c2984e854ac77121ff61c8e0d041
2021-03-03 12:37:14 -08:00
Kubernetes Prow Robot
e811f5fdf9
Merge pull request #99463 from jingxu97/feb/stat
...
Use Lstat in plugin watcher to avoid Windows problem
2021-03-02 14:47:19 -08:00
Benjamin Elder
56e092e382
hack/update-bazel.sh
2021-02-28 15:17:29 -08:00
Jing Xu
70e01c5e47
Use Lstat in plugin watcher to avoid Windows problem
...
User Lstat in plugin watcher due to Windows issue
Change-Id: I4f9b808829f1a56dc622e343c291d3ffc316f416
2021-02-25 08:45:27 -08:00
Nabarun Pal
9cada2ec3b
update gogo/protobuf to v1.3.2
...
gogo/protobuf@v1.3.2 fixes https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2021-3121
Ref: https://github.com/kubernetes/client-go/issues/927
Signed-off-by: Nabarun Pal <pal.nabarun95@gmail.com>
2021-01-27 22:07:32 +05:30
David Ashpole
296f7c91bb
consistently use double quotes in proto files
2020-09-03 13:50:03 -07:00
knight42
de46e81e74
fix(pluginwatcher): watch socket dir before traversing it
...
Signed-off-by: knight42 <anonymousknight96@gmail.com>
2020-08-14 12:07:04 +08:00
Davanum Srinivas
07d88617e5
Run hack/update-vendor.sh
...
Signed-off-by: Davanum Srinivas <davanum@gmail.com>
2020-05-16 07:54:33 -04:00
Davanum Srinivas
442a69c3bd
switch over k/k to use klog v2
...
Signed-off-by: Davanum Srinivas <davanum@gmail.com>
2020-05-16 07:54:27 -04:00
mattjmcnaughton
ccf488fe11
Delete TODO around implementing rate limiting to protect against DOS
...
From discussions in https://github.com/kubernetes/kubernetes/pull/83784 ,
it appears there actually isn't a ton of risk around a DOS. Delete the
TODO.
2020-02-18 08:24:25 -05:00
Mike Danese
2637772298
some manual fixes
2020-02-07 18:17:40 -08:00
Davanum Srinivas
b3853138a4
update generated files
2020-01-17 11:23:53 -05:00
danielqsj
19fe9f8d94
replace grpc.WithDialer which is deprecated
2019-12-26 17:46:59 +08:00
David Zhu
802fe12803
Remove plugin watching of deprecated directory {kubelet_root_dir}/plugins and support for CSI V0 in accordance with deprecation announcement in https://v1-13.docs.kubernetes.io/docs/setup/release/notes/
2019-11-11 11:42:58 -08:00
Davanum Srinivas
6ecc0f83af
update bazel BUILD files
...
Change-Id: Ia3917cec1453c0b22a958faf8c22bccd79242d14
2019-10-06 15:29:23 -04:00
Davanum Srinivas
d30c489c54
Move pkg/kubelet/pluginregistration and deviceplugin
...
Change-Id: I06adcb43bd278b430ffad2010869e1524c8cc4ff
2019-10-06 15:28:38 -04:00
hwdef
4e7ef9ad36
delete unused var
2019-09-19 18:04:13 +08:00
Kubernetes Prow Robot
08b67378d3
Merge pull request #81397 from ddebroy/win-socket
...
Support Kubelet PluginWatcher in Windows
2019-08-28 01:37:12 -07:00
Deep Debroy
1321c9115b
Support PluginWatcher in Windows
...
Signed-off-by: Deep Debroy <ddebroy@docker.com>
2019-08-27 16:24:38 -07:00
Tim Allclair
8a495cb5e4
Clean up error messages (ST1005)
2019-08-21 10:40:21 -07:00
Tim Allclair
6510d26b6a
Fix misc static check issues
2019-08-21 10:40:21 -07:00
Tim Allclair
3f510c69f6
Remove dead code from pkg/kubelet/...
2019-08-21 10:40:21 -07:00
Antoine Pelisse
6568325ca2
Regenerate
2019-07-25 11:54:00 -07:00
Vallery Lancey
fe59ee8aaf
Updated github.com/gogo/protobuf from SHA to nearest-pinnable tag (v1.0.0), as part of dependency management cleanup: #79234
2019-07-02 21:44:06 -07:00
caiweidong
017aad3b60
Remove returned value of func handleCreateEvent
2019-06-14 15:27:59 +08:00
Tara Gu
5e18554442
Implement plugin manager - a controller that manages plugin registration/unregistration
2019-05-30 19:00:59 -04:00