From ecc2e5bb6ff777aa69c707936d42bd2c27df7630 Mon Sep 17 00:00:00 2001 From: Jairo Fernandez Date: Tue, 29 Oct 2024 11:43:33 -0500 Subject: [PATCH 1/2] fix: remove automatic helm upgrade --- laptop/helm-upgrade.sh | 3 ++- virtual-datacenter/scripts/functions.sh | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/laptop/helm-upgrade.sh b/laptop/helm-upgrade.sh index 5502f8c..4135c5c 100755 --- a/laptop/helm-upgrade.sh +++ b/laptop/helm-upgrade.sh @@ -15,7 +15,8 @@ if [ ! -f "$filename" ]; then exit 1 fi -helm upgrade tink-stack -n tink-system -f "$filename" oci://ghcr.io/tinkerbell/charts/stack +# Fix: temporarily removed for incompatible helm version +# helm upgrade tink-stack -n tink-system -f "$filename" oci://ghcr.io/tinkerbell/charts/stack kubectl -n tink-system patch clusterrole smee-role --type='json' -p='[ {"op": "add", "path": "/rules/0/verbs/-", "value": "create"}, diff --git a/virtual-datacenter/scripts/functions.sh b/virtual-datacenter/scripts/functions.sh index b9aab01..3f59f0e 100644 --- a/virtual-datacenter/scripts/functions.sh +++ b/virtual-datacenter/scripts/functions.sh @@ -62,12 +62,13 @@ echo '------------------------------------'; \ sshCommand=$(civo_get_ssh_command) echo -e "${YELLOW}$sshCommand ${NOCOLOR}" + local branch="fix/helm-version" local fullCommand="$sshCommand -tt 'vagrant plugin list | grep -q vagrant-libvirt || vagrant plugin install vagrant-libvirt; \ curl -sLO https://github.com/konstructio/colony/releases/download/${COLONY_CLI_VERSION}/colony_Linux_x86_64.tar.gz && tar -xvf colony_Linux_x86_64.tar.gz; \ sudo install -m 0755 ./colony /usr/local/bin/; \ sudo systemctl restart libvirtd; \ -git clone https://github.com/konstructio/colony-vagrant.git colony-vagrant; \ +git clone -b $branch https://github.com/konstructio/colony-vagrant.git colony-vagrant; \ cd colony-vagrant; vagrant up spine01 leaf01 exit laptop; vagrant ssh laptop -c \"$vagrantCommand\"; \ vagrant ssh laptop; exec /bin/bash -i'" From 3f044f17af002ac65b1af528432a32d3f0417bab Mon Sep 17 00:00:00 2001 From: Jairo Fernandez Date: Tue, 29 Oct 2024 12:23:24 -0500 Subject: [PATCH 2/2] chore: remove upgrade file --- laptop/helm-upgrade.sh | 24 ------------------------ laptop/setup.sh | 12 ++++++------ virtual-datacenter/scripts/functions.sh | 3 +-- 3 files changed, 7 insertions(+), 32 deletions(-) delete mode 100755 laptop/helm-upgrade.sh diff --git a/laptop/helm-upgrade.sh b/laptop/helm-upgrade.sh deleted file mode 100755 index 4135c5c..0000000 --- a/laptop/helm-upgrade.sh +++ /dev/null @@ -1,24 +0,0 @@ -#!/usr/bin/env bash - - -# Check if the script received exactly one argument -if [ "$#" -ne 1 ]; then - echo "Usage: $0 filename" - exit 1 -fi - -filename="$1" - -# Check if the file exists -if [ ! -f "$filename" ]; then - echo "Error: File '$filename' does not exist." - exit 1 -fi - -# Fix: temporarily removed for incompatible helm version -# helm upgrade tink-stack -n tink-system -f "$filename" oci://ghcr.io/tinkerbell/charts/stack - -kubectl -n tink-system patch clusterrole smee-role --type='json' -p='[ - {"op": "add", "path": "/rules/0/verbs/-", "value": "create"}, - {"op": "add", "path": "/rules/0/verbs/-", "value": "update"} -]' diff --git a/laptop/setup.sh b/laptop/setup.sh index b97c55d..ad70ff5 100644 --- a/laptop/setup.sh +++ b/laptop/setup.sh @@ -94,12 +94,12 @@ helm_install_tink_stack() { --create-namespace \ --namespace "$namespace" \ --wait \ - --set "smee.trustedProxies=${trusted_proxies}" \ - --set "hegel.trustedProxies=${trusted_proxies}" \ - --set "stack.kubevip.interface=${interface}" \ - --values manifests/proxy-values.yaml \ - --set "stack.loadBalancerIP=${loadbalancer_ip}" \ - --set "smee.publicIP=${loadbalancer_ip}" + --values manifests/proxy-values.yaml + + kubectl -n tink-system patch clusterrole smee-role --type='json' -p='[ + {"op": "add", "path": "/rules/0/verbs/-", "value": "create"}, + {"op": "add", "path": "/rules/0/verbs/-", "value": "update"} + ]' } configure_dnsmasq() { diff --git a/virtual-datacenter/scripts/functions.sh b/virtual-datacenter/scripts/functions.sh index 3f59f0e..55e1a6c 100644 --- a/virtual-datacenter/scripts/functions.sh +++ b/virtual-datacenter/scripts/functions.sh @@ -48,7 +48,6 @@ curl -sLO https://github.com/konstructio/colony/releases/download/${COLONY_CLI_V export COLONY_API_KEY=$COLONY_API_KEY; \ sudo install -m 0755 ./colony /usr/local/bin/; \ sudo kubectl -n tink-system get secret mgmt-kubeconfig; \ -/home/vagrant/manifests/helm-upgrade.sh /home/vagrant/manifests/proxy-values.yaml; \ echo '------------------------------------'; \ echo 'kubens tink-system'; \ echo 'kubens tink-system' >> ~/.bashrc; \ @@ -62,7 +61,7 @@ echo '------------------------------------'; \ sshCommand=$(civo_get_ssh_command) echo -e "${YELLOW}$sshCommand ${NOCOLOR}" - local branch="fix/helm-version" + local branch="main" local fullCommand="$sshCommand -tt 'vagrant plugin list | grep -q vagrant-libvirt || vagrant plugin install vagrant-libvirt; \ curl -sLO https://github.com/konstructio/colony/releases/download/${COLONY_CLI_VERSION}/colony_Linux_x86_64.tar.gz && tar -xvf colony_Linux_x86_64.tar.gz; \