Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: set minimal kubernetes version to 1.19 #1523

Merged
merged 3 commits into from
Aug 9, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 6 additions & 8 deletions src/api/version.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,20 +12,18 @@

import axios from 'axios'
import { cli } from 'cli-ux'
import execa = require('execa')
import * as fs from 'fs-extra'
import * as https from 'https'
import Listr = require('listr')
import * as path from 'path'
import * as semver from 'semver'

import { CHECTL_REPO, CheGithubClient, ECLIPSE_CHE_INCUBATOR_ORG } from '../api/github-client'
import { CHECTL_PROJECT_NAME } from '../constants'
import { CheTasks } from '../tasks/che'
import { getClusterClientCommand, getProjectName, getProjectVersion } from '../util'

import { getClusterClientCommand, getProjectName, getProjectVersion, isKubernetesPlatformFamily } from '../util'
import { ChectlContext } from './context'
import { KubeHelper } from './kube'
import execa = require('execa')
import Listr = require('listr')

export const CHECTL_DEVELOPMENT_VERSION = '0.0.2'

Expand All @@ -39,7 +37,7 @@ const A_DAY_IN_MS = 24 * 60 * 60 * 1000

export namespace VersionHelper {
export const MINIMAL_OPENSHIFT_VERSION = '3.11'
export const MINIMAL_K8S_VERSION = '1.9'
export const MINIMAL_K8S_VERSION = '1.19'
export const MINIMAL_HELM_VERSION = '2.15'
export const CHE_POD_MANIFEST_FILE = '/home/user/eclipse-che/tomcat/webapps/ROOT/META-INF/MANIFEST.MF'
export const CHE_PREFFIX_VERSION = 'Implementation-Version: '
Expand Down Expand Up @@ -88,8 +86,8 @@ export namespace VersionHelper {
task.title = `${task.title}: Unknown.`
}

if (!flags['skip-version-check'] && actualVersion) {
const checkPassed = checkMinimalVersion(actualVersion, MINIMAL_K8S_VERSION)
if (isKubernetesPlatformFamily(flags.platform) && !flags['skip-version-check'] && actualVersion) {
const checkPassed = checkMinimalK8sVersion(actualVersion)
if (!checkPassed) {
throw getMinimalVersionError(actualVersion, MINIMAL_K8S_VERSION, 'Kubernetes')
}
Expand Down