Skip to content

Commit

Permalink
add support for upgrading edge cluster
Browse files Browse the repository at this point in the history
  • Loading branch information
daniellrr committed Jan 29, 2024
1 parent 428f0f0 commit 1b7cd58
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions upgrade_edge/upgrade_edge.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
#TALOS_VERSION="v1.5.5"
#UPGRADE_KUBERENTES="true"

if [[ "$UPGRADE_KUBERNETES" != "true" ]] && [[ "$UPGRADE_TALOS" != "true" ]]; then
if "$UPGRADE_KUBERNETES" != "true" && "$UPGRADE_TALOS" != "true" ; then
echo "None of the variables UPGRADE_KUBERNETES or UPGRADE_TALOS has been set to true (true as a string, not a boolean), exiting without any upgrading"
echo $UPGRADE_KUBERENTES
echo $UPGRADE_TALOS
Expand Down Expand Up @@ -76,14 +76,14 @@ upgrade_kubernetes() {
./talosctl-"${server_version}" -n $SERVER_IP -e $SERVER_IP upgrade-k8s --to $NEXT_VERSION
}

if [ "$UPGRADE_TALOS" = "true" ] && [ "$UPGRADE_KUBERENTES" = "true" ]; then
if "$UPGRADE_TALOS" = "true" && "$UPGRADE_KUBERENTES" = "true" ; then
echo "Cannot upgrade both Talos and Kubernetes at the same time."
exit 0
elif [ "$UPGRADE_TALOS" = "true" ]; then
elif "$UPGRADE_TALOS" = "true"; then
check_talos_version_existence
check_talosctl_version
upgrade_talos
elif [ "$UPGRADE_KUBERENTES" = "true" ]; then
elif "$UPGRADE_KUBERENTES" = "true" ; then
check_talosctl_version
get_current_k8s_version
upgrade_kubernetes
Expand Down

0 comments on commit 1b7cd58

Please sign in to comment.