Commit Graph

3736 Commits

Author SHA1 Message Date
Kubernetes Prow Robot
f139450e9b
Merge pull request #122885 from claudiubelu/unittests-10
unittests: Fixes unit tests for Windows (part 10)
2024-02-28 05:38:40 -08:00
Jan Safranek
d7028a8ed5 Add SELinuxMount feature gate
The feature gate enables mounting with -o context=XYZ mount option for all
volume types, not only ReadWriteOncePod.

All SELinux label tracking & error reporting infrastructure is already in
place from SELinuxMountReadWriteOncePod feature gate. This is just a
trivial extension to all access modes.
2024-02-20 15:40:21 +01:00
cpanato
ac9482d15f
update distroless-iptables to v0.5.0 debian-base to bookworm-v1.0.1 and setcap to bookworm-v1.0.1
Signed-off-by: cpanato <ctadeu@gmail.com>
2024-02-07 11:46:19 +01:00
Kubernetes Prow Robot
2c5105e7b8
Merge pull request #123032 from carlory/fix-122960
fix GenerateUnmapVolumeFunc missing globalUnmapPath
2024-02-02 05:39:03 -08:00
Hemant Kumar
d190fa3e7d Fix race condition between external-resizer and kubelet
This fixes the race condition that could happen because
resize controller just finished volume expansiona and has only
finished marking PV and yet to mark PVC.

The workaround proposed here should not be necessary once
RecoverVolumeExpansionFailure goes GA/beta.
2024-01-31 12:23:56 -05:00
Kubernetes Prow Robot
c5de44f9a4
Merge pull request #121978 from carlory/fix-101332
Remove deprecated comment about cleanup the target_path of CSI volumes
2024-01-30 15:27:59 -08:00
Kubernetes Prow Robot
fedb5842e5
Merge pull request #122807 from carlory/fix-121472
Fix AtomicWriter may not create user visible files after kubelet was restarted
2024-01-30 04:19:26 -08:00
carlory
e198938671 Remove deprecated comment about cleanup the target_path of CSI volumes 2024-01-30 18:47:59 +08:00
carlory
77fed9d2b7 fix GenerateUnmapVolumeFunc missing globalUnmapPath when kubelet tries to clean up all volumes that failed reconstruction. 2024-01-30 17:29:54 +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
Kubernetes Prow Robot
bb3030bf0e
Merge pull request #121995 from carlory/fix-getDeviceNameFromMount
fix incorrect getDeviceNameFromMount comment
2024-01-29 05:40:53 -08:00
carlory
35004e8f77 Fix AtomicWriter may not create user visible files after kubelet was restarted 2024-01-23 22:14:40 +08:00
Claudiu Belu
b8df7e7684 unittests: Fixes unit tests for Windows (part 10)
Currently, there are some unit tests that are failing on
Windows due to various reasons:

- Different "File not found" error messages on Windows.
- Files need to be closed on Windows before removing them.
- The default RootHnsEndpointName (root-hnsendpoint-name) flag value is 'cbr0'
- On Windows, Unix Domain sockets are not checked in the same way in golang, which is why
  hostutils_windows.go checks for it differently. GetFileType will return an error in this
  case. We need to check for it, and see if it's actually a Unix Domain Socket.
2024-01-22 13:43:42 +00:00
Kubernetes Prow Robot
909faa3a9b
Merge pull request #116627 from claudiubelu/unittests-8
unittests: Fixes unit tests for Windows (part 8)
2024-01-17 05:43:54 +01: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
Kubernetes Prow Robot
d39f401767
Merge pull request #122090 from carlory/remove-intree-vsphere
remove the deprecated in-tree vsphere volume's code
2024-01-05 16:52:22 +01:00
Kubernetes Prow Robot
d250588077
Merge pull request #121825 from carlory/clean-113
remove duplicated check in operator_generator.go
2024-01-05 16:52:13 +01:00
Kubernetes Prow Robot
692be54671
Merge pull request #122508 from carlory/fix-122337
remove wrong warning event (FileSystemResizeFailed) for pod
2024-01-04 14:42:49 +01:00
carlory
55e1646fa4 removed the deprecated azureFile in-tree storage plugin 2024-01-04 14:41:33 +08:00
Kubernetes Prow Robot
7a8aa1b533
Merge pull request #118391 from testwill/downwardapi
chore: io/ioutil deprecated
2023-12-29 00:52:25 +01:00
carlory
5607349e39 remove wrong warning event (FileSystemResizeFailed) during a pod creation when it uses a readonly volume. 2023-12-28 17:49:02 +08:00
Kubernetes Prow Robot
55f1e21fdc
Merge pull request #122341 from jsafrane/fix-vsphere-migration
Fix CSI migration for vSphere volumes
2023-12-15 18:33:14 +01:00
Jan Safranek
15e0c41601 Fix CSI migration for vSphere volumes
Restore `migratedPlugins` entry for in-tree vSphere volumes and mark them
as migrated. Otherwise the CSI volume plugin ignores in-tree vSphere
volumes and they will never get attached / mounted by CSI migration.

The entry in `migratedPlugins` was incorrectly removed during
CSIMigrationvSphere feature gate removal.
2023-12-15 13:03:35 +01:00
Hemant Kumar
e706b6ba14 Use a separate function for checking if device was reconstructed 2023-12-14 11:37:47 -05:00
Hemant Kumar
56dd5ab10f Add tests for checking of uncertain device paths 2023-12-11 17:15:16 -05:00
Hemant Kumar
ed0facacfa Fix device uncertain errors on reboot 2023-12-06 22:19:14 -05:00
carlory
5e7c4c245b remove the deprecated in-tree vsphere volume's code 2023-11-28 21:47:35 +08:00
Claudiu Belu
f7aca72155 unittests: Fixes unit tests for Windows (part 8)
Currently, there are some unit tests that are failing on Windows due to
various reasons:

- flexvolume coverts its paths to absolute paths, which means that on Windows the C:\ prefix
  will be added. This becomes an issue when prober.fs.Walk is called, which will join 2 absolute
  paths, both containing the C:\ prefix, resulting in an incorrect path.
2023-11-28 11:14:00 +00:00
carlory
c494e8b18e fix incorrect getDeviceNameFromMount comment 2023-11-23 16:36:44 +08:00
carlory
407b9d9610 remove duplicated check in operator_generator.go 2023-11-09 15:38:49 +08:00
Taahir Ahmed
1ebe5774d0 kubelet: Support ClusterTrustBundlePEM projections 2023-11-03 11:40:48 -07:00
Humble Chirammal
3890546265 Update APIs and adjust tests
Signed-off-by: zhucan <zhucan.k8s@gmail.com>
Signed-off-by: Humble Chirammal <humble.devassy@gmail.com>
2023-11-01 09:28:36 +05:30
carlory
ae90a69677 volumeattributesclass and core api changes 2023-10-31 11:18:56 +08:00
Kubernetes Prow Robot
0501933e56
Merge pull request #121291 from bzsuni/ga/CSIMigrationvSphere
Remove GA featuregate about CSIMigrationvSphere in 1.29
2023-10-26 01:08:06 +02:00
Chris Henzie
2dbd405583 Graduate ReadWriteOncePod to GA 2023-10-20 10:40:39 -07: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
bzsuni
7561284819 Remove GA featuregate about CSIMigrationvSphere in 1.29
Signed-off-by: bzsuni <bingzhe.sun@daocloud.io>
2023-10-17 20:44:50 +08:00
Kubernetes Prow Robot
d3559bf77f
Merge pull request #120595 from jsafrane/fix-detach-uncertain
Mark a volume as uncertain-attached after detach error
2023-10-08 05:54:01 +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
Kubernetes Prow Robot
12dc19d46f
Merge pull request #119393 from saschagrunert/debian-base
Update debian-base for test images and others
2023-09-19 00:48:55 -07:00
Kubernetes Prow Robot
f9f00da6bc
Merge pull request #118761 from TommyStarK/gh_113831
move common logic of highestSupportedVersion to util package
2023-09-18 13:59:25 -07:00
TommyStarK
42356bfbb3
move common logic of highestSupportedVersion to util package
Signed-off-by: TommyStarK <thomasmilox@gmail.com>
2023-09-18 21:25:29 +02:00
Jan Safranek
7fc11f47ff Mark a volume as uncertain-attached after detach error
Volume that failed Detach() should not be marked as attached, CSI
external-attacher is probably still trying to detach it.

Mark it uncertain instead and wait for Detach() to succeed.
2023-09-13 10:03:28 +02:00
Rohit Singh
61ecc2ad88 Retry operations if CSI Driver Isn't Found by Treating this Error as Transient 2023-09-11 06:07:40 +00:00
Kubernetes Prow Robot
42357dd257
Merge pull request #120128 from ritazh/format-mount
Use environment variables for parameters in Powershell
2023-08-23 10:40:01 -07:00
James Sturtevant
2bede058f9
Use environment varaibles for parameters in Powershell
As a defense in depth, pass parameters to powershell via environment variables.

Signed-off-by: James Sturtevant <jstur@microsoft.com>
2023-08-23 05:57:46 -07:00
James Sturtevant
c761c16562
Use env varaibles for passing path
The subpath could be passed a powershell subexpression which would be executed by kubelet with privilege.  Switching to pass the arguments via environment variables means the subexpression won't be evaluated.

Signed-off-by: James Sturtevant <jstur@microsoft.com>
2023-08-23 05:57:11 -07:00
Kubernetes Prow Robot
9aba98ad71
Merge pull request #119948 from liyuerich/storageclass
add UT for storageclass
2023-08-22 10:03:06 -07:00
Patrick Ohly
2472291790 api: introduce separate VolumeResourceRequirements struct
PVC and containers shared the same ResourceRequirements struct to define their
API. When resource claims were added, that struct got extended, which
accidentally also changed the PVC API. To avoid such a mistake from happening
again, PVC now uses its own VolumeResourceRequirements struct.

The `Claims` field gets removed because risk of breaking someone is low:
theoretically, YAML files which have a claims field for volumes now
get rejected when validating against the OpenAPI. Such files
have never made sense and should be fixed.

Code that uses the struct definitions needs to be updated.
2023-08-21 15:31:28 +02:00
liyuerich
a6a1f070e7 Signed-off-by: liyuerich <yue.li@daocloud.io>
add UT for storageclass
2023-08-18 22:18:11 +08:00