diff --git a/README.md b/README.md index 5b5259803..55bb33bd2 100644 --- a/README.md +++ b/README.md @@ -284,9 +284,15 @@ OPTIONS --plugin-registry-url=plugin-registry-url The URL of the external plugin registry. + --postgres-pvc-storage-class-name=postgres-pvc-storage-class-name + persistent volume storage class name to use to store Eclipse Che Postgres database + --self-signed-cert Authorize usage of self signed certificates for encryption. Note that `self-signed-cert` secret with CA certificate must be created in the configured namespace. + + --workspace-pvc-storage-class-name=workspace-pvc-storage-class-name + persistent volume(s) storage class name to use to store Eclipse Che workspaces data ``` _See code: [src/commands/server/start.ts](https://github.com/che-incubator/chectl/blob/v0.0.2/src/commands/server/start.ts)_ diff --git a/src/api/kube.ts b/src/api/kube.ts index 23dbeadc7..1ce35051f 100644 --- a/src/api/kube.ts +++ b/src/api/kube.ts @@ -964,17 +964,20 @@ export class KubeHelper { } yamlCr.spec.server.selfSignedCert = flags['self-signed-cert'] yamlCr.spec.k8s.ingressDomain = flags.domain - let pluginRegistryUrl = flags['plugin-registry-url'] + const pluginRegistryUrl = flags['plugin-registry-url'] if (pluginRegistryUrl) { yamlCr.spec.server.pluginRegistryUrl = pluginRegistryUrl yamlCr.spec.server.externalPluginRegistry = true } - let devfileRegistryUrl = flags['devfile-registry-url'] + const devfileRegistryUrl = flags['devfile-registry-url'] if (devfileRegistryUrl) { yamlCr.spec.server.devfileRegistryUrl = devfileRegistryUrl yamlCr.spec.server.externalDevfileRegistry = true } + yamlCr.spec.storage.postgresPVCStorageClassName = flags['postgres-pvc-storage-class-name'] + yamlCr.spec.storage.workspacePVCStorageClassName = flags['workspace-pvc-storage-class-name'] + if (flags.cheimage === DEFAULT_CHE_IMAGE && yamlCr.spec.server.cheImageTag !== 'nightly' && yamlCr.spec.server.cheImageTag !== 'latest') { diff --git a/src/commands/server/start.ts b/src/commands/server/start.ts index 7a5a59c77..0c7bbd648 100644 --- a/src/commands/server/start.ts +++ b/src/commands/server/start.ts @@ -113,6 +113,15 @@ export default class Start extends Command { directory: string({ char: 'd', description: 'Directory to store logs into' + }), + 'workspace-pvc-storage-class-name': string({ + description: 'persistent volume(s) storage class name to use to store Eclipse Che workspaces data', + env: 'CHE_INFRA_KUBERNETES_PVC_STORAGE__CLASS__NAME', + default: '' + }), + 'postgres-pvc-storage-class-name': string({ + description: 'persistent volume storage class name to use to store Eclipse Che Postgres database', + default: '' }) } diff --git a/src/tasks/installers/helm.ts b/src/tasks/installers/helm.ts index a02fc9527..2970fd369 100644 --- a/src/tasks/installers/helm.ts +++ b/src/tasks/installers/helm.ts @@ -321,6 +321,14 @@ error: E_COMMAND_FAILED`) ctx.isDevfileRegistryDeployed = true } + if (flags['workspace-pvc-storage-class-name']) { + setOptions.push(`--set global.cheWorkspacePVCStorageClassName=${flags['workspace-pvc-storage-class-name']}`) + } + + if (flags['postgres-pvc-storage-class-name']) { + setOptions.push(`--set global.chePostgresPVCStorageClassName=${flags['postgres-pvc-storage-class-name']}`) + } + setOptions.push(`--set global.ingressDomain=${flags.domain}`) setOptions.push(`--set cheImage=${flags.cheimage}`) setOptions.push(`--set global.cheWorkspacesNamespace=${flags.chenamespace}`) diff --git a/yarn.lock b/yarn.lock index 9433ee8f9..5c3714393 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1677,11 +1677,11 @@ ecc-jsbn@~0.1.1: "eclipse-che-operator@git://github.com/eclipse/che-operator#master": version "0.0.0" - resolved "git://github.com/eclipse/che-operator#2e47c3331782868d7b120718ded7be5f5e64c9da" + resolved "git://github.com/eclipse/che-operator#18758810310ee6b163cf59719dcffb9e5b33ea28" "eclipse-che@git://github.com/eclipse/che#master": version "0.0.0" - resolved "git://github.com/eclipse/che#dfdc304120cb3286071f4f8a0ded2df0d9b805e4" + resolved "git://github.com/eclipse/che#5ced53ef23269513de294be9689d91c4117fce95" editorconfig@^0.15.0: version "0.15.3"