From 1d570fc4a66b1eb64a8c1bce7c5573f76431d648 Mon Sep 17 00:00:00 2001 From: Atanas Dinov Date: Wed, 27 Mar 2024 10:42:03 +0200 Subject: [PATCH] Fix k3s binary perms Signed-off-by: Atanas Dinov --- pkg/combustion/kubernetes_test.go | 4 ++-- pkg/combustion/templates/k3s-multi-node-installer.sh.tpl | 2 +- pkg/combustion/templates/k3s-single-node-installer.sh.tpl | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/pkg/combustion/kubernetes_test.go b/pkg/combustion/kubernetes_test.go index f9b22b22..dfd57c69 100644 --- a/pkg/combustion/kubernetes_test.go +++ b/pkg/combustion/kubernetes_test.go @@ -211,7 +211,7 @@ func TestConfigureKubernetes_SuccessfulSingleNodeK3sCluster(t *testing.T) { assert.Contains(t, contents, "export INSTALL_K3S_SKIP_DOWNLOAD=true") assert.Contains(t, contents, "export INSTALL_K3S_SKIP_START=true") assert.Contains(t, contents, "export INSTALL_K3S_BIN_DIR=/opt/bin") - assert.Contains(t, contents, "chmod +x $ARTEFACTS_DIR/kubernetes/install/cool-k3s-binary") + assert.Contains(t, contents, "chmod +x $INSTALL_K3S_BIN_DIR/k3s") assert.Contains(t, contents, "cp $ARTEFACTS_DIR/kubernetes/install/cool-k3s-binary $INSTALL_K3S_BIN_DIR/k3s") assert.Contains(t, contents, "sh $ARTEFACTS_DIR/kubernetes/install-kubernetes.sh") @@ -308,7 +308,7 @@ func TestConfigureKubernetes_SuccessfulMultiNodeK3sCluster(t *testing.T) { assert.Contains(t, contents, "export INSTALL_K3S_SKIP_DOWNLOAD=true") assert.Contains(t, contents, "export INSTALL_K3S_SKIP_START=true") assert.Contains(t, contents, "export INSTALL_K3S_BIN_DIR=/opt/bin") - assert.Contains(t, contents, "chmod +x $ARTEFACTS_DIR/kubernetes/install/cool-k3s-binary") + assert.Contains(t, contents, "chmod +x $INSTALL_K3S_BIN_DIR/k3s") assert.Contains(t, contents, "cp $ARTEFACTS_DIR/kubernetes/install/cool-k3s-binary $INSTALL_K3S_BIN_DIR/k3s") assert.Contains(t, contents, "sh $ARTEFACTS_DIR/kubernetes/install-kubernetes.sh") diff --git a/pkg/combustion/templates/k3s-multi-node-installer.sh.tpl b/pkg/combustion/templates/k3s-multi-node-installer.sh.tpl index 83d15868..afca56bf 100644 --- a/pkg/combustion/templates/k3s-multi-node-installer.sh.tpl +++ b/pkg/combustion/templates/k3s-multi-node-installer.sh.tpl @@ -54,7 +54,7 @@ export INSTALL_K3S_SKIP_START=true export INSTALL_K3S_BIN_DIR=/opt/bin mkdir -p $INSTALL_K3S_BIN_DIR -chmod +x {{ .binaryPath }} cp {{ .binaryPath }} $INSTALL_K3S_BIN_DIR/k3s +chmod +x $INSTALL_K3S_BIN_DIR/k3s sh {{ .installScript }} diff --git a/pkg/combustion/templates/k3s-single-node-installer.sh.tpl b/pkg/combustion/templates/k3s-single-node-installer.sh.tpl index 03a06610..4ae281bb 100644 --- a/pkg/combustion/templates/k3s-single-node-installer.sh.tpl +++ b/pkg/combustion/templates/k3s-single-node-installer.sh.tpl @@ -29,7 +29,7 @@ export INSTALL_K3S_SKIP_START=true export INSTALL_K3S_BIN_DIR=/opt/bin mkdir -p $INSTALL_K3S_BIN_DIR -chmod +x {{ .binaryPath }} cp {{ .binaryPath }} $INSTALL_K3S_BIN_DIR/k3s +chmod +x $INSTALL_K3S_BIN_DIR/k3s sh {{ .installScript }}