forked from ceph/ceph-csi
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #288 from red-hat-storage/sync_us--devel
Syncing latest changes from upstream devel for ceph-csi
- Loading branch information
Showing
4 changed files
with
44 additions
and
2 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,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 |
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,11 @@ | ||
--- | ||
apiVersion: snapshot.storage.k8s.io/v1 | ||
kind: VolumeSnapshotClass | ||
metadata: | ||
name: k8s-storage-e2e-cephfs | ||
driver: cephfs.csi.ceph.com | ||
parameters: | ||
clusterID: @@CLUSTER_ID@@ | ||
csi.storage.k8s.io/snapshotter-secret-name: rook-csi-cephfs-provisioner | ||
csi.storage.k8s.io/snapshotter-secret-namespace: rook-ceph | ||
deletionPolicy: Delete |