objectivefs examples, add new csi-proto versions
Signed-off-by: Travis Glenn Hansen <travisghansen@yahoo.com>
This commit is contained in:
parent
57f74ce665
commit
c6c1f1a264
|
|
@ -63,6 +63,10 @@ const args = require("yargs")
|
|||
"1.3.0",
|
||||
"1.4.0",
|
||||
"1.5.0",
|
||||
"1.6.0",
|
||||
"1.7.0",
|
||||
"1.8.0",
|
||||
"1.9.0",
|
||||
],
|
||||
})
|
||||
.demandOption(["csi-version"], "csi-version is required")
|
||||
|
|
|
|||
|
|
@ -34,6 +34,7 @@ $exeargs += "-csi.mountdir", "${env:CSI_SANITY_TEMP_DIR}\mnt"
|
|||
$exeargs += "-csi.stagingdir", "${env:CSI_SANITY_TEMP_DIR}\stage"
|
||||
$exeargs += "-csi.testvolumeexpandsize", "2147483648"
|
||||
$exeargs += "-csi.testvolumesize", "1073741824"
|
||||
$exeargs += "--csi.secrets", "${env:CSI_SANITY_SECRETS}"
|
||||
$exeargs += "-ginkgo.skip", "${env:CSI_SANITY_SKIP}"
|
||||
$exeargs += "-ginkgo.focus", "${env:CSI_SANITY_FOCUS}"
|
||||
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@ set -x
|
|||
: ${CSI_ENDPOINT:=/tmp/csi-${CI_BUILD_KEY}.sock}
|
||||
: ${CSI_SANITY_TEMP_DIR:=$(mktemp -d -t ci-csi-sanity-tmp-XXXXXXXX)}
|
||||
|
||||
if [[ ! -S "${CSI_ENDPOINT}" ]];then
|
||||
if [[ ! -S "${CSI_ENDPOINT}" ]]; then
|
||||
echo "csi socket: ${CSI_ENDPOINT} does not exist"
|
||||
exit 1
|
||||
fi
|
||||
|
|
@ -15,29 +15,29 @@ fi
|
|||
trap ctrl_c INT
|
||||
|
||||
function ctrl_c() {
|
||||
echo "Trapped CTRL-C"
|
||||
exit 1
|
||||
echo "Trapped CTRL-C"
|
||||
exit 1
|
||||
}
|
||||
|
||||
chmod g+w,o+w "${CSI_ENDPOINT}";
|
||||
mkdir -p "${CSI_SANITY_TEMP_DIR}";
|
||||
rm -rf "${CSI_SANITY_TEMP_DIR}"/*;
|
||||
chmod -R 777 "${CSI_SANITY_TEMP_DIR}";
|
||||
chmod g+w,o+w "${CSI_ENDPOINT}"
|
||||
mkdir -p "${CSI_SANITY_TEMP_DIR}"
|
||||
rm -rf "${CSI_SANITY_TEMP_DIR}"/*
|
||||
chmod -R 777 "${CSI_SANITY_TEMP_DIR}"
|
||||
|
||||
# https://github.com/kubernetes-csi/csi-test/tree/master/cmd/csi-sanity
|
||||
# FOR DEBUG: --ginkgo.v
|
||||
# --csi.secrets=<path to secrets file>
|
||||
#
|
||||
#
|
||||
# expand size 2073741824 to have mis-alignments
|
||||
# expand size 2147483648 to have everything line up nicely
|
||||
|
||||
csi-sanity --csi.endpoint "unix://${CSI_ENDPOINT}" \
|
||||
--csi.mountdir "${CSI_SANITY_TEMP_DIR}/mnt" \
|
||||
--csi.stagingdir "${CSI_SANITY_TEMP_DIR}/stage" \
|
||||
--csi.testvolumeexpandsize 2147483648 \
|
||||
--csi.testvolumesize 1073741824 \
|
||||
--csi.secrets="${CSI_SANITY_SECRETS}" \
|
||||
-ginkgo.skip "${CSI_SANITY_SKIP}" \
|
||||
-ginkgo.focus "${CSI_SANITY_FOCUS}"
|
||||
--csi.mountdir "${CSI_SANITY_TEMP_DIR}/mnt" \
|
||||
--csi.stagingdir "${CSI_SANITY_TEMP_DIR}/stage" \
|
||||
--csi.testvolumeexpandsize 2147483648 \
|
||||
--csi.testvolumesize 1073741824 \
|
||||
--csi.secrets="${CSI_SANITY_SECRETS}" \
|
||||
-ginkgo.skip "${CSI_SANITY_SKIP}" \
|
||||
-ginkgo.focus "${CSI_SANITY_FOCUS}"
|
||||
|
||||
rm -rf "${CSI_SANITY_TEMP_DIR}"
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@ Set-Location $env:PWD
|
|||
Write-Output "launching server"
|
||||
|
||||
$env:LOG_LEVEL = "debug"
|
||||
$env:CSI_VERSION = "1.5.0"
|
||||
$env:CSI_VERSION = "1.9.0"
|
||||
$env:CSI_NAME = "driver-test"
|
||||
$env:CSI_SANITY = "1"
|
||||
|
||||
|
|
|
|||
|
|
@ -9,21 +9,21 @@ echo "current launch-server PATH: ${PATH}"
|
|||
: ${CI_BUILD_KEY:="local"}
|
||||
: ${TEMPLATE_CONFIG_FILE:=${1}}
|
||||
: ${CSI_MODE:=""}
|
||||
: ${CSI_VERSION:="1.5.0"}
|
||||
: ${CSI_VERSION:="1.9.0"}
|
||||
: ${CSI_ENDPOINT:=/tmp/csi-${CI_BUILD_KEY}.sock}
|
||||
: ${LOG_PATH:=/tmp/csi-${CI_BUILD_KEY}.log}
|
||||
|
||||
if [[ "x${CONFIG_FILE}" == "x" ]];then
|
||||
if [[ "x${CONFIG_FILE}" == "x" ]]; then
|
||||
: ${CONFIG_FILE:=/tmp/csi-config-${CI_BUILD_KEY}.yaml}
|
||||
|
||||
if [[ "x${TEMPLATE_CONFIG_FILE}" != "x" ]];then
|
||||
envsubst < "${TEMPLATE_CONFIG_FILE}" > "${CONFIG_FILE}"
|
||||
if [[ "x${TEMPLATE_CONFIG_FILE}" != "x" ]]; then
|
||||
envsubst <"${TEMPLATE_CONFIG_FILE}" >"${CONFIG_FILE}"
|
||||
fi
|
||||
fi
|
||||
|
||||
if [[ "x${CSI_MODE}" != "x" ]];then
|
||||
if [[ "x${CSI_MODE}" != "x" ]]; then
|
||||
EXTRA_ARGS="--csi-mode ${CSI_MODE} ${EXTRA_ARGS}"
|
||||
fi
|
||||
|
||||
# > "${LOG_PATH}" 2>&1
|
||||
# > "${LOG_PATH}" 2>&1
|
||||
exec ./bin/democratic-csi --log-level debug --driver-config-file "${CONFIG_FILE}" --csi-version "${CSI_VERSION}" --csi-name "driver-test" --server-socket "${CSI_ENDPOINT}" ${EXTRA_ARGS}
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
|
|
@ -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
|
||||
|
|
@ -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: []
|
||||
|
|
@ -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": ""
|
||||
# ...
|
||||
|
|
@ -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
|
||||
Loading…
Reference in New Issue