Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion charts/manila-csi-plugin/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ apiVersion: v1
appVersion: v1.36.0
description: Manila CSI Chart for OpenStack
name: openstack-manila-csi
version: 2.36.0
version: 2.36.1
home: http://github.com/kubernetes/cloud-provider-openstack
icon: https://github.com/kubernetes/kubernetes/blob/master/logo/logo.png
maintainers:
Expand Down
12 changes: 11 additions & 1 deletion charts/manila-csi-plugin/templates/nodeplugin-daemonset.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,10 @@ spec:
--drivername=$(DRIVER_NAME)
--share-protocol-selector=$(MANILA_SHARE_PROTO)
--fwdendpoint=$(FWD_CSI_ENDPOINT)
--cluster-id="{{ $.Values.csimanila.clusterID }}"'
--cluster-id="{{ $.Values.csimanila.clusterID }}"
{{- if $.Values.csimanila.searchOrder }}
--search-order="{{ $.Values.csimanila.searchOrder }}"
{{- end }}'
]
env:
- name: DRIVER_NAME
Expand All @@ -87,6 +90,9 @@ spec:
mountPath: /runtimeconfig
readOnly: true
{{- end }}
- name: configdrive-dev
mountPath: /dev
mountPropagation: "HostToContainer"
{{- with $.Values.nodeplugin.volumeMounts }}
{{- toYaml . | nindent 12 }}
{{- end }}
Expand All @@ -113,6 +119,10 @@ spec:
name: manila-csi-runtimeconf-cm
{{- end }}
{{- end }}
- name: configdrive-dev
hostPath:
path: /dev
type: Directory
{{- with .Values.nodeplugin.volumes }}
{{- toYaml . | nindent 8 }}
{{- end }}
Expand Down
5 changes: 5 additions & 0 deletions charts/manila-csi-plugin/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,9 @@ csimanila:
pullPolicy: IfNotPresent
tag: # defaults to .Chart.AppVersion

# Set the search order in which the driver retrieves metadata relating to the instance (s) in which it runs
searchOrder: ""

# DeamonSet deployment
nodeplugin:
# Component name
Expand Down Expand Up @@ -139,3 +142,5 @@ controllerplugin:
# See https://github.com/kubernetes/community/blob/master/contributors/devel/sig-instrumentation/logging.md
# for description of individual verbosity levels.
logVerbosityLevel: 2

searchOrder:
9 changes: 8 additions & 1 deletion cmd/manila-csi-plugin/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ var (
userAgentData []string
provideControllerService bool
provideNodeService bool
searchOrder string
)

func validateShareProtocolSelector(v string) error {
Expand Down Expand Up @@ -104,8 +105,13 @@ func main() {
}

if provideNodeService {
err = metadata.CheckMetadataSearchOrder(searchOrder)
if err != nil {
klog.Fatalf("Invalid search-order: %v", err)
}

// Initialize metadata
metadata := metadata.GetMetadataProvider("")
metadata := metadata.GetMetadataProvider(searchOrder)

err = d.SetupNodeService(metadata)
if err != nil {
Expand Down Expand Up @@ -158,6 +164,7 @@ func main() {

cmd.PersistentFlags().BoolVar(&provideControllerService, "provide-controller-service", true, "If set to true then the CSI driver does provide the controller service (default: true)")
cmd.PersistentFlags().BoolVar(&provideNodeService, "provide-node-service", true, "If set to true then the CSI driver does provide the node service (default: true)")
cmd.PersistentFlags().StringVar(&searchOrder, "search-order", "configDrive,metadataService", "The search order in which the driver retrieves metadata relating to the instance (s) in which it runs")

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please adjust docs accordingly


code := cli.Run(cmd)
os.Exit(code)
Expand Down
1 change: 1 addition & 0 deletions docs/manila-csi-plugin/using-manila-csi-plugin.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ Option | Default value | Description
`--provide-controller-service` | `true` | If set to true then the CSI driver does provide the controller service.
`--provide-node-service` | `true` | If set to true then the CSI driver does provide the node service.
`--pvc-annotations` | `false` | If set to true then the CSI driver will use PVC annotations as an additional information when creating shares. See [Supported PVC annotations](#supported-pvc-annotations) for more info.
`--search-order` | `configDrive,metadataService` | The search order in which the driver retrieves metadata relating to the instance (s) in which it runs.

### Controller Service volume parameters

Expand Down
8 changes: 7 additions & 1 deletion manifests/manila-csi-plugin/csi-nodeplugin.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,9 @@ spec:
mountPath: /var/lib/kubelet/plugins/manila.csi.openstack.org
- name: fwd-plugin-dir
mountPath: /var/lib/kubelet/plugins/FWD-NODEPLUGIN
- name: configdrive-dev

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can you also adjust a corresponding helm chart template?

mountPath: /dev
mountPropagation: "HostToContainer"
volumes:
- name: registration-dir
hostPath:
Expand All @@ -93,4 +96,7 @@ spec:
hostPath:
path: /var/lib/kubelet/plugins/FWD-NODEPLUGIN
type: DirectoryOrCreate

- name: configdrive-dev
hostPath:
path: /dev
type: Directory
Loading