From e4b8caa8c6912b42900c57cf68f3dcad597b0e5b Mon Sep 17 00:00:00 2001 From: Joseph Hanson Date: Tue, 9 Jul 2024 12:43:00 -0500 Subject: [PATCH] Bunch of task customizations. --- .taskfiles/volsync/Taskfile.yaml | 16 ++++++++-------- ...tmp.yaml => replicationdestination.tmpl.yaml} | 2 +- .taskfiles/volsync/resources/wait-for-job.sh | 0 .taskfiles/volsync/resources/which-controller.sh | 0 kubernetes/tools/kbench.yaml | 3 ++- 5 files changed, 11 insertions(+), 10 deletions(-) rename .taskfiles/volsync/resources/{replicationdestination.tmp.yaml => replicationdestination.tmpl.yaml} (96%) mode change 100644 => 100755 .taskfiles/volsync/resources/wait-for-job.sh mode change 100644 => 100755 .taskfiles/volsync/resources/which-controller.sh diff --git a/.taskfiles/volsync/Taskfile.yaml b/.taskfiles/volsync/Taskfile.yaml index 7d5d9794..776d5f23 100644 --- a/.taskfiles/volsync/Taskfile.yaml +++ b/.taskfiles/volsync/Taskfile.yaml @@ -46,7 +46,7 @@ tasks: ns: Namespace the PVC is in (default: default) app: Application to list snapshots for (required) cmds: - - $GOPATH/bin/envsubst < <(cat {{.VOLSYNC_RESOURCES_DIR}}/list.tmpl.yaml) | kubectl --context {{.cluster}} apply -f - + - /etc/profiles/per-user/jahanson/bin/envsubst < <(cat {{.VOLSYNC_RESOURCES_DIR}}/list.tmpl.yaml) | kubectl --context {{.cluster}} apply -f - - bash {{.VOLSYNC_RESOURCES_DIR}}/wait-for-job.sh {{.job}} {{.ns}} {{.cluster}} - kubectl --context {{.cluster}} -n {{.ns}} wait job/{{.job}} --for condition=complete --timeout=1m - kubectl --context {{.cluster}} -n {{.ns}} logs job/{{.job}} --container main @@ -58,7 +58,7 @@ tasks: ns: '{{.ns | default "default"}}' job: volsync-list-{{.app}} preconditions: - - test -f $GOPATH/bin/envsubst + - test -f /etc/profiles/per-user/jahanson/bin/envsubst - test -f {{.VOLSYNC_RESOURCES_DIR}}/wait-for-job.sh - test -f {{.VOLSYNC_RESOURCES_DIR}}/list.tmpl.yaml silent: true @@ -70,7 +70,7 @@ tasks: ns: Namespace the PVC is in (default: default) app: Application to unlock (required) cmds: - - $GOPATH/bin/envsubst < <(cat {{.VOLSYNC_RESOURCES_DIR}}/unlock.tmpl.yaml) | kubectl --context {{.cluster}} apply -f - + - /etc/profiles/per-user/jahanson/bin/envsubst < <(cat {{.VOLSYNC_RESOURCES_DIR}}/unlock.tmpl.yaml) | kubectl --context {{.cluster}} apply -f - - bash {{.VOLSYNC_RESOURCES_DIR}}/wait-for-job.sh {{.job}} {{.ns}} {{.cluster}} - kubectl --context {{.cluster}} -n {{.ns}} wait job/{{.job}} --for condition=complete --timeout=1m - kubectl --context {{.cluster}} -n {{.ns}} logs job/{{.job}} --container minio @@ -83,7 +83,7 @@ tasks: ns: '{{.ns | default "default"}}' job: volsync-unlock-{{.app}} preconditions: - - test -f $GOPATH/bin/envsubst + - test -f /etc/profiles/per-user/jahanson/bin/envsubst - test -f {{.VOLSYNC_RESOURCES_DIR}}/wait-for-job.sh - test -f {{.VOLSYNC_RESOURCES_DIR}}/unlock.tmpl.yaml silent: true @@ -187,7 +187,7 @@ tasks: .wipe: internal: true cmds: - - $GOPATH/bin/envsubst < <(cat {{.VOLSYNC_RESOURCES_DIR}}/wipe.tmpl.yaml) | kubectl --context {{.cluster}} apply -f - + - /etc/profiles/per-user/jahanson/bin/envsubst < <(cat {{.VOLSYNC_RESOURCES_DIR}}/wipe.tmpl.yaml) | kubectl --context {{.cluster}} apply -f - - bash {{.VOLSYNC_RESOURCES_DIR}}/wait-for-job.sh {{.job}} {{.ns}} {{.cluster}} - kubectl --context {{.cluster}} -n {{.ns}} wait job/{{.job}} --for condition=complete --timeout=120m - kubectl --context {{.cluster}} -n {{.ns}} logs job/{{.job}} --container main @@ -196,7 +196,7 @@ tasks: vars: job: volsync-wipe-{{.app}} preconditions: - - test -f $GOPATH/bin/envsubst + - test -f /etc/profiles/per-user/jahanson/bin/envsubst - test -f {{.VOLSYNC_RESOURCES_DIR}}/wipe.tmpl.yaml - test -f {{.VOLSYNC_RESOURCES_DIR}}/wait-for-job.sh @@ -204,7 +204,7 @@ tasks: .restore: internal: true cmds: - - $GOPATH/bin/envsubst < <(cat {{.VOLSYNC_RESOURCES_DIR}}/replicationdestination.tmpl.yaml) | kubectl --context {{.cluster}} apply -f - + - /etc/profiles/per-user/jahanson/bin/envsubst < <(cat {{.VOLSYNC_RESOURCES_DIR}}/replicationdestination.tmpl.yaml) | kubectl --context {{.cluster}} apply -f - - bash {{.VOLSYNC_RESOURCES_DIR}}/wait-for-job.sh {{.job}} {{.ns}} {{.cluster}} - kubectl --context {{.cluster}} -n {{.ns}} wait job/{{.job}} --for condition=complete --timeout=120m - kubectl --context {{.cluster}} -n {{.ns}} delete replicationdestination {{.job}} @@ -212,7 +212,7 @@ tasks: vars: job: volsync-dst-{{.app}} preconditions: - - test -f $GOPATH/bin/envsubst + - test -f /etc/profiles/per-user/jahanson/bin/envsubst - test -f {{.VOLSYNC_RESOURCES_DIR}}/replicationdestination.tmpl.yaml - test -f {{.VOLSYNC_RESOURCES_DIR}}/wait-for-job.sh diff --git a/.taskfiles/volsync/resources/replicationdestination.tmp.yaml b/.taskfiles/volsync/resources/replicationdestination.tmpl.yaml similarity index 96% rename from .taskfiles/volsync/resources/replicationdestination.tmp.yaml rename to .taskfiles/volsync/resources/replicationdestination.tmpl.yaml index 92d266ba..082ac9e6 100644 --- a/.taskfiles/volsync/resources/replicationdestination.tmp.yaml +++ b/.taskfiles/volsync/resources/replicationdestination.tmpl.yaml @@ -11,7 +11,7 @@ spec: repository: ${app}-volsync-secret destinationPVC: ${claim} copyMethod: Direct - storageClassName: ceph-block + storageClassName: openebs-hostpath # storageClassName: ceph-filesystem # accessModes: ["ReadWriteMany"] # IMPORTANT NOTE: diff --git a/.taskfiles/volsync/resources/wait-for-job.sh b/.taskfiles/volsync/resources/wait-for-job.sh old mode 100644 new mode 100755 diff --git a/.taskfiles/volsync/resources/which-controller.sh b/.taskfiles/volsync/resources/which-controller.sh old mode 100644 new mode 100755 diff --git a/kubernetes/tools/kbench.yaml b/kubernetes/tools/kbench.yaml index 020981d0..85c33a36 100644 --- a/kubernetes/tools/kbench.yaml +++ b/kubernetes/tools/kbench.yaml @@ -4,7 +4,8 @@ apiVersion: v1 metadata: name: kbench-pvc spec: - storageClassName: openebs-hostpath + storageClassName: zfs-generic-nfs-csi + # storageClassName: openebs-hostpath accessModes: - ReadWriteOnce resources: