|
|
@ -31,6 +31,9 @@ import ( |
|
|
|
// Version is the string that contains version
|
|
|
|
// Version is the string that contains version
|
|
|
|
var Version string |
|
|
|
var Version string |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// HelperVersionOverride decouples the k3d helper image versions from the main version, if needed
|
|
|
|
|
|
|
|
var HelperVersionOverride string |
|
|
|
|
|
|
|
|
|
|
|
// K3sVersion should contain the latest version tag of k3s (hardcoded at build time)
|
|
|
|
// K3sVersion should contain the latest version tag of k3s (hardcoded at build time)
|
|
|
|
// we're setting a default version for edge cases, because the 'latest' tag is not actively maintained
|
|
|
|
// we're setting a default version for edge cases, because the 'latest' tag is not actively maintained
|
|
|
|
var K3sVersion = "v1.18.4+k3s1" // TODO: can we try to dynamically fetch the latest version at runtime and only fallback to this if it fails?
|
|
|
|
var K3sVersion = "v1.18.4+k3s1" // TODO: can we try to dynamically fetch the latest version at runtime and only fallback to this if it fails?
|
|
|
@ -49,6 +52,9 @@ func GetHelperImageVersion() string { |
|
|
|
log.Infoln("Helper image tag set from env var") |
|
|
|
log.Infoln("Helper image tag set from env var") |
|
|
|
return tag |
|
|
|
return tag |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
if len(HelperVersionOverride) > 0 { |
|
|
|
|
|
|
|
return HelperVersionOverride |
|
|
|
|
|
|
|
} |
|
|
|
if len(Version) == 0 { |
|
|
|
if len(Version) == 0 { |
|
|
|
return "latest" |
|
|
|
return "latest" |
|
|
|
} |
|
|
|
} |
|
|
|