objectivefs examples, add new csi-proto versions

Signed-off-by: Travis Glenn Hansen <travisghansen@yahoo.com>
This commit is contained in:
Travis Glenn Hansen 2024-03-03 17:12:42 -07:00
parent 57f74ce665
commit c6c1f1a264
13 changed files with 7160 additions and 22 deletions

View File

@ -63,6 +63,10 @@ const args = require("yargs")
"1.3.0", "1.3.0",
"1.4.0", "1.4.0",
"1.5.0", "1.5.0",
"1.6.0",
"1.7.0",
"1.8.0",
"1.9.0",
], ],
}) })
.demandOption(["csi-version"], "csi-version is required") .demandOption(["csi-version"], "csi-version is required")

View File

@ -34,6 +34,7 @@ $exeargs += "-csi.mountdir", "${env:CSI_SANITY_TEMP_DIR}\mnt"
$exeargs += "-csi.stagingdir", "${env:CSI_SANITY_TEMP_DIR}\stage" $exeargs += "-csi.stagingdir", "${env:CSI_SANITY_TEMP_DIR}\stage"
$exeargs += "-csi.testvolumeexpandsize", "2147483648" $exeargs += "-csi.testvolumeexpandsize", "2147483648"
$exeargs += "-csi.testvolumesize", "1073741824" $exeargs += "-csi.testvolumesize", "1073741824"
$exeargs += "--csi.secrets", "${env:CSI_SANITY_SECRETS}"
$exeargs += "-ginkgo.skip", "${env:CSI_SANITY_SKIP}" $exeargs += "-ginkgo.skip", "${env:CSI_SANITY_SKIP}"
$exeargs += "-ginkgo.focus", "${env:CSI_SANITY_FOCUS}" $exeargs += "-ginkgo.focus", "${env:CSI_SANITY_FOCUS}"

View File

@ -19,10 +19,10 @@ function ctrl_c() {
exit 1 exit 1
} }
chmod g+w,o+w "${CSI_ENDPOINT}"; chmod g+w,o+w "${CSI_ENDPOINT}"
mkdir -p "${CSI_SANITY_TEMP_DIR}"; mkdir -p "${CSI_SANITY_TEMP_DIR}"
rm -rf "${CSI_SANITY_TEMP_DIR}"/*; rm -rf "${CSI_SANITY_TEMP_DIR}"/*
chmod -R 777 "${CSI_SANITY_TEMP_DIR}"; chmod -R 777 "${CSI_SANITY_TEMP_DIR}"
# https://github.com/kubernetes-csi/csi-test/tree/master/cmd/csi-sanity # https://github.com/kubernetes-csi/csi-test/tree/master/cmd/csi-sanity
# FOR DEBUG: --ginkgo.v # FOR DEBUG: --ginkgo.v

View File

@ -8,7 +8,7 @@ Set-Location $env:PWD
Write-Output "launching server" Write-Output "launching server"
$env:LOG_LEVEL = "debug" $env:LOG_LEVEL = "debug"
$env:CSI_VERSION = "1.5.0" $env:CSI_VERSION = "1.9.0"
$env:CSI_NAME = "driver-test" $env:CSI_NAME = "driver-test"
$env:CSI_SANITY = "1" $env:CSI_SANITY = "1"

View File

@ -9,7 +9,7 @@ echo "current launch-server PATH: ${PATH}"
: ${CI_BUILD_KEY:="local"} : ${CI_BUILD_KEY:="local"}
: ${TEMPLATE_CONFIG_FILE:=${1}} : ${TEMPLATE_CONFIG_FILE:=${1}}
: ${CSI_MODE:=""} : ${CSI_MODE:=""}
: ${CSI_VERSION:="1.5.0"} : ${CSI_VERSION:="1.9.0"}
: ${CSI_ENDPOINT:=/tmp/csi-${CI_BUILD_KEY}.sock} : ${CSI_ENDPOINT:=/tmp/csi-${CI_BUILD_KEY}.sock}
: ${LOG_PATH:=/tmp/csi-${CI_BUILD_KEY}.log} : ${LOG_PATH:=/tmp/csi-${CI_BUILD_KEY}.log}

1636
csi_proto/csi-v1.6.0.proto Normal file

File diff suppressed because it is too large Load Diff

1636
csi_proto/csi-v1.7.0.proto Normal file

File diff suppressed because it is too large Load Diff

1856
csi_proto/csi-v1.8.0.proto Normal file

File diff suppressed because it is too large Load Diff

1914
csi_proto/csi-v1.9.0.proto Normal file

File diff suppressed because it is too large Load Diff

6
csi_proto/download-proto.sh Executable file
View File

@ -0,0 +1,6 @@
#!/bin/bash
# v1.6.0
VERSION=${1}
curl -v -o "csi-${VERSION}.proto" https://raw.githubusercontent.com/container-storage-interface/spec/${VERSION}/csi.proto

View File

@ -0,0 +1,6 @@
# common options for the controller service
csi:
# manual override of the available access modes for the deployment
# generally highly uncessary to alter so only use in advanced scenarios
#access_modes: []

View File

@ -0,0 +1,51 @@
---
apiVersion: v1
kind: Secret
metadata:
name: objectivefs-secret
namespace: kube-system
stringData:
# these can be defined here OR in volumeAttributes
# secrets are processed *before* volumeAttributes and therefore volumeAttributes will take precedence
"env.OBJECTSTORE": ""
"env.ACCESS_KEY": ""
"env.SECRET_KEY": ""
"env.OBJECTIVEFS_PASSPHRASE": ""
# does NOT need admin key appended for node-manual operations
"env.OBJECTIVEFS_LICENSE": ""
"env.ENDPOINT": ""
# ...
---
apiVersion: v1
kind: PersistentVolume
metadata:
name: objectivefs-manual
spec:
capacity:
storage: 1Gi
accessModes:
- ReadWriteMany
persistentVolumeReclaimPolicy: Retain
mountOptions:
[]
# https://objectivefs.com/userguide#mount
#- nodiratime
#- noatime
#- fsavail=<size>
csi:
driver: org.democratic-csi.node-manual
readOnly: false
fsType: objectivefs
volumeHandle: unique-volumeid # make sure it's a unique id in the cluster
nodeStageSecretRef:
name: objectivefs-secret
namespace: kube-system
volumeAttributes:
node_attach_driver: objectivefs
provisioner_driver: node-manual
filesystem: "ofs/test"
# these can be defined here OR in the secret referenced above
# secrets are processed *before* volumeAttributes and therefore volumeAttributes will take precedence
#"env.OBJECTSTORE": "minio://"
#"env.ACCESS_KEY": ""
# ...

28
examples/objectivefs.yaml Normal file
View File

@ -0,0 +1,28 @@
driver: objectivefs
objectivefs:
# note, ALL provisioned filesystems will be created in this pool
# with the same passphrase entered below
pool: ofs
cli:
sudoEnabled: false
env:
# NOTE: this must be the license key + admin key
# admin key feature must be activated on your account
# https://objectivefs.com/howto/objectivefs-admin-key-setup
OBJECTIVEFS_LICENSE:
OBJECTSTORE:
ENDPOINT:
SECRET_KEY:
ACCESS_KEY:
# do NOT change this once it has been set and deployed
OBJECTIVEFS_PASSPHRASE:
# ...
_private:
csi:
volume:
idHash:
# due to 63 char limit on objectivefs fs name, we should
# hash volume names to prevent fs names which are too long
# can be 1 of md5, crc8, crc16, crc32
strategy: crc32