Merge branch 'release-1.15' into release/matrix

This commit is contained in:
Anton Troshin 2025-02-24 09:08:04 -06:00 committed by GitHub
commit 2960ef2df4
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 19 additions and 12 deletions

View File

@ -49,6 +49,7 @@ const (
numHAPodsWithScheduler = 16 numHAPodsWithScheduler = 16
numHAPodsOld = 13 numHAPodsOld = 13
numNonHAPodsWithHAScheduler = 8
numNonHAPodsWithScheduler = 6 numNonHAPodsWithScheduler = 6
numNonHAPodsOld = 5 numNonHAPodsOld = 5
@ -57,7 +58,10 @@ const (
devZipkinReleaseName = "dapr-dev-zipkin" devZipkinReleaseName = "dapr-dev-zipkin"
) )
var VersionWithScheduler = semver.MustParse("1.14.0-rc.1") var (
VersionWithScheduler = semver.MustParse("1.14.0-rc.1")
VersionWithHAScheduler = semver.MustParse("1.15.0-rc.1")
)
type VersionDetails struct { type VersionDetails struct {
RuntimeVersion string RuntimeVersion string
@ -1232,24 +1236,27 @@ func getVersionedNumberOfPods(isHAEnabled bool, details VersionDetails) (int, er
return 0, err return 0, err
} }
if rv.LessThan(VersionWithScheduler) { if rv.GreaterThanEqual(VersionWithScheduler) {
return numHAPodsOld, nil
}
return numHAPodsWithScheduler, nil return numHAPodsWithScheduler, nil
}
return numHAPodsOld, nil
} else { } else {
if details.UseDaprLatestVersion { if details.UseDaprLatestVersion {
return numNonHAPodsWithScheduler, nil return numNonHAPodsWithHAScheduler, nil
} }
rv, err := semver.NewVersion(details.RuntimeVersion) rv, err := semver.NewVersion(details.RuntimeVersion)
if err != nil { if err != nil {
return 0, err return 0, err
} }
if rv.LessThan(VersionWithScheduler) { if rv.GreaterThanEqual(VersionWithHAScheduler) {
return numNonHAPodsOld, nil return numNonHAPodsWithHAScheduler, nil
} }
if rv.GreaterThanEqual(VersionWithScheduler) {
return numNonHAPodsWithScheduler, nil return numNonHAPodsWithScheduler, nil
} }
return numNonHAPodsOld, nil
}
} }
func exportCurrentCertificate(daprPath string) error { func exportCurrentCertificate(daprPath string) error {