Jan Safranek
f9c7ce5b9c
Add unit tests for DesiredStateOfWorldPopulator
2022-08-04 10:51:59 +02:00
Jan Safranek
260912490e
Add a coment about handling same volumes with different contexts
2022-08-04 10:51:56 +02:00
Jan Safranek
a01e720a1a
Rename IsRWOP
...
To be able to update content of the function to other access modes when we
implement SELinux mount for more of them.
2022-08-04 10:51:54 +02:00
Jan Safranek
1490d51028
Remove noisy log
...
The error would be logged every reconciler sync (100 ms).
2022-08-04 10:51:53 +02:00
Jan Safranek
0793ecee3a
Add unit tests for ASW.AddPodToVolume
2022-08-04 10:51:52 +02:00
Jan Safranek
17d850ee0e
Add interface for SELinuxOptionsToFileLabel
...
github.com/opencontainers/selinux/go-selinux needs OS that supports SELinux
and SELinux enabled in it to return useful data, therefore add an interface
in front of it, so we can mock its behavior in unit tests.
2022-08-04 10:51:51 +02:00
Jan Safranek
d9f792633d
Add AddPodToVolume unit tests with SELinux
2022-08-04 10:51:50 +02:00
Jan Safranek
8d6b721ddd
Extract SELinux context error handling into a common func
...
Add handlerSELinuxMetricError() which bumps the right metric + either
consumes a SELinux error or lets it propagate up the stack.
2022-08-04 10:51:48 +02:00
Jan Safranek
49148ddfd0
Extract getSELinuxLabel from AddPodToVolume
...
To keep the function smaller.
2022-08-04 10:51:46 +02:00
Jan Safranek
de7f5b66ed
Fix existing unit tests
2022-08-04 10:51:44 +02:00
Jan Safranek
b2e18c0b20
Add metrics for SELinux context mount
...
Add separate _errors and _warnings to capture volumes that were rejected
from those will be rejected when the feature is expanded to all access
mode.
2022-08-04 10:51:43 +02:00
Jan Safranek
48b0751269
Add SELinux context tracking to volume manager
...
Both ActualStateOfWorld and DesiredStateOfWorld must track SELinux context
of volume mounts.
2022-08-04 10:51:41 +02:00
Matthew Cary
e5d387c5d6
Upgrade CSIMigrationGCE feature gate to GA
...
Change-Id: I620bc4913765c0d6562eb1008216a72e8b0a2970
2022-08-02 09:14:27 -07:00
Kubernetes Prow Robot
9ad4c5c0a0
Merge pull request #110670 from gnufied/fix-pod-deletion-terminating
...
Fix pod stuck in termination state when mount fails or gets skipped after kubelet restart
2022-07-27 06:31:29 -07:00
Davanum Srinivas
a9593d634c
Generate and format files
...
- Run hack/update-codegen.sh
- Run hack/update-generated-device-plugin.sh
- Run hack/update-generated-protobuf.sh
- Run hack/update-generated-runtime.sh
- Run hack/update-generated-swagger-docs.sh
- Run hack/update-openapi-spec.sh
- Run hack/update-gofmt.sh
Signed-off-by: Davanum Srinivas <davanum@gmail.com>
2022-07-26 13:14:05 -04:00
Hemant Kumar
835e8ccc76
Use CheckAndMarkAsUncertainViaReconstruction for uncertain volumes
...
Also only remove volumes from skippedDuringReconstruction only if
volume was marked as attached.
2022-07-22 20:11:37 -04:00
Hemant Kumar
6d43345c06
Remove volume from found during reconstruction if mounted
...
Add unit tests for removing reconstructed volumes from ASOW
2022-07-22 20:04:51 -04:00
Hemant Kumar
b455270f6e
Add unit test for verifying if processReconstructedVolumes works as expected
2022-07-22 20:04:51 -04:00
Hemant Kumar
b8257e8c01
Address review comments
2022-07-22 20:04:51 -04:00
Hemant Kumar
eb071c2755
Fix code to process volumes which were skipped during reconstruction
2022-07-22 20:04:51 -04:00
Hemant Kumar
c8b85fb470
Keep track of each pod that uses a volume during reconstruction
...
Add tests for volume cleaning up
2022-07-22 20:04:51 -04:00
Abirdcfly
984ed7ab94
typo in comments pkg/kubelet/volumemanager/volume_manager.go
...
Signed-off-by: Abirdcfly <fp544037857@gmail.com>
2022-06-20 09:59:01 +08:00
Kubernetes Prow Robot
1f90b7980b
Merge pull request #108997 from dobsonj/issue79980
...
Fix volume reconstruction for CSI ephemeral volumes
2022-06-03 18:08:20 -07:00
Kubernetes Prow Robot
60902b7caf
Merge pull request #109692 from yxxhero/remove_ioutil_in_kubelet
...
remove ioutil in kubelet
2022-06-03 09:30:51 -07:00
Jonathan Dobson
daa181d92e
kubelet: fix volume reconstruction for CSI ephemeral volumes
...
This resolves a couple of issues for CSI volume reconstruction.
1. IsLikelyNotMountPoint is known not to work for bind mounts and was
causing problems for subpaths and hostpath volumes.
2. Inline volumes were failing reconstruction due to calling
GetVolumeName, which only works when there is a PV spec.
2022-06-01 14:22:57 -06:00
Hemant Kumar
4bf500eb92
Add test for checking ephemeral volume expansion
2022-05-11 16:18:10 -04:00
Hemant Kumar
a5c961f4a8
Fix resizing of ephemeral volumes
2022-05-11 15:06:42 -04:00
yxxhero
4fac7486d4
remove ioutil in kubelet
...
Signed-off-by: yxxhero <aiopsclub@163.com>
2022-04-27 21:08:42 +08:00
Hemant Kumar
5da524d973
Fix error for inline migrated volumes
...
Inline migrated volumes report a PV, even though they are not backed
by PV.
2022-04-04 13:14:29 -04:00
Hemant Kumar
dee48d3c36
Add more tests for volume recovery cases
2022-03-28 11:59:43 -04:00
Hemant Kumar
a99466ca86
check existing size before querying new size from api-server
2022-03-28 11:32:49 -04:00
Hemant Kumar
1809094389
address review comments for rwx volume types
2022-03-28 11:32:49 -04:00
Hemant Kumar
ed217f4140
rename SetVolumeSize to InitializeVolumeSize
2022-03-28 11:32:49 -04:00
Hemant Kumar
4d52dbb9f8
Remove legacyCallNodeExpandOnPlugin when RecoverVolumeExpansionFailure
2022-03-28 11:32:49 -04:00
Hemant Kumar
7a43406138
Do not update PVC if it already has updated size
2022-03-28 11:32:49 -04:00
Hemant Kumar
c0fbd83cde
Fix code for desired state of the world populator
2022-03-28 11:32:49 -04:00
Hemant Kumar
e4f62d6c41
Modify code to use new interface functions
2022-03-28 11:32:49 -04:00
Hemant Kumar
2e54686f1b
Add a function to record volume size in dsow
2022-03-28 11:32:49 -04:00
Hemant Kumar
10f91a9951
Refactor volume attach code
2022-03-28 11:32:49 -04:00
Hemant Kumar
6eea80ec97
Record size of volume in desired and actual state of the world
2022-03-28 11:32:49 -04:00
Kubernetes Prow Robot
c239b406f0
Merge pull request #108929 from gnufied/move-expansion-feature-gate-ga
...
Move all volume expansion feature gates to GA
2022-03-25 18:08:16 -07:00
Hemant Kumar
cdfb841a52
remove ExpandInUsePersistentVolume feature gate
2022-03-24 11:19:42 -04:00
Hemant Kumar
966e1b6dd0
Fix code to not use the feature gate
2022-03-24 10:37:49 -04:00
Nikhil Sharma
4224b524d5
Managing nil pointer in VolumeManager
2022-03-22 22:04:24 +05:30
xing-yang
aae1f2c476
Update sig-storage owners file
2022-03-14 18:57:52 +00:00
Kubernetes Prow Robot
06e107081e
Merge pull request #104732 from mengjiao-liu/remove-flag-experimental-check-node-capabilities-before-mount
...
kubelet: Remove the deprecated flag `--experimental-check-node-capabilities-before-mount`
2022-02-24 07:56:30 -08:00
Cheng Xing
b152fa9b6c
Remove verult from OWNERS files
2022-02-10 18:25:38 -08:00
Kubernetes Prow Robot
d1a5513cb0
Merge pull request #107006 from gnufied/add-total-mount-time-metrics
...
Add metric for reporting total end-to-end mount time
2022-01-07 06:19:31 -08:00
Mengjiao Liu
beda4cafb6
kubelet: Remove the deprecated flag --experimental-check-node-capabilities-before-mount
2022-01-06 11:47:11 +08:00
Kubernetes Prow Robot
f0dbc32ed9
Merge pull request #106853 from gnufied/disable-exp-backoff-volume-not-inuse
...
When volume is not marked in-use, do not backoff
2021-12-22 19:46:37 -08:00