Kubernetes Prow Robot
47dbade7f4
Merge pull request #130245 from marosset/windows-unit-tests-pkg-util-filesystem-fixes
...
Fixing k8s.io/kubernetes/pkg/util/filesystem unit tests for Windows
2025-03-03 16:59:41 -08:00
Mark Rossetti
5eb37b073c
Fixing k8s.io/kubernetes/pkg/util/filesystem unit tests for Windows
...
Signed-off-by: Mark Rossetti <marosset@microsoft.com >
2025-02-27 13:50:24 -08:00
mansikulkarni96
dfc8b271cf
[kubelet] Make use of os.ModeSocket info
2025-02-21 18:02:25 -05:00
Kubernetes Prow Robot
b84cb65f93
Merge pull request #129370 from andyzhangx/adopt-go1.23-behavior-change
...
fix: adopt go1.23 behavior change in mount point parsing on Windows#2
2025-02-21 12:50:26 -08:00
andyzhangx
bb49a05fb5
fix: adopt go1.23 behavior change in mount point parsing on Windows
...
fix comments
2025-02-18 07:17:51 +00:00
Tim Allclair
a7340ff36c
[windows] Don't chown existing directory in MkdirAll
2024-12-16 14:10:56 -08: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
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
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
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
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
charles-chenzz
ccf7ddacfc
replace ioutil with os, update doc
2023-04-13 09:02:46 +08:00
saltbo
cc90e819bc
refactor: replace the ioutil by the os and io
...
Signed-off-by: saltbo <saltbo@foxmail.com >
2022-10-20 15:13:28 +08:00
Davanum Srinivas
5feff280e1
remove fakefs to drop spf13/afero dependency
...
Signed-off-by: Davanum Srinivas <davanum@gmail.com >
2021-06-24 09:51:34 -04:00
Benjamin Elder
56e092e382
hack/update-bazel.sh
2021-02-28 15:17:29 -08:00
Michael Taufen
c9d398d01e
unpack dynamic kubelet config payloads to files
...
This PR unpacks the downloaded ConfigMap to a set of files on the node.
This enables other config files to ride alongside the
KubeletConfiguration, and the KubeletConfiguration to refer to these
cohabitants with relative paths.
This PR also stops storing dynamic config metadata (e.g. current,
last-known-good config records) in the same directory as config
checkpoints. Instead, it splits the storage into `meta` and
`checkpoints` dirs.
2018-04-19 09:18:53 -07:00
Jeff Grafton
aee5f457db
update BUILD files
2017-10-15 18:18:13 -07:00
Michael Taufen
62fecfb0f4
Fix a potential file leak
...
Previously, if a write or sync error occurred, we would not have called
Close(). This commit refactors ReplaceFile() so that we are sure to call
Close(), and also attempts to delete the temporary file if errors occur.
2017-09-25 20:45:52 -07:00
Michael Taufen
47beb80368
fsync config checkpoint files after writing
2017-09-07 14:42:18 -07:00
Cheng Xing
52a77aaccd
Added basic Flexvolume dynamic plugin discovery e2e test; added Flexvolume prober unit tests.
2017-08-31 16:50:02 -07:00
Cheng Xing
fde9541c80
Moving filesystem mock to pkg/util, and added some functionality
2017-08-28 11:33:26 -07:00