Skip to content

Commit

Permalink
Update pkg/rancher-desktop/backend/backendHelper.ts
Browse files Browse the repository at this point in the history
Co-authored-by: Mark Yen <[email protected]>
Signed-off-by: Jan Dubois <[email protected]>
  • Loading branch information
jandubois and mook-as committed Jul 15, 2024
1 parent 112f896 commit d2075d5
Showing 1 changed file with 12 additions and 20 deletions.
32 changes: 12 additions & 20 deletions pkg/rancher-desktop/backend/backendHelper.ts
Original file line number Diff line number Diff line change
Expand Up @@ -147,26 +147,18 @@ export default class BackendHelper {
if (engineName !== ContainerEngine.MOBY) {
return false;
}
// versions 1.24.1 to 1.24.3 don't support the --docker option
if (semver.gte(kubeVersion, '1.24.1') && semver.lte(kubeVersion, '1.24.3')) {
return true;
}
// cri-dockerd bundled with k3s is not compatible with docker 25.x (using API 1.44)
// see https://github.com/k3s-io/k3s/issues/9279
if (semver.gte(kubeVersion, '1.26.8') && semver.lte(kubeVersion, '1.26.13')) {
return true;
}
if (semver.gte(kubeVersion, '1.27.5') && semver.lte(kubeVersion, '1.27.10')) {
return true;
}
if (semver.gte(kubeVersion, '1.28.0') && semver.lte(kubeVersion, '1.28.6')) {
return true;
}
if (semver.gte(kubeVersion, '1.29.0') && semver.lte(kubeVersion, '1.29.1')) {
return true;
}

return false;
const ranges = [
// versions 1.24.1 to 1.24.3 don't support the --docker option
'1.24.1 - 1.24.3',
// cri-dockerd bundled with k3s is not compatible with docker 25.x (using API 1.44)
// see https://github.com/k3s-io/k3s/issues/9279
'1.26.8 - 1.26.13',
'1.27.5 - 1.27.10',
'1.28.0 - 1.28.6',
'1.29.0 - 1.29.1',
];

return semver.satisfies(kubeVersion, ranges.join('||'));
}

static checkForLockedVersion(newVersion: semver.SemVer, cfg: BackendSettings, sv: SettingsValidator): void {
Expand Down

0 comments on commit d2075d5

Please sign in to comment.