File tree Expand file tree Collapse file tree 1 file changed +9
-0
lines changed Expand file tree Collapse file tree 1 file changed +9
-0
lines changed Original file line number Diff line number Diff line change @@ -50,6 +50,15 @@ SKIP_FETCH_TOOLS=${SKIP_FETCH_TOOLS:-""}
50
50
function fetch_kb_tools {
51
51
local dest_dir=" ${1} "
52
52
53
+ # use the pre-existing version in the temporary folder if it matches our k8s version
54
+ if [[ -x " ${dest_dir} /kubebuilder/bin/kube-apiserver" ]]; then
55
+ version=$( " ${dest_dir} " /kubebuilder/bin/kube-apiserver --version)
56
+ if [[ $version == * " ${k8s_version} " * ]]; then
57
+ header_text " Using cached kubebuilder-tools from ${dest_dir} "
58
+ return 0
59
+ fi
60
+ fi
61
+
53
62
header_text " fetching tools (into '${dest_dir} ')"
54
63
kb_tools_archive_name=" kubebuilder-tools-$k8s_version -$goos -$goarch .tar.gz"
55
64
kb_tools_download_url=" https://storage.googleapis.com/kubebuilder-tools/$kb_tools_archive_name "
You can’t perform that action at this time.
0 commit comments