mirror of
https://github.com/ceph/ceph-csi.git
synced 2025-06-13 10:33:35 +00:00
ci: add volumesnapshotclasses for externalstorage
added volumesnapshotclasses yaml and script for external-storage test Signed-off-by: Madhu Rajanna <madhupr007@gmail.com>
This commit is contained in:
committed by
mergify[bot]
parent
66f71aea3a
commit
307a2f130b
27
scripts/k8s-storage/create-volumesnapshotclasses.sh
Executable file
27
scripts/k8s-storage/create-volumesnapshotclasses.sh
Executable file
@ -0,0 +1,27 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# Create VolumeSnapshotClasses from a template (volumesnapshotclass-*.yaml.in) and replace keywords
|
||||
# like @@CLUSTER_ID@@.
|
||||
#
|
||||
# These VolumeSnapshotClasses can then be used by driver-*.yaml manifests in the
|
||||
# k8s-e2e-external-storage CI job.
|
||||
#
|
||||
# Requirements:
|
||||
# - kubectl in the path
|
||||
# - working KUBE_CONFIG either in environment, or default config files
|
||||
# - deployment done with Rook
|
||||
#
|
||||
|
||||
# exit on error
|
||||
set -e
|
||||
|
||||
WORKDIR=$(dirname "${0}")
|
||||
|
||||
TOOLBOX_POD=$(kubectl -n rook-ceph get pods --no-headers -l app=rook-ceph-tools -o=jsonpath='{.items[0].metadata.name}')
|
||||
FS_ID=$(kubectl -n rook-ceph exec "${TOOLBOX_POD}" -- ceph fsid)
|
||||
|
||||
for sc in "${WORKDIR}"/volumesnapshotclass-*.yaml.in
|
||||
do
|
||||
sed "s/@@CLUSTER_ID@@/${FS_ID}/" "${sc}" |
|
||||
kubectl create -f -
|
||||
done
|
Reference in New Issue
Block a user