forked from enix/san-iscsi-csi
-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Block volume support and refactor of node publish/unpublish (#93)
* feat: block volume support Add support for block volume types by doing a bind mount of the mapped device to the specified location instead of creating/mounting a filesystem * refactor: refactor NodeUnpublishVolume to consolidate common code * docs: Update docs and examples for block volumes
- Loading branch information
1 parent
f2a5d45
commit 46331ea
Showing
11 changed files
with
373 additions
and
516 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
apiVersion: v1 | ||
kind: PersistentVolumeClaim | ||
metadata: | ||
name: systems-pvc | ||
spec: | ||
accessModes: | ||
- ReadWriteOnce | ||
volumeMode: Block | ||
storageClassName: block-vol-storageclass | ||
resources: | ||
requests: | ||
storage: 5Gi | ||
--- | ||
apiVersion: v1 | ||
kind: Pod | ||
metadata: | ||
name: test-pod | ||
spec: | ||
containers: | ||
- image: ghcr.io/seagate/seagate-exos-x-testapp | ||
command: ["/bin/sh", "-c", "while sleep 60; do echo hello > /vol/test && ls -l /vol && cat /vol/test && rm /vol/test; done"] | ||
name: test-pod-container | ||
volumeDevices: | ||
- devicePath: /block-vol | ||
name: volume | ||
ports: | ||
- containerPort: 8080 | ||
volumes: | ||
- name: volume | ||
persistentVolumeClaim: | ||
claimName: systems-pvc |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
apiVersion: storage.k8s.io/v1 | ||
kind: StorageClass | ||
provisioner: csi-exos-x.seagate.com # Check pkg/driver.go, Required for the plugin to recognize this storage class as handled by itself. | ||
volumeBindingMode: WaitForFirstConsumer # Prefer this value to avoid unschedulable pods (https://kubernetes.io/docs/concepts/storage/storage-classes/#volume-binding-mode) | ||
allowVolumeExpansion: true | ||
metadata: | ||
name: block-vol-storageclass | ||
parameters: | ||
# Secrets name and namespace, they can be the same for provisioner, controller-publish and controller-expand sections. | ||
csi.storage.k8s.io/provisioner-secret-name: seagate-exos-x-csi-secrets | ||
csi.storage.k8s.io/provisioner-secret-namespace: default | ||
csi.storage.k8s.io/controller-publish-secret-name: seagate-exos-x-csi-secrets | ||
csi.storage.k8s.io/controller-publish-secret-namespace: default | ||
csi.storage.k8s.io/controller-expand-secret-name: seagate-exos-x-csi-secrets | ||
csi.storage.k8s.io/controller-expand-secret-namespace: default | ||
csi.storage.k8s.io/node-publish-secret-name: seagate-exos-x-csi-secrets | ||
csi.storage.k8s.io/node-publish-secret-namespace: default | ||
pool: A # Pool to use on the IQN to provision volumes | ||
volPrefix: stx # Desired prefix for volume naming, an underscore is appended | ||
storageProtocol: iscsi # iscsi, fc or sas | ||
AccessType: block |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.