From b5f59a629cd3ffe8923a43b547cf06c2997920fe Mon Sep 17 00:00:00 2001 From: Kjeld Schouten Date: Sun, 3 Nov 2024 18:25:37 +0100 Subject: [PATCH] fix(clustertool): fix git references issues and warn against ARM --- clustertool/embed/generic/base/clusterenv.yaml | 4 +++- clustertool/pkg/initfiles/initfiles.go | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/clustertool/embed/generic/base/clusterenv.yaml b/clustertool/embed/generic/base/clusterenv.yaml index f48b615ae06c..0ae57c7db559 100644 --- a/clustertool/embed/generic/base/clusterenv.yaml +++ b/clustertool/embed/generic/base/clusterenv.yaml @@ -1,7 +1,8 @@ ## The Following are required by ClusterTool and CANNOT be removed # Ensure VIP is different from all master IPs VIP: 192.168.20.200 -# Defines the MasterNode IP +## Defines the MasterNode IP +# Please be aware, we only support x86_64 for the first node, ARM will NOT work by default MASTER1IP: 192.168.20.210 # Defines the gateway for all nodes GATEWAY: 192.168.20.1 @@ -11,6 +12,7 @@ METALLB_RANGE: 192.168.20.211-192.168.20.219 DASHBOARD_IP: 192.168.20.211 # Used to automatically generate a sshkey-pair for FluxCD # Has to start with ssh:// +# Please make sure to NOT contain any special characters in the URL except "-" GITHUB_REPOSITORY: "" ## Uncomment and adapt to automatically setup your dockerhub credentials ## This should prevent much of the potential ratelimits diff --git a/clustertool/pkg/initfiles/initfiles.go b/clustertool/pkg/initfiles/initfiles.go index e4ef49e83897..48dd89e67fd8 100644 --- a/clustertool/pkg/initfiles/initfiles.go +++ b/clustertool/pkg/initfiles/initfiles.go @@ -127,7 +127,7 @@ func FormatGitURL(input string) string { } // Compile a regex to match and replace the URL pattern - re := regexp.MustCompile(`^ssh://git@([^:/]+)([:/])(\w+)/(\w+)\.git$`) + re := regexp.MustCompile(`^ssh://git@([^:/]+)([:/])([\w-]+)/([\w-]+)\.git$`) matches := re.FindStringSubmatch(input) if len(matches) == 5 {