mirror of
https://github.com/fluxcd/flux2.git
synced 2026-02-08 00:37:27 +00:00
Merge pull request #949 from fluxcd/k8s-ver-check
Include prerelease data in k8s version constraints
This commit is contained in:
commit
aab3452773
1 changed files with 4 additions and 4 deletions
|
|
@ -81,11 +81,11 @@ func runCheckCmd(cmd *cobra.Command, args []string) error {
|
|||
|
||||
fluxCheck()
|
||||
|
||||
if !kubectlCheck(ctx, ">=1.18.0") {
|
||||
if !kubectlCheck(ctx, ">=1.18.0-0") {
|
||||
checkFailed = true
|
||||
}
|
||||
|
||||
if !kubernetesCheck(">=1.16.0") {
|
||||
if !kubernetesCheck(">=1.16.0-0") {
|
||||
checkFailed = true
|
||||
}
|
||||
|
||||
|
|
@ -158,7 +158,7 @@ func kubectlCheck(ctx context.Context, constraint string) bool {
|
|||
|
||||
c, _ := semver.NewConstraint(constraint)
|
||||
if !c.Check(v) {
|
||||
logger.Failuref("kubectl version must be %s", constraint)
|
||||
logger.Failuref("kubectl version %s < %s", v.Original(), constraint)
|
||||
return false
|
||||
}
|
||||
|
||||
|
|
@ -193,7 +193,7 @@ func kubernetesCheck(constraint string) bool {
|
|||
|
||||
c, _ := semver.NewConstraint(constraint)
|
||||
if !c.Check(v) {
|
||||
logger.Failuref("Kubernetes version must be %s", constraint)
|
||||
logger.Failuref("Kubernetes version %s < %s", v.Original(), constraint)
|
||||
return false
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue