-
Notifications
You must be signed in to change notification settings - Fork 21
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add a PV, a PVC and a volume to the test pods (#420)
* Add a PV, a PVC and a volume to the test pods This allows testing some storage related test cases in the CI.
- Loading branch information
Showing
6 changed files
with
64 additions
and
0 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
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,14 @@ | ||
#!/usr/bin/env bash | ||
|
||
# Initialization | ||
SCRIPT_DIR=$(dirname "$0") | ||
|
||
# shellcheck disable=SC1091 # Not following. | ||
source "$SCRIPT_DIR"/init-env.sh | ||
|
||
mkdir -p ./temp | ||
|
||
# shellcheck disable=SC2002 # Useless cat. | ||
cat ./test-target/storage.yaml | "$SCRIPT_DIR"/mo >./temp/rendered-test-storage.yaml | ||
oc delete --filename ./temp/rendered-test-storage.yaml -n "$TNF_EXAMPLE_CNF_NAMESPACE" --ignore-not-found=true | ||
rm ./temp/rendered-test-storage.yaml |
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,14 @@ | ||
#!/usr/bin/env bash | ||
|
||
# Initialization | ||
SCRIPT_DIR=$(dirname "$0") | ||
|
||
# shellcheck disable=SC1091 # Not following. | ||
source "$SCRIPT_DIR"/init-env.sh | ||
|
||
mkdir -p ./temp | ||
|
||
# shellcheck disable=SC2002 # Useless cat. | ||
cat ./test-target/storage.yaml | "$SCRIPT_DIR"/mo >./temp/rendered-test-storage.yaml | ||
oc apply --filename ./temp/rendered-test-storage.yaml --namespace "$TNF_EXAMPLE_CNF_NAMESPACE" | ||
rm ./temp/rendered-test-storage.yaml |
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,30 @@ | ||
apiVersion: v1 | ||
kind: PersistentVolume | ||
metadata: | ||
name: test-pv | ||
labels: | ||
role: test | ||
spec: | ||
capacity: | ||
storage: 10Mi | ||
accessModes: | ||
- ReadWriteOnce | ||
hostPath: | ||
path: /data | ||
persistentVolumeReclaimPolicy: Delete | ||
--- | ||
apiVersion: v1 | ||
kind: PersistentVolumeClaim | ||
metadata: | ||
name: test-pvc | ||
namespace: {{ TNF_EXAMPLE_CNF_NAMESPACE }} | ||
spec: | ||
accessModes: | ||
- ReadWriteOnce | ||
resources: | ||
requests: | ||
storage: 10Mi | ||
selector: | ||
matchLabels: | ||
role: test | ||
|