Skip to content

Commit

Permalink
Merge branch 'main' into remove_deletion_step
Browse files Browse the repository at this point in the history
  • Loading branch information
chipzoller authored Sep 13, 2023
2 parents f310597 + fa3731e commit d41f344
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,4 @@ commands:
if [ "$annotation" = "1234abcd" ]; then exit 0; else exit 1; fi
- script: |
annotation=$(kubectl get pod pod04 -n refresh-vols-ns -o json | kyverno jp query "metadata.annotations.\"corp.org/random\" || '' " | tail -n 1 | cut -d '"' -f 2)
if [ "$annotation" = "1234abcd" ]; then exit 0; else exit 1; fi
- script: |
val=$(kubectl exec pod01 -n refresh-vols-ns -- cat /mnt/foo/foo)
if [ "$val" = "bar" ]; then exit 0; else exit 1; fi
- script: |
val=$(kubectl exec pod02 -n refresh-vols-ns -- cat /mnt/foo/foo)
if [ "$val" = "bar" ]; then exit 0; else exit 1; fi
- script: |
val=$(kubectl exec pod04 -n refresh-vols-ns -- cat /mnt/foo/foo)
if [ "$val" = "bar" ]; then exit 0; else exit 1; fi
- command: kubectl delete all --all --force --grace-period=0 -n refresh-vols-ns
if [ "$annotation" = "1234abcd" ]; then exit 0; else exit 1; fi
14 changes: 14 additions & 0 deletions other/rec-req/refresh-volumes-in-pods/05-check.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
apiVersion: kuttl.dev/v1beta1
kind: TestStep
commands:
- command: sleep 3
- script: |
val=$(kubectl exec pod01 -n refresh-vols-ns -- cat /mnt/foo/foo)
if [ "$val" = "bar" ]; then exit 0; else exit 1; fi
- script: |
val=$(kubectl exec pod02 -n refresh-vols-ns -- cat /mnt/foo/foo)
if [ "$val" = "bar" ]; then exit 0; else exit 1; fi
- script: |
val=$(kubectl exec pod04 -n refresh-vols-ns -- cat /mnt/foo/foo)
if [ "$val" = "bar" ]; then exit 0; else exit 1; fi
- command: kubectl delete all --all --force --grace-period=0 -n refresh-vols-ns

0 comments on commit d41f344

Please sign in to comment.