Skip to content

Commit

Permalink
Minor refactor (#748)
Browse files Browse the repository at this point in the history
  • Loading branch information
viveksinghggits authored Sep 3, 2020
1 parent 3617b2b commit 2ab641a
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 0 deletions.
12 changes: 12 additions & 0 deletions examples/etcd/etcd-in-cluster/k8s/etcd-incluster-blueprint.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,10 @@ actions:
image: kanisterio/kanister-kubectl:1.18
command:
- sh
- -o
- errexit
- -o
- pipefail
- -c
- |
export CACERT="{{ index .Object.data "cacert" | toString | b64dec }}"
Expand All @@ -36,6 +40,10 @@ actions:
image: kanisterio/kanister-kubectl:1.18
command:
- sh
- -o
- errexit
- -o
- pipefail
- -c
- |
BACKUP_LOCATION=etcd_backups/{{ .Object.metadata.namespace }}/{{ toDate "2006-01-02T15:04:05.999999999Z07:00" .Time | date "2006-01-02T15:04:05Z07:00" }}/etcd-backup.db.gz
Expand All @@ -50,6 +58,10 @@ actions:
image: kanisterio/kanister-kubectl:1.18
command:
- sh
- -o
- errexit
- -o
- pipefail
- -c
- |
kubectl exec -it -n {{ .Phases.takeSnapshot.Output.etcdNS }} {{ .Phases.takeSnapshot.Output.etcdPod }} -c etcd -- sh -c "rm -rf /tmp/etcd-backup.db"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,10 @@ actions:
image: kanisterio/kanister-kubectl:1.18
command:
- sh
- -o
- errexit
- -o
- pipefail
- -c
- |
export endpoints="{{ index .Object.data "endpoints" | toString | b64dec }}"
Expand All @@ -34,6 +38,10 @@ actions:
image: kanisterio/kanister-kubectl:1.18
command:
- sh
- -o
- errexit
- -o
- pipefail
- -c
- |
BACKUP_LOCATION=etcd_backups/{{ .Phases.takeSnapshot.Output.etcdPod }}/{{ toDate "2006-01-02T15:04:05.999999999Z07:00" .Time | date "2006-01-02T15:04:05Z07:00" }}/etcd-backup.db.gz
Expand All @@ -48,6 +56,10 @@ actions:
image: kanisterio/kanister-kubectl:1.18
command:
- sh
- -o
- errexit
- -o
- pipefail
- -c
- |
kubectl exec -it -n {{ .Phases.takeSnapshot.Output.etcdNS }} "{{ .Phases.takeSnapshot.Output.etcdPod }}" -c etcd -- sh -c "rm -rf /tmp/etcd-backup.db"
Expand Down

0 comments on commit 2ab641a

Please sign in to comment.