diff --git a/charts/cinder-csi-plugin/Chart.yaml b/charts/cinder-csi-plugin/Chart.yaml index 0a9999150e..9a7da5f359 100644 --- a/charts/cinder-csi-plugin/Chart.yaml +++ b/charts/cinder-csi-plugin/Chart.yaml @@ -2,7 +2,7 @@ apiVersion: v1 appVersion: latest description: Cinder CSI Chart for OpenStack name: openstack-cinder-csi -version: 1.4.4 +version: 1.4.6 home: https://github.com/kubernetes/cloud-provider-openstack icon: https://github.com/kubernetes/kubernetes/blob/master/logo/logo.png maintainers: diff --git a/charts/cinder-csi-plugin/templates/nodeplugin-daemonset.yaml b/charts/cinder-csi-plugin/templates/nodeplugin-daemonset.yaml index 1d8b95386a..2845239847 100644 --- a/charts/cinder-csi-plugin/templates/nodeplugin-daemonset.yaml +++ b/charts/cinder-csi-plugin/templates/nodeplugin-daemonset.yaml @@ -13,8 +13,6 @@ spec: labels: {{- include "cinder-csi.nodeplugin.labels" . | nindent 8 }} spec: - tolerations: - - operator: Exists serviceAccount: csi-cinder-node-sa hostNetwork: true containers: @@ -37,7 +35,6 @@ spec: valueFrom: fieldRef: fieldPath: spec.nodeName - imagePullPolicy: "IfNotPresent" volumeMounts: - name: socket-dir mountPath: /csi @@ -83,7 +80,6 @@ spec: initialDelaySeconds: {{ .Values.csi.livenessprobe.initialDelaySeconds }} timeoutSeconds: {{ .Values.csi.livenessprobe.timeoutSeconds }} periodSeconds: {{ .Values.csi.livenessprobe.periodSeconds }} - imagePullPolicy: "IfNotPresent" volumeMounts: - name: socket-dir mountPath: /csi diff --git a/charts/cinder-csi-plugin/values.yaml b/charts/cinder-csi-plugin/values.yaml index 464cd6d4e7..ed97819d65 100644 --- a/charts/cinder-csi-plugin/values.yaml +++ b/charts/cinder-csi-plugin/values.yaml @@ -63,7 +63,8 @@ csi: nodePlugin: affinity: {} nodeSelector: {} - tolerations: [] + tolerations: + - operator: Exists controllerPlugin: affinity: {} nodeSelector: {} diff --git a/docs/manila-csi-plugin/using-manila-csi-plugin.md b/docs/manila-csi-plugin/using-manila-csi-plugin.md index 4fa9b98929..f6914e6050 100644 --- a/docs/manila-csi-plugin/using-manila-csi-plugin.md +++ b/docs/manila-csi-plugin/using-manila-csi-plugin.md @@ -50,6 +50,8 @@ Parameter | Required | Description `availability` | _no_ | Manila availability zone of the provisioned share. If none is provided, the default Manila zone will be used. Note that this parameter is opaque to the CO and does not influence placement of workloads that will consume this share, meaning they may be scheduled onto any node of the cluster. If the specified Manila AZ is not equally accessible from all compute nodes of the cluster, use [Topology-aware dynamic provisioning](#topology-aware-dynamic-provisioning). `appendShareMetadata` | _no_ | Append user-defined metadata to the provisioned share. If not empty, this field must be a string with a valid JSON object. The object must consist of key-value pairs of type string. Example: `"{..., \"key\": \"value\"}"`. `cephfs-mounter` | _no_ | Relevant for CephFS Manila shares. Specifies which mounting method to use with the CSI CephFS driver. Available options are `kernel` and `fuse`, defaults to `fuse`. See [CSI CephFS docs](https://github.com/ceph/ceph-csi/blob/csi-v1.0/docs/deploy-cephfs.md#configuration) for further information. +`cephfs-kernelMountOptions` | _no_ | Relevant for CephFS Manila shares. Specifies mount options for CephFS kernel client. See [CSI CephFS docs](https://github.com/ceph/ceph-csi/blob/csi-v1.0/docs/deploy-cephfs.md#configuration) for further information. +`cephfs-fuseMountOptions` | _no_ | Relevant for CephFS Manila shares. Specifies mount options for CephFS FUSE client. See [CSI CephFS docs](https://github.com/ceph/ceph-csi/blob/csi-v1.0/docs/deploy-cephfs.md#configuration) for further information. `cephfs-clientID` | _no_ | Relevant for CephFS Manila shares. Specifies the cephx client ID when creating an access rule for the provisioned share. The same cephx client ID may be shared with multiple Manila shares. If no value is provided, client ID for the provisioned Manila share will be set to some unique value (PersistentVolume name). `nfs-shareClient` | _no_ | Relevant for NFS Manila shares. Specifies what address has access to the NFS share. Defaults to `0.0.0.0/0`, i.e. anyone. @@ -63,6 +65,8 @@ Parameter | Required | Description `shareName` | if `shareID` is not given | The name of the share `shareAccessID` | _yes_ | The UUID of the access rule for the share `cephfs-mounter` | _no_ | Relevant for CephFS Manila shares. Specifies which mounting method to use with the CSI CephFS driver. Available options are `kernel` and `fuse`, defaults to `fuse`. See [CSI CephFS docs](https://github.com/ceph/ceph-csi/blob/csi-v1.0/docs/deploy-cephfs.md#configuration) for further information. +`cephfs-kernelMountOptions` | _no_ | Relevant for CephFS Manila shares. Specifies mount options for CephFS kernel client. See [CSI CephFS docs](https://github.com/ceph/ceph-csi/blob/csi-v1.0/docs/deploy-cephfs.md#configuration) for further information. +`cephfs-fuseMountOptions` | _no_ | Relevant for CephFS Manila shares. Specifies mount options for CephFS FUSE client. See [CSI CephFS docs](https://github.com/ceph/ceph-csi/blob/csi-v1.0/docs/deploy-cephfs.md#configuration) for further information. _Note that the Node Plugin of CSI Manila doesn't care about the origin of a share. As long as the share protocol is supported, CSI Manila is able to consume dynamically provisioned as well as pre-provisioned shares (e.g. shares created manually)._ diff --git a/pkg/csi/manila/options/shareoptions.go b/pkg/csi/manila/options/shareoptions.go index 4d744d9422..ceab39a8c1 100644 --- a/pkg/csi/manila/options/shareoptions.go +++ b/pkg/csi/manila/options/shareoptions.go @@ -29,9 +29,11 @@ type ControllerVolumeContext struct { // Adapter options - CephfsMounter string `name:"cephfs-mounter" value:"default:fuse" matches:"^kernel|fuse$"` - CephfsClientID string `name:"cephfs-clientID" value:"optional"` - NFSShareClient string `name:"nfs-shareClient" value:"default:0.0.0.0/0"` + CephfsMounter string `name:"cephfs-mounter" value:"default:fuse" matches:"^kernel|fuse$"` + CephfsClientID string `name:"cephfs-clientID" value:"optional"` + CephfsKernelMountOptions string `name:"cephfs-kernelMountOptions" value:"optional"` + CephfsFuseMountOptions string `name:"cephfs-fuseMountOptions" value:"optional"` + NFSShareClient string `name:"nfs-shareClient" value:"default:0.0.0.0/0"` } type NodeVolumeContext struct { @@ -41,7 +43,9 @@ type NodeVolumeContext struct { // Adapter options - CephfsMounter string `name:"cephfs-mounter" value:"default:fuse" matches:"^kernel|fuse$"` + CephfsMounter string `name:"cephfs-mounter" value:"default:fuse" matches:"^kernel|fuse$"` + CephfsKernelMountOptions string `name:"cephfs-kernelMountOptions" value:"optional"` + CephfsFuseMountOptions string `name:"cephfs-fuseMountOptions" value:"optional"` } var ( diff --git a/pkg/csi/manila/shareadapters/cephfs.go b/pkg/csi/manila/shareadapters/cephfs.go index 5ff1bafec0..7ecd55181f 100644 --- a/pkg/csi/manila/shareadapters/cephfs.go +++ b/pkg/csi/manila/shareadapters/cephfs.go @@ -117,12 +117,22 @@ func (Cephfs) BuildVolumeContext(args *VolumeContextArgs) (volumeContext map[str monitors, rootPath, err := splitExportLocationPath(args.Locations[chosenExportLocationIdx].Path) - return map[string]string{ + volCtx := map[string]string{ "monitors": monitors, "rootPath": rootPath, "mounter": args.Options.CephfsMounter, "provisionVolume": "false", - }, err + } + + if args.Options.CephfsKernelMountOptions != "" { + volCtx["kernelMountOptions"] = args.Options.CephfsKernelMountOptions + } + + if args.Options.CephfsFuseMountOptions != "" { + volCtx["fuseMountOptions"] = args.Options.CephfsFuseMountOptions + } + + return volCtx, err } func (Cephfs) BuildNodeStageSecret(args *SecretArgs) (secret map[string]string, err error) {