Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
…nto master
  • Loading branch information
shiftstack-merge-bot committed Jul 29, 2021
2 parents 2bec53f + 02cddd3 commit 18928cc
Show file tree
Hide file tree
Showing 6 changed files with 27 additions and 12 deletions.
2 changes: 1 addition & 1 deletion charts/cinder-csi-plugin/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
4 changes: 0 additions & 4 deletions charts/cinder-csi-plugin/templates/nodeplugin-daemonset.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -37,7 +35,6 @@ spec:
valueFrom:
fieldRef:
fieldPath: spec.nodeName
imagePullPolicy: "IfNotPresent"
volumeMounts:
- name: socket-dir
mountPath: /csi
Expand Down Expand Up @@ -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
Expand Down
3 changes: 2 additions & 1 deletion charts/cinder-csi-plugin/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,8 @@ csi:
nodePlugin:
affinity: {}
nodeSelector: {}
tolerations: []
tolerations:
- operator: Exists
controllerPlugin:
affinity: {}
nodeSelector: {}
Expand Down
4 changes: 4 additions & 0 deletions docs/manila-csi-plugin/using-manila-csi-plugin.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.

Expand All @@ -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)._

Expand Down
12 changes: 8 additions & 4 deletions pkg/csi/manila/options/shareoptions.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand All @@ -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 (
Expand Down
14 changes: 12 additions & 2 deletions pkg/csi/manila/shareadapters/cephfs.go
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit 18928cc

Please sign in to comment.