From 21c8ba194ebd346e5e2da8ec7cedc6a130332f2a Mon Sep 17 00:00:00 2001 From: Aaron Riedel Date: Sat, 26 Aug 2023 12:11:57 +0200 Subject: [PATCH] add velero install script --- .gitignore | 3 ++- velero/credentials | 3 +++ velero/install.sh | 19 +++++++++++++++++++ 3 files changed, 24 insertions(+), 1 deletion(-) create mode 100644 velero/credentials create mode 100755 velero/install.sh diff --git a/.gitignore b/.gitignore index d37e42c..e8e0e9e 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,2 @@ -**/secret.yaml \ No newline at end of file +**/secret.yaml +**/temp.yaml \ No newline at end of file diff --git a/velero/credentials b/velero/credentials new file mode 100644 index 0000000..18e3b71 --- /dev/null +++ b/velero/credentials @@ -0,0 +1,3 @@ +[default] +aws_access_key_id = XXX +aws_secret_access_key = XXX \ No newline at end of file diff --git a/velero/install.sh b/velero/install.sh new file mode 100755 index 0000000..0cceead --- /dev/null +++ b/velero/install.sh @@ -0,0 +1,19 @@ +#!/usr/bin/env bash +command_exists() { + command -v "$1" >/dev/null 2>&1 + if [[ $? -ne 0 ]]; then + echo "Software dependency not met: $1" + exit 1 + fi +} +echo "check if velero is installed" +command_exists "velero" +echo "install velero to the cluster" +velero install \ + --provider aws \ + --features=EnableCSI \ + --plugins velero/velero-plugin-for-aws:v1.7.1,velero/velero-plugin-for-csi:v0.5.1 \ + --bucket yolokube-velero \ + --secret-file ./credentials \ + --use-volume-snapshots=false \ + --backup-location-config region=weur,s3ForcePathStyle="true",s3Url=https://38a7c29ab4f869c340784d3d7aaa0f62.r2.cloudflarestorage.com \ No newline at end of file