Bunch of task customizations.

This commit is contained in:
Joseph Hanson 2024-07-09 12:43:00 -05:00
parent 10cdb844a3
commit e4b8caa8c6
Signed by: jahanson
SSH key fingerprint: SHA256:vy6dKBECV522aPAwklFM3ReKAVB086rT3oWwiuiFG7o
5 changed files with 11 additions and 10 deletions

View file

@ -46,7 +46,7 @@ tasks:
ns: Namespace the PVC is in (default: default) ns: Namespace the PVC is in (default: default)
app: Application to list snapshots for (required) app: Application to list snapshots for (required)
cmds: 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}} - 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}} wait job/{{.job}} --for condition=complete --timeout=1m
- kubectl --context {{.cluster}} -n {{.ns}} logs job/{{.job}} --container main - kubectl --context {{.cluster}} -n {{.ns}} logs job/{{.job}} --container main
@ -58,7 +58,7 @@ tasks:
ns: '{{.ns | default "default"}}' ns: '{{.ns | default "default"}}'
job: volsync-list-{{.app}} job: volsync-list-{{.app}}
preconditions: 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}}/wait-for-job.sh
- test -f {{.VOLSYNC_RESOURCES_DIR}}/list.tmpl.yaml - test -f {{.VOLSYNC_RESOURCES_DIR}}/list.tmpl.yaml
silent: true silent: true
@ -70,7 +70,7 @@ tasks:
ns: Namespace the PVC is in (default: default) ns: Namespace the PVC is in (default: default)
app: Application to unlock (required) app: Application to unlock (required)
cmds: 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}} - 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}} wait job/{{.job}} --for condition=complete --timeout=1m
- kubectl --context {{.cluster}} -n {{.ns}} logs job/{{.job}} --container minio - kubectl --context {{.cluster}} -n {{.ns}} logs job/{{.job}} --container minio
@ -83,7 +83,7 @@ tasks:
ns: '{{.ns | default "default"}}' ns: '{{.ns | default "default"}}'
job: volsync-unlock-{{.app}} job: volsync-unlock-{{.app}}
preconditions: 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}}/wait-for-job.sh
- test -f {{.VOLSYNC_RESOURCES_DIR}}/unlock.tmpl.yaml - test -f {{.VOLSYNC_RESOURCES_DIR}}/unlock.tmpl.yaml
silent: true silent: true
@ -187,7 +187,7 @@ tasks:
.wipe: .wipe:
internal: true internal: true
cmds: 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}} - 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}} wait job/{{.job}} --for condition=complete --timeout=120m
- kubectl --context {{.cluster}} -n {{.ns}} logs job/{{.job}} --container main - kubectl --context {{.cluster}} -n {{.ns}} logs job/{{.job}} --container main
@ -196,7 +196,7 @@ tasks:
vars: vars:
job: volsync-wipe-{{.app}} job: volsync-wipe-{{.app}}
preconditions: 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}}/wipe.tmpl.yaml
- test -f {{.VOLSYNC_RESOURCES_DIR}}/wait-for-job.sh - test -f {{.VOLSYNC_RESOURCES_DIR}}/wait-for-job.sh
@ -204,7 +204,7 @@ tasks:
.restore: .restore:
internal: true internal: true
cmds: 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}} - 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}} wait job/{{.job}} --for condition=complete --timeout=120m
- kubectl --context {{.cluster}} -n {{.ns}} delete replicationdestination {{.job}} - kubectl --context {{.cluster}} -n {{.ns}} delete replicationdestination {{.job}}
@ -212,7 +212,7 @@ tasks:
vars: vars:
job: volsync-dst-{{.app}} job: volsync-dst-{{.app}}
preconditions: 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}}/replicationdestination.tmpl.yaml
- test -f {{.VOLSYNC_RESOURCES_DIR}}/wait-for-job.sh - test -f {{.VOLSYNC_RESOURCES_DIR}}/wait-for-job.sh

View file

@ -11,7 +11,7 @@ spec:
repository: ${app}-volsync-secret repository: ${app}-volsync-secret
destinationPVC: ${claim} destinationPVC: ${claim}
copyMethod: Direct copyMethod: Direct
storageClassName: ceph-block storageClassName: openebs-hostpath
# storageClassName: ceph-filesystem # storageClassName: ceph-filesystem
# accessModes: ["ReadWriteMany"] # accessModes: ["ReadWriteMany"]
# IMPORTANT NOTE: # IMPORTANT NOTE:

0
.taskfiles/volsync/resources/wait-for-job.sh Normal file → Executable file
View file

0
.taskfiles/volsync/resources/which-controller.sh Normal file → Executable file
View file

View file

@ -4,7 +4,8 @@ apiVersion: v1
metadata: metadata:
name: kbench-pvc name: kbench-pvc
spec: spec:
storageClassName: openebs-hostpath storageClassName: zfs-generic-nfs-csi
# storageClassName: openebs-hostpath
accessModes: accessModes:
- ReadWriteOnce - ReadWriteOnce
resources: resources: