Commit Graph

519 Commits

Author SHA1 Message Date
andyzhangx
5d0a54dcb5 remove Azure Disk in-tree driver code
fix
2023-03-09 13:24:08 +00:00
torredil
6aebda9b1e Remove AWS legacy cloud provider + EBS in-tree storage plugin
Signed-off-by: torredil <torredil@amazon.com>
2023-03-06 14:01:15 +00:00
HirazawaUi
79b799a0f3 delete unused functions in pkg/volume directory 2023-01-16 21:19:11 +08:00
Maxim Patlasov
fcf89f66a9 Fix installDriverToCSINode(): we should not skip CSINode update if Allocatable.Count changed 2022-12-16 18:02:59 -08:00
Jan Safranek
5b284a50b7 Revert "Remove references to openstack and cinder"
This reverts commit 9bbf01bae9.
2022-11-10 18:25:30 +01:00
Kubernetes Prow Robot
a7117b716b
Merge pull request #112344 from zlabjp/fix-invalid-attach-limit
Fix incorrect "Invalid attach limit" error when maxAttachLimit is 0
2022-11-09 08:30:13 -08:00
Jan Safranek
167d27a790 Save SELinux context both in MountDevice and SetUp
And make it feature gated in both places.
2022-11-08 18:10:51 +01:00
Jan Safranek
e575e60ea4 Reconstruct SELinux mount option
When reconstructing volumes from disk after kubelet restart, reconstruct
also context=XYZ mount option and add it to the ActualStateOfWorld.
2022-11-08 11:17:38 +01:00
Kubernetes Prow Robot
1c230d519e
Merge pull request #113262 from jsafrane/rework-reconstruction
Rework volume reconstruction
2022-11-07 12:42:29 -08:00
Kubernetes Prow Robot
d9db8db68f
Merge pull request #111707 from leiyiz/migration
remove const that's not used
2022-11-04 13:48:15 -07:00
Fabio Bertinatto
b19172c58f Promote DelegateFSGroupToCSIDriver feature to GA 2022-11-04 07:26:17 -03:00
Jan Safranek
fc245b339b Refactor ConstructVolumeSpec
Return a struct from ConstructVolumeSpec to be able to add more fields to
it later.
2022-11-03 16:55:13 +01:00
Kubernetes Prow Robot
7d9c0e0a78
Merge pull request #113411 from jsafrane/fix-selinux-context-mount
Fix SELinux context mount with unknown context
2022-10-31 17:00:44 -07:00
Jan Safranek
8dd3510032 Fix SELinux context mount with unknown context
Don't mount with SELinux mount option if kubelet does not know the SELinux
context, i.e. MounterArgs.SELinuxLabel is ""
2022-10-31 19:11:48 +01:00
Kubernetes Prow Robot
9702161caa
Merge pull request #112597 from mythi/grpc-authority
grpc: set localhost Authority to unix client calls
2022-10-31 03:12:45 -07:00
Kubernetes Prow Robot
a74e16fc81
Merge pull request #113306 from jsafrane/csidriver-setup
Move CSIDriver checks from NewMounter to SetUpAt
2022-10-26 17:08:43 -07:00
Jan Safranek
483fd45e8e Move fsGroupPolicy from NewMounter to SetUpAt
getFSGroupPolicy needs to get CSIDriver from the API server, which may not
be available during volume reconstruction at kubelet startup.
2022-10-25 11:10:11 +02:00
Jan Safranek
04183005e4 Move lifecycle checks from NewMounter to SetUpAt
The checks need to get CSIDriver from the API server and the API server may
not be the case when NewMounter is called during volume reconstruction.
2022-10-24 17:30:51 +02:00
Jan Safranek
f76efd0400 Move CSI json file saving to SetUpAt()
When saving a json state file in NewMounter, we risk the json file will not
be cleaned when SetUpAt() fails. Move it to SetUpAt() instead.
2022-10-18 14:19:06 +02:00
Mikko Ylinen
fbcdf48bb8 grpc: set localhost Authority to unix client calls
Several reports exist (both with device plugins and CSI) that
kubelet w/ grpc-go sends invalid Authority header and some non
grpc-go servers reject these unix domain socket client connections.

grpc-go sets the Authority header correct when the dial address
is in a format where the its address scheme can be determined.

Instead of making changes to get the all server addresses to unix://
prefixed format, set grpc.WithAuthority("localhost") client connection
override to get the same result.

Signed-off-by: Mikko Ylinen <mikko.ylinen@intel.com>
2022-09-20 13:15:36 +03:00
Kubernetes Prow Robot
60e2f6c519
Merge pull request #112509 from humblec/new-1
various corrections in pkg/volume
2022-09-19 09:09:18 -07:00
Hemant Kumar
8d1e2e0faa Do not return err if CSIdriver is not found
while checking for selinux support
2022-09-16 15:53:03 -04:00
Humble Chirammal
f22a74aa6a various corrections in pkg/volume
Signed-off-by: Humble Chirammal <hchiramm@redhat.com>
2022-09-16 16:42:06 +05:30
Takashi Kusumi
b35ea96d9a Fix incorrect "Invalid attach limit" error when maxAttachLimit is 0 2022-09-09 09:32:51 +09:00
Davanum Srinivas
9bbf01bae9
Remove references to openstack and cinder
Signed-off-by: Davanum Srinivas <davanum@gmail.com>
2022-08-22 16:43:14 -04:00
Léiyì Zhang
ea0fe5a33e remove const that's not used 2022-08-04 15:55:17 -07:00
Jonathan Dobson
5f774832a5 Move CSIInlineVolume feature to GA 2022-08-04 13:06:30 -06:00
Jan Safranek
5c90474f38 Add SELinux mount support to CSI driver
With some minor refactoring to use common getCSIDriver function.
2022-08-04 10:51:45 +02:00
Jan Safranek
cdb3ead5a9 Add SupportsSELinuxContextMount
Add a new call to VolumePlugin interface and change all its
implementations.

Kubelet's VolumeManager will be interested whether a volume supports
mounting with -o conext=XYZ or not to hanle SetUp() / MountDevice()
accordingly.
2022-08-04 10:51:28 +02:00
Claudiu Belu
38092cb458 unittests: Fixes unit tests for Windows (part 2)
Currently, there are some unit tests that are failing on Windows due to
various reasons:

- volume mounting is a bit different on Windows: Mount will create the
  parent dirs and mklink at the volume path later (otherwise mklink will
  raise an error).
- os.Chmod is not working as intended on Windows.
- path.Dir() will always return "." on Windows, and filepath.Dir()
  should be used instead (which works correctly).
- on Windows, you can't typically run binaries without extensions. If
  the file C:\\foo.bat exists, we can still run C:\\foo because Windows
  will append one of the supported file extensions ($env:PATHEXT) to it
  and run it.
- Windows file permissions do not work the same way as the Linux ones.
- /tmp directory being used, which might not exist on Windows. Instead,
  the OS-specific Temp directory should be used.

Fixes a few other issues:

- rbd.go: Return error in a case in which an error is encountered. This
  will prevent "rbd: failed to setup" and "rbd: successfully setup" log
  messages to be logged at the same time.
2022-08-01 18:56:32 +03:00
Kubernetes Prow Robot
3ffdfbe286
Merge pull request #111254 from dims/update-to-golang-1.19-rc2
[golang] Update to 1.19rc2 (from 1.18.3)
2022-07-26 14:25:09 -07:00
Kubernetes Prow Robot
631a5a849a
Merge pull request #109778 from mythi/grpc-go-update
grpc: move to use grpc.WithTransportCredentials()
2022-07-26 12:45:09 -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
Abirdcfly
00b9ead02c cleanup: remove duplicate import
Signed-off-by: Abirdcfly <fp544037857@gmail.com>
2022-07-14 11:25:19 +08:00
Jiawei Wang
760365d5c9 CSIMigration feature gate to GA 2022-06-06 21:19:19 +00: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
cyclinder
6150737d11 remove feature gate GA for 1.25
Signed-off-by: cyclinder qifeng.guo@daocloud.io
2022-05-12 14:15:23 +08:00
Humble Chirammal
c74b393771 csi: add nodeExpandSecret support for CSI client
CSI spec 1.5 enhanced the spec to add optional secrets field to
NodeExpandVolumeRequest. This commit adds NodeExpandSecret to the
CSI PV source and also derive the expansion secret in csiclient to
send it out as part of the nodeexpand request.

Signed-off-by: Humble Chirammal <hchiramm@redhat.com>
Signed-off-by: zhucan <zhucan.k8s@gmail.com>
2022-04-05 11:36:23 +08:00
zhucan
eb2ebddf61 fix: add unit test
Signed-off-by: zhucan <zhucan.k8s@gmail.com>
2022-04-05 11:35:14 +08:00
Hemant Kumar
ac6ef262df remove ExpandCSIVolume feature gate 2022-03-24 14:53:00 -04:00
Kubernetes Prow Robot
aa343fa632
Merge pull request #108628 from RomanBednar/attach-detach-message
csi_attacher: improve attach/detach timeout message
2022-03-16 11:05:15 -07:00
Kubernetes Prow Robot
9642a1f84b
Merge pull request #108662 from dobsonj/issue89290
CSI inline volumes should support fsGroup
2022-03-14 09:34:10 -07:00
Roman Bednar
f17f00363b csi_attacher: improve attach/detach timeout message
If we time out waiting for volume to be attached the message given
to user is not informative enough:

"Attach timeout for volume vol-123"

It would be better if we provide more information on what's going on
and even include name of the driver that's causing the problem, e.g.:

"timed out waiting for external-attacher of ebs.csi.aws.com CSI driver to attach volume vol-123"
2022-03-14 11:00:22 +01:00
Jonathan Dobson
88a1962e56 CSI inline volumes should support fsGroup 2022-03-11 16:14:06 -07:00
Hemant Kumar
7fe33bfb7c Remove needless checks for nodestage during expansion 2022-03-10 09:55:06 -05:00
Hemant Kumar
e24219d27b Remove support for previously deprecated nodeExpand call
between staging and publish
2022-03-09 14:50:18 -05:00
Kubernetes Prow Robot
e9ba9dc4e4
Merge pull request #107201 from pacoxu/add-metrics-volume-stats-cal
add VolumeStatCalDuration metrics for fsquato monitoring benchmark
2022-02-28 16:07:46 -08: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
Jan Safranek
525b8e5cd6 Rename SupportsSELinux to SELinuxRelabel
The field in fact says that the container runtime should relabel a volume
when running a container with it, it does not say that the volume supports
SELinux. For example, NFS can support SELinux, but we don't want NFS
volumes relabeled, because they can be shared among several Pods.
2022-02-16 10:54:08 +01:00
Kubernetes Prow Robot
4033355d29
Merge pull request #107909 from sebastiansterk/master
🤓 simple grammar fix
2022-02-15 12:15:18 -08:00