From ceee71d23b234a0912e25cf3b040ff049dffb674 Mon Sep 17 00:00:00 2001 From: Maarten de Waard <maarten@greenhost.nl> Date: Mon, 19 Jul 2021 11:05:25 +0200 Subject: [PATCH] add flux version check to install script --- install/flux-version-check.sh | 4 ++++ install/install-nextcloud.sh | 2 ++ install/install-openappstack.sh | 2 ++ install/install-rocketchat.sh | 2 ++ install/install-velero.sh | 2 ++ install/install-wordpress.sh | 2 ++ 6 files changed, 14 insertions(+) create mode 100644 install/flux-version-check.sh diff --git a/install/flux-version-check.sh b/install/flux-version-check.sh new file mode 100644 index 000000000..ecc57f66a --- /dev/null +++ b/install/flux-version-check.sh @@ -0,0 +1,4 @@ +if [ "$(flux --version)" != "flux version 0.14.2" ]; then + echo "The OpenAppStack installation only works with Flux version 0.14.2" + exit 1; +fi diff --git a/install/install-nextcloud.sh b/install/install-nextcloud.sh index 1f9998817..41f082822 100755 --- a/install/install-nextcloud.sh +++ b/install/install-nextcloud.sh @@ -2,6 +2,8 @@ set -euo pipefail +bash $(dirname "$0")/flux-version-check.sh + # This kustomization's only purpose is to add the kustomization that is in the # flxu2/cluster/optional/nextcloud folder. After this kustomization is applied # an `add-nextcloud` kustomization will be present on the cluster, as well as a diff --git a/install/install-openappstack.sh b/install/install-openappstack.sh index 4c90eae1c..3ce0ab8ee 100755 --- a/install/install-openappstack.sh +++ b/install/install-openappstack.sh @@ -2,6 +2,8 @@ set -euo pipefail +bash $(dirname "$0")/flux-version-check.sh + flux install \ --network-policy=false \ --watch-all-namespaces=true \ diff --git a/install/install-rocketchat.sh b/install/install-rocketchat.sh index bbf145ead..152147405 100755 --- a/install/install-rocketchat.sh +++ b/install/install-rocketchat.sh @@ -2,6 +2,8 @@ set -euo pipefail +bash $(dirname "$0")/flux-version-check.sh + # This kustomization's only purpose is to add the kustomization that is in the # flxu2/cluster/optional/rocketchat folder. After this kustomization is applied # an `add-rocketchat` kustomization will be present on the cluster, as well as a diff --git a/install/install-velero.sh b/install/install-velero.sh index ade3b6f1e..ab28e430c 100755 --- a/install/install-velero.sh +++ b/install/install-velero.sh @@ -2,6 +2,8 @@ set -euo pipefail +bash $(dirname "$0")/flux-version-check.sh + # This kustomization's only purpose is to add the kustomization that is in the # flxu2/cluster/optional/velero folder. After this kustomization is applied # an `add-velero` kustomization will be present on the cluster, as well as a diff --git a/install/install-wordpress.sh b/install/install-wordpress.sh index b734bf600..2e7ee3598 100755 --- a/install/install-wordpress.sh +++ b/install/install-wordpress.sh @@ -2,6 +2,8 @@ set -euo pipefail +bash $(dirname "$0")/flux-version-check.sh + # This kustomization's only purpose is to add the kustomization that is in the # flxu2/cluster/optional/wordpress folder. After this kustomization is applied # an `add-wordpress` kustomization will be present on the cluster, as well as a -- GitLab