diff --git a/.gitignore b/.gitignore index 55489e987d..bed5638306 100644 --- a/.gitignore +++ b/.gitignore @@ -25,10 +25,7 @@ vendor # Antora .cache node_modules/ -build/plain-asciidoc -build/site -build/site.zip -build/site-unbranded +build/ # Keep Vale styles external .vale/styles/CheDocs* diff --git a/antora-playbook-for-development.yml b/antora-playbook-for-development.yml index b2f4d23236..7b3b72ecda 100644 --- a/antora-playbook-for-development.yml +++ b/antora-playbook-for-development.yml @@ -13,9 +13,16 @@ content: edit_url: "https://github.com/eclipse-che/che-docs/edit/main/{path}" antora: extensions: - - require: "@antora/lunr-extension" + - id: search + require: '@antora/lunr-extension' index_latest_only: true snippet_length: 142 + - id: collector + require: '@antora/collector-extension' + - id: htmltest + require: ./extensions/htmltest.js + - id: antora-to-plain-asciidoc + require: ./extensions/antora-to-plain-asciidoc.js asciidoc: sourcemap: true output: @@ -32,8 +39,7 @@ ui: urls: html_extension_style: indexify redirect_facility: static - # latest_prerelease_version_segment: next - # latest_version_segment: stable + latest_prerelease_version_segment: next latest_version_segment_strategy: replace runtime: cache_dir: ./.cache/antora diff --git a/antora.yml b/antora.yml index 0b329e163a..84bf5ac8fd 100644 --- a/antora.yml +++ b/antora.yml @@ -98,8 +98,8 @@ asciidoc: prod-upstream: Eclipse Che prod-url: "https://__<che_fqdn>__" prod-ver-major: "7" - prod-ver-patch: "7.50.0" - prod-ver: "7.50" + prod-ver-patch: "7.53.0" + prod-ver: "7.53" prod-workspace: che-ws prod: Eclipse Che prod2: Eclipse Che @@ -108,3 +108,27 @@ asciidoc: rh-os-devspaces: Red Hat OpenShift Dev Spaces rh-os-local: Red Hat OpenShift Local theia-endpoint-image: eclipse/che-theia-endpoint-runtime:next +ext: + collector: + - run: + command: ./tools/detect-unused-content.sh + - run: + command: ./tools/validate_language_changes.sh + - run: + command: ./tools/checluster_docs_gen.sh + scan: + base: modules/administration-guide/examples/checluster-properties + dir: build/collector/checluster-properties + files: checluster-properties.adoc + - run: + command: ./tools/environment_docs_gen.sh + scan: + base: modules/administration-guide/examples/che-server-properties + dir: build/collector/che-server-properties + files: system-variables.adoc + - run: + command: ./tools/create_architecture_diagrams.py + scan: + base: modules/administration-guide/images/architecture/ + dir: build/collector/architecture-diagrams + files: '*.png' diff --git a/extensions/antora-to-plain-asciidoc.js b/extensions/antora-to-plain-asciidoc.js new file mode 100644 index 0000000000..110f14f40c --- /dev/null +++ b/extensions/antora-to-plain-asciidoc.js @@ -0,0 +1,21 @@ +// Copyright (c) 2022 Red Hat, Inc. +// This program and the accompanying materials are made +// available under the terms of the Eclipse Public License 2.0 +// which is available at https://www.eclipse.org/legal/epl-2.0/ +// +// SPDX-License-Identifier: EPL-2.0 +// + +// Validate the docs asynchronously. +'use strict' +module.exports.register = function () { + this.on('sitePublished', () => { + require('child_process').execFile('./tools/antora-to-plain-asciidoc.sh', (error, stdout, stderr) => { + if (error) { + console.log(stdout + stderr); + return; + } + console.log(stdout); + }) + }) +} diff --git a/extensions/htmltest.js b/extensions/htmltest.js new file mode 100644 index 0000000000..0d5b2bbcd4 --- /dev/null +++ b/extensions/htmltest.js @@ -0,0 +1,21 @@ +// Copyright (c) 2022 Red Hat, Inc. +// This program and the accompanying materials are made +// available under the terms of the Eclipse Public License 2.0 +// which is available at https://www.eclipse.org/legal/epl-2.0/ +// +// SPDX-License-Identifier: EPL-2.0 +// + +// Validate the docs asynchronously. +'use strict' +module.exports.register = function () { + this.on('sitePublished', () => { + require('child_process').execFile('htmltest', (error, stdout, stderr) => { + if (error) { + console.log(stdout + stderr); + return; + } + console.log(stdout); + }) + }) +} diff --git a/gulpfile.js b/gulpfile.js index 199b71b429..ad47eaf3eb 100644 --- a/gulpfile.js +++ b/gulpfile.js @@ -1,119 +1,31 @@ 'use strict' +const antora = require('@antora/site-generator') const connect = require('gulp-connect') -const util = require('util'); -const exec = util.promisify(require('child_process').exec); -const fs = require('fs') -const generator = require('@antora/site-generator') -const { reload: livereload } = process.env.LIVERELOAD === 'true' ? require('gulp-connect') : {} -const { parallel, series, src, watch } = require('gulp') -const yaml = require('js-yaml') - -const playbookFilename = 'antora-playbook-for-development.yml' -const playbook = yaml.load(fs.readFileSync(playbookFilename, 'utf8')) -const outputDir = (playbook.output || {}).dir || './build/site' -const serverConfig = { name: 'Preview Site', livereload, host: '0.0.0.0', port: 4000, root: outputDir } -const antoraArgs = ['--playbook', playbookFilename] -const watchPatterns = playbook.content.sources.filter((source) => !source.url.includes(':')).reduce((accum, source) => { - accum.push(`./antora.yml`) - accum.push(`./modules/**/*`) - return accum -}, []) +const gulp = require('gulp') function generate(done) { - generator(antoraArgs, process.env) - .then(() => done()) - .catch((err) => { - console.log(err) - done() + antora(['--playbook', 'antora-playbook-for-development.yml'], process.env) + .then(() => done()) + .catch((err) => { + console.log(err) + done() }) + connect.reload() } async function serve(done) { - connect.server(serverConfig, function () { - this.server.on('close', done) - watch(watchPatterns, series(generate, testlang, testhtml, detect_unused_content, antora_to_plain_asciidoc)) - if (livereload) watch(this.root).on('change', (filepath) => src(filepath, { read: false }).pipe(livereload())) - }) -} - -async function checluster_docs_gen() { - // Report script errors but don't make gulp fail. - try { - const { stdout, stderr } = await exec('tools/checluster_docs_gen.sh') - console.log(stdout); - console.error(stderr); - } - catch (error) { - console.log(error.stdout); - console.log(error.stderr); - return; - } -} - -async function environment_docs_gen() { - // Report script errors but don't make gulp fail. - try { - const { stdout, stderr } = await exec('tools/environment_docs_gen.sh') - console.log(stdout, stderr); - } - catch (error) { - console.log(error.stdout, error.stderr); - return; - } -} - -async function testhtml() { - // Report links errors but don't make gulp fail. - try { - const { stdout, stderr } = await exec('htmltest') - console.log(stdout, stderr); - } - catch (error) { - console.log(error.stdout, error.stderr); - return; - } -} - -async function testlang() { - // Report language errors but don't make gulp fail. - try { - const { stdout, stderr } = await exec('./tools/validate_language_changes.sh') - console.log(stdout, stderr); - } - catch (error) { - console.log(error.stdout, error.stderr); - return; - } -} - -async function detect_unused_content() { - // Report unused images but don't make gulp fail. - try { - const { stdout, stderr } = await exec('./tools/detect-unused-content.sh') - console.log(stdout, stderr); - } - catch (error) { - console.log(error.stdout, error.stderr); - return; - } -} - -async function antora_to_plain_asciidoc() { - // Report unused images but don't make gulp fail. - try { - const { stdout, stderr } = await exec('./tools/antora-to-plain-asciidoc.sh') - console.log(stdout, stderr); - } - catch (error) { - console.log(error.stdout, error.stderr); - return; - } -} - -exports.default = series( - parallel(checluster_docs_gen, environment_docs_gen), - generate, - serve, - parallel(testlang, testhtml, detect_unused_content, antora_to_plain_asciidoc) + connect.server({ + name: 'Preview Site', + livereload: true, + host: '0.0.0.0', + port: 4000, + root: './build/site' + }); + gulp.watch(['./modules/**/*'], generate) +} + +exports.default = gulp.series( + generate, + serve, ); diff --git a/modules/administration-guide/examples/checluster-properties.adoc b/modules/administration-guide/examples/checluster-properties.adoc deleted file mode 100644 index 7e0d025460..0000000000 --- a/modules/administration-guide/examples/checluster-properties.adoc +++ /dev/null @@ -1,165 +0,0 @@ -pass:[] - -[id="checluster-custom-resource-devEnvironments-settings_{context}"] -.Development environment configuration options. - -[cols="2,5", options="header"] -:=== - Property: Description -defaultComponents: Default components applied to DevWorkspaces. These default components are meant to be used when a Devfile, that does not contain any components. -defaultEditor: The default editor to workspace create with. It could be a plugin ID or a URI. The plugin ID must have `publisher/plugin/version` format. The URI must start from `http\://` or `https\://`. -defaultNamespace: User's default namespace. -defaultPlugins: Default plug-ins applied to DevWorkspaces. -nodeSelector: The node selector limits the nodes that can run the workspace pods. -storage: Workspaces persistent storage. -tolerations: The pod tolerations of the workspace pods limit where the workspace pods can run. -trustedCerts: Trusted certificate settings. -:=== - -[id="checluster-custom-resource-components-settings_{context}"] -.{prod-short} components configuration. - -[cols="2,5", options="header"] -:=== - Property: Description -cheServer: General configuration settings related to the Che server. -dashboard: Configuration settings related to the dashboard used by the Che installation. -database: Configuration settings related to the database used by the Che installation. -devWorkspace: DevWorkspace Operator configuration. -devfileRegistry: Configuration settings related to the devfile registry used by the Che installation. -imagePuller: Kubernetes Image Puller configuration. -metrics: Che server metrics configuration. -pluginRegistry: Configuration settings related to the plug-in registry used by the Che installation. -:=== - -[id="checluster-custom-resource-components-properties-devWorkspace-settings_{context}"] -.DevWorkspace operator component configuration. - -[cols="2,5", options="header"] -:=== - Property: Description -deployment: Deployment override options. -runningLimit: The maximum number of running workspaces per user. -:=== - -[id="checluster-custom-resource-components-properties-cheServer-settings_{context}"] -.General configuration settings related to the {prod-short} server component. - -[cols="2,5", options="header"] -:=== - Property: Description -clusterRoles: ClusterRoles assigned to Che ServiceAccount. The defaults roles are\: - `-cheworkspaces-namespaces-clusterrole` - `-cheworkspaces-clusterrole` - `-cheworkspaces-devworkspace-clusterrole` where the is the namespace where the CheCluster CRD is created. Each role must have a `app.kubernetes.io/part-of=che.eclipse.org` label. The Che Operator must already have all permissions in these ClusterRoles to grant them. -debug: Enables the debug mode for Che server. -deployment: Deployment override options. -extraProperties: A map of additional environment variables applied in the generated `che` ConfigMap to be used by the Che server in addition to the values already generated from other fields of the `CheCluster` custom resource (CR). If the `extraProperties` field contains a property normally generated in `che` ConfigMap from other CR fields, the value defined in the `extraProperties` is used instead. -logLevel: The log level for the Che server\: `INFO` or `DEBUG`. -proxy: Proxy server settings for Kubernetes cluster. No additional configuration is required for OpenShift cluster. By specifying these settings for the OpenShift cluster, you override the OpenShift proxy configuration. -:=== - -[id="checluster-custom-resource-components-properties-pluginRegistry-settings_{context}"] -.Configuration settings related to the Plug-in registry component used by the {prod-short} installation. - -[cols="2,5", options="header"] -:=== - Property: Description -deployment: Deployment override options. -disableInternalRegistry: Disables internal plug-in registry. -externalPluginRegistries: External plugin registries. -:=== - -[id="checluster-custom-resource-components-properties-devfileRegistry-settings_{context}"] -.Configuration settings related to the Devfile registry component used by the {prod-short} installation. - -[cols="2,5", options="header"] -:=== - Property: Description -deployment: Deployment override options. -disableInternalRegistry: Disables internal devfile registry. -externalDevfileRegistries: External devfile registries serving sample ready-to-use devfiles. -:=== - -[id="checluster-custom-resource-components-properties-database-settings_{context}"] -.Configuration settings related to the Database component used by the {prod-short} installation. - -[cols="2,5", options="header"] -:=== - Property: Description -credentialsSecretName: The secret that contains PostgreSQL `user` and `password` that the Che server uses to connect to the database. The secret must have a `app.kubernetes.io/part-of=che.eclipse.org` label. -deployment: Deployment override options. -externalDb: Instructs the Operator to deploy a dedicated database. By default, a dedicated PostgreSQL database is deployed as part of the Che installation. When `externalDb` is set as `true`, no dedicated database is deployed by the Operator and you need to provide connection details about the external database you want to use. -postgresDb: PostgreSQL database name that the Che server uses to connect to the database. -postgresHostName: PostgreSQL database hostname that the Che server connects to. Override this value only when using an external database. See field `externalDb`. -postgresPort: PostgreSQL Database port the Che server connects to. Override this value only when using an external database. See field `externalDb`. -pvc: PVC settings for PostgreSQL database. -:=== - -[id="checluster-custom-resource-components-properties-dashboard-settings_{context}"] -.Configuration settings related to the Dashboard component used by the {prod-short} installation. - -[cols="2,5", options="header"] -:=== - Property: Description -deployment: Deployment override options. -headerMessage: Dashboard header message. -:=== - -[id="checluster-custom-resource-components-properties-imagePuller-settings_{context}"] -.Kubernetes Image Puller component configuration. - -[cols="2,5", options="header"] -:=== - Property: Description -enable: Install and configure the community supported Kubernetes Image Puller Operator. When you set the value to `true` without providing any specs, it creates a default Kubernetes Image Puller object managed by the Operator. When you set the value to `false`, the Kubernetes Image Puller object is deleted, and the Operator uninstalled, regardless of whether a spec is provided. If you leave the `spec.images` field empty, a set of recommended workspace-related images is automatically detected and pre-pulled after installation. Note that while this Operator and its behavior is community-supported, its payload may be commercially-supported for pulling commercially-supported images. -spec: A Kubernetes Image Puller spec to configure the image puller in the CheCluster. -:=== - -[id="checluster-custom-resource-components-properties-metrics-settings_{context}"] -.{prod-short} server metrics component configuration. - -[cols="2,5", options="header"] -:=== - Property: Description -enable: Enables `metrics` for the Che server endpoint. -:=== - -[id="checluster-custom-resource-networking-settings_{context}"] -.Networking, {prod-short} authentication and TLS configuration. - -[cols="2,5", options="header"] -:=== - Property: Description -annotations: Defines annotations which will be set for an Ingress (a route for OpenShift platform). The defaults for kubernetes platforms are\: kubernetes.io/ingress.class\: \nginx\ nginx.ingress.kubernetes.io/proxy-read-timeout\: \3600\, nginx.ingress.kubernetes.io/proxy-connect-timeout\: \3600\, nginx.ingress.kubernetes.io/ssl-redirect\: \true\ -auth: Authentication settings. -domain: For an OpenShift cluster, the Operator uses the domain to generate a hostname for the route. The generated hostname follows this pattern\: che-.. The is the namespace where the CheCluster CRD is created. In conjunction with labels, it creates a route served by a non-default Ingress controller. For a Kubernetes cluster, it contains a global ingress domain. There are no default values\: you must specify them. -hostname: The public hostname of the installed Che server. -labels: Defines labels which will be set for an Ingress (a route for OpenShift platform). -tlsSecretName: The name of the secret used to set up Ingress TLS termination. If the field is an empty string, the default cluster certificate is used. The secret must have a `app.kubernetes.io/part-of=che.eclipse.org` label. -:=== - -[id="checluster-custom-resource-containerRegistry-settings_{context}"] -.Configuration of an alternative registry that stores {prod-short} images. - -[cols="2,5", options="header"] -:=== - Property: Description -hostname: An optional hostname or URL of an alternative container registry to pull images from. This value overrides the container registry hostname defined in all the default container images involved in a Che deployment. This is particularly useful for installing Che in a restricted environment. -organization: An optional repository name of an alternative registry to pull images from. This value overrides the container registry organization defined in all the default container images involved in a Che deployment. This is particularly useful for installing {prod-short} in a restricted environment. -:=== - -[id="checluster-custom-resource-status-settings_{context}"] -.`CheCluster` Custom Resource `status` defines the observed state of {prod-short} installation - -[cols="2,5", options="header"] -:=== - Property: Description -chePhase: Specifies the current phase of the Che deployment. -cheURL: Public URL of the Che server. -cheVersion: Currently installed Che version. -devfileRegistryURL: The public URL of the internal devfile registry. -gatewayPhase: Specifies the current phase of the gateway deployment. -message: A human readable message indicating details about why the Che deployment is in the current phase. -pluginRegistryURL: The public URL of the internal plug-in registry. -postgresVersion: The PostgreSQL version of the image in use. -reason: A brief CamelCase message indicating details about why the Che deployment is in the current phase. -workspaceBaseDomain: The resolved workspace base domain. This is either the copy of the explicitly defined property of the same name in the spec or, if it is undefined in the spec and we're running on OpenShift, the automatically resolved basedomain for routes. -:=== diff --git a/modules/administration-guide/examples/system-variables.adoc b/modules/administration-guide/examples/system-variables.adoc deleted file mode 100644 index 774cc9650a..0000000000 --- a/modules/administration-guide/examples/system-variables.adoc +++ /dev/null @@ -1,1734 +0,0 @@ -pass:[] - - -[id="{prod-id-short}-server"] -= {prod-short} server - - -== `+CHE_API+` - -API service. Browsers initiate REST communications to {prod-short} server with this URL. - -Default::: `+http://${CHE_HOST}:${CHE_PORT}/api+` - -''' - - -== `+CHE_API_INTERNAL+` - -API service internal network URL. Back-end services should initiate REST communications to {prod-short} server with this URL - -Default::: `+NULL+` - -''' - - -== `+CHE_WEBSOCKET_ENDPOINT+` - -{prod-short} WebSocket major endpoint. Provides basic communication endpoint for major WebSocket interactions and messaging. - -Default::: `+ws://${CHE_HOST}:${CHE_PORT}/api/websocket+` - -''' - - -== `+CHE_WEBSOCKET_INTERNAL_ENDPOINT+` - -{prod-short} WebSocket major internal endpoint. Provides basic communication endpoint for major WebSocket interactions and messaging. - -Default::: `+NULL+` - -''' - - -== `+CHE_WORKSPACE_PROJECTS_STORAGE+` - -Your projects are synchronized from the {prod-short} server into the machine running each workspace. This is the directory in the machine where your projects are placed. - -Default::: `+/projects+` - -''' - - -== `+CHE_WORKSPACE_PROJECTS_STORAGE_DEFAULT_SIZE+` - -Used when {orch-name}-type components in a devfile request project PVC creation (Applied in case of `unique` and `per workspace` PVC strategy. In case of the `common` PVC strategy, it is rewritten with the value of the `che.infra.kubernetes.pvc.quantity` property.) - -Default::: `+1Gi+` - -''' - - -== `+CHE_WORKSPACE_LOGS_ROOT__DIR+` - -Defines the directory inside the machine where all the workspace logs are placed. Provide this value into the machine, for example, as an environment variable. This is to ensure that agent developers can use this directory to back up agent logs. - -Default::: `+/workspace_logs+` - -''' - - -== `+CHE_WORKSPACE_HTTP__PROXY+` - -Configures environment variable HTTP_PROXY to a specified value in containers powering workspaces. - -Default::: empty - -''' - - -== `+CHE_WORKSPACE_HTTPS__PROXY+` - -Configures environment variable HTTPS_PROXY to a specified value in containers powering workspaces. - -Default::: empty - -''' - - -== `+CHE_WORKSPACE_NO__PROXY+` - -Configures environment variable NO_PROXY to a specified value in containers powering workspaces. - -Default::: empty - -''' - - -== `+CHE_WORKSPACE_AUTO__START+` - -By default, when users access a workspace with its URL, the workspace automatically starts (if currently stopped). Set this to `false` to disable this behavior. - -Default::: `+true+` - -''' - - -== `+CHE_WORKSPACE_POOL_TYPE+` - -Workspace threads pool configuration. This pool is used for workspace-related operations that require asynchronous execution, for example, starting and stopping. Possible values are `fixed` and `cached`. - -Default::: `+fixed+` - -''' - - -== `+CHE_WORKSPACE_POOL_EXACT__SIZE+` - -This property is ignored when pool type is different from `fixed`. It configures the exact size of the pool. When set, the `multiplier` property is ignored. If this property is not set (`0`, `<0`, `NULL`), then the pool size equals the number of cores. See also `che.workspace.pool.cores_multiplier`. - -Default::: `+30+` - -''' - - -== `+CHE_WORKSPACE_POOL_CORES__MULTIPLIER+` - -This property is ignored when pool type is not set to `fixed`, `che.workspace.pool.exact_size` is set. When set, the pool size is `N_CORES * multiplier`. - -Default::: `+2+` - -''' - - -== `+CHE_WORKSPACE_PROBE__POOL__SIZE+` - -This property specifies how many threads to use for workspace server liveness probes. - -Default::: `+10+` - -''' - - -== `+CHE_WORKSPACE_HTTP__PROXY__JAVA__OPTIONS+` - -HTTP proxy setting for workspace JVM. - -Default::: `+NULL+` - -''' - - -== `+CHE_WORKSPACE_JAVA__OPTIONS+` - -Java command-line options added to JVMs running in workspaces. - -Default::: `+-XX:MaxRAM=150m-XX:MaxRAMFraction=2 -XX:+UseParallelGC -XX:MinHeapFreeRatio=10 -XX:MaxHeapFreeRatio=20 -XX:GCTimeRatio=4 -XX:AdaptiveSizePolicyWeight=90 -Dsun.zip.disableMemoryMapping=true -Xms20m -Djava.security.egd=file:/dev/./urandom+` - -''' - - -== `+CHE_WORKSPACE_MAVEN__OPTIONS+` - -Maven command-line options added to JVMs running agents in workspaces. - -Default::: `+-XX:MaxRAM=150m-XX:MaxRAMFraction=2 -XX:+UseParallelGC -XX:MinHeapFreeRatio=10 -XX:MaxHeapFreeRatio=20 -XX:GCTimeRatio=4 -XX:AdaptiveSizePolicyWeight=90 -Dsun.zip.disableMemoryMapping=true -Xms20m -Djava.security.egd=file:/dev/./urandom+` - -''' - - -== `+CHE_WORKSPACE_DEFAULT__MEMORY__LIMIT__MB+` - -RAM limit default for each machine that has no RAM settings in its environment. Value less or equal to 0 is interpreted as disabling the limit. - -Default::: `+1024+` - -''' - - -== `+CHE_WORKSPACE_DEFAULT__MEMORY__REQUEST__MB+` - -RAM request for each container that has no explicit RAM settings in its environment. This amount is allocated when the workspace container is created. This property may not be supported by all infrastructure implementations. Currently it is supported by {orch-name}. A memory request exceeding the memory limit is ignored, and only the limit size is used. Value less or equal to 0 is interpreted as disabling the limit. - -Default::: `+200+` - -''' - - -== `+CHE_WORKSPACE_DEFAULT__CPU__LIMIT__CORES+` - -CPU limit for each container that has no CPU settings in its environment. Specify either in floating point cores number, for example, `0.125`, or using the Kubernetes format, integer millicores, for example, `125m`. Value less or equal to 0 is interpreted as disabling the limit. - -Default::: `+-1+` - -''' - - -== `+CHE_WORKSPACE_DEFAULT__CPU__REQUEST__CORES+` - -CPU request for each container that has no CPU settings in environment. A CPU request exceeding the CPU limit is ignored, and only limit number is used. Value less or equal to 0 is interpreted as disabling the limit. - -Default::: `+-1+` - -''' - - -== `+CHE_WORKSPACE_SIDECAR_DEFAULT__MEMORY__LIMIT__MB+` - -RAM limit for each sidecar that has no RAM settings in the {prod-short} plug-in configuration. Value less or equal to 0 is interpreted as disabling the limit. - -Default::: `+128+` - -''' - - -== `+CHE_WORKSPACE_SIDECAR_DEFAULT__MEMORY__REQUEST__MB+` - -RAM request for each sidecar that has no RAM settings in the {prod-short} plug-in configuration. - -Default::: `+64+` - -''' - - -== `+CHE_WORKSPACE_SIDECAR_DEFAULT__CPU__LIMIT__CORES+` - -CPU limit default for each sidecar that has no CPU settings in the {prod-short} plug-in configuration. Specify either in floating point cores number, for example, `0.125`, or using the Kubernetes format, integer millicores, for example, `125m`. Value less or equal to 0 is interpreted as disabling the limit. - -Default::: `+-1+` - -''' - - -== `+CHE_WORKSPACE_SIDECAR_DEFAULT__CPU__REQUEST__CORES+` - -CPU request default for each sidecar that has no CPU settings in the {prod-short} plug-in configuration. Specify either in floating point cores number, for example, `0.125`, or using the Kubernetes format, integer millicores, for example, `125m`. - -Default::: `+-1+` - -''' - - -== `+CHE_WORKSPACE_SIDECAR_IMAGE__PULL__POLICY+` - -Defines image-pulling strategy for sidecars. Possible values are: `Always`, `Never`, `IfNotPresent`. For any other value, `Always` is assumed for images with the `:latest` tag, or `IfNotPresent` for all other cases. - -Default::: `+Always+` - -''' - - -== `+CHE_WORKSPACE_ACTIVITY__CHECK__SCHEDULER__PERIOD__S+` - -Period of inactive workspaces suspend job execution. - -Default::: `+60+` - -''' - - -== `+CHE_WORKSPACE_ACTIVITY__CLEANUP__SCHEDULER__PERIOD__S+` - -The period of the cleanup of the activity table. The activity table can contain invalid or stale data if some unforeseen errors happen, as a server failure at a peculiar point in time. The default is to run the cleanup job every hour. - -Default::: `+3600+` - -''' - - -== `+CHE_WORKSPACE_ACTIVITY__CLEANUP__SCHEDULER__INITIAL__DELAY__S+` - -The delay after server startup to start the first activity clean up job. - -Default::: `+60+` - -''' - - -== `+CHE_WORKSPACE_ACTIVITY__CHECK__SCHEDULER__DELAY__S+` - -Delay before first workspace idleness check job started to avoid mass suspend if {prod-short} server was unavailable for period close to inactivity timeout. - -Default::: `+180+` - -''' - - -== `+CHE_WORKSPACE_CLEANUP__TEMPORARY__INITIAL__DELAY__MIN+` - -Time to delay the first execution of temporary workspaces cleanup job. - -Default::: `+5+` - -''' - - -== `+CHE_WORKSPACE_CLEANUP__TEMPORARY__PERIOD__MIN+` - -Time to delay between the termination of one execution and the commencement of the next execution of temporary workspaces cleanup job - -Default::: `+180+` - -''' - - -== `+CHE_WORKSPACE_SERVER_PING__SUCCESS__THRESHOLD+` - -Number of sequential successful pings to server after which it is treated as available. the {prod-short} Operator: the property is common for all servers, for example, workspace agent, terminal, exec. - -Default::: `+1+` - -''' - - -== `+CHE_WORKSPACE_SERVER_PING__INTERVAL__MILLISECONDS+` - -Interval, in milliseconds, between successive pings to workspace server. - -Default::: `+3000+` - -''' - - -== `+CHE_WORKSPACE_SERVER_LIVENESS__PROBES+` - -List of servers names which require liveness probes - -Default::: `+wsagent/http,exec-agent/http,terminal,theia,jupyter,dirigible,cloud-shell,intellij+` - -''' - - -== `+CHE_WORKSPACE_STARTUP__DEBUG__LOG__LIMIT__BYTES+` - -Limit size of the logs collected from single container that can be observed by che-server when debugging workspace startup. default 10MB=10485760 - -Default::: `+10485760+` - -''' - - -== `+CHE_WORKSPACE_STOP_ROLE_ENABLED+` - -If true, 'stop-workspace' role with the edit privileges will be granted to the 'che' ServiceAccount if OpenShift OAuth is enabled. This configuration is mainly required for workspace idling when the OpenShift OAuth is enabled. - -Default::: `+true+` - -''' - - -== `+CHE_DEVWORKSPACES_ENABLED+` - -Specifies whether {prod-short} is deployed with DevWorkspaces enabled. This property is set by the {prod-short} Operator if it also installed the support for DevWorkspaces. This property is used to advertise this fact to the {prod-short} dashboard. It does not make sense to change the value of this property manually. - -Default::: `+false+` - -''' - - -[id="authentication-parameters"] -= Authentication parameters - - -== `+CHE_AUTH_USER__SELF__CREATION+` - -{prod-short} has a single identity implementation, so this does not change the user experience. If true, enables user creation at API level - -Default::: `+false+` - -''' - - -== `+CHE_AUTH_ACCESS__DENIED__ERROR__PAGE+` - -Authentication error page address - -Default::: `+/error-oauth+` - -''' - - -== `+CHE_AUTH_RESERVED__USER__NAMES+` - -Reserved user names - -Default::: empty - -''' - - -== `+CHE_OAUTH2_GITHUB_CLIENTID__FILEPATH+` - -Configuration of GitHub OAuth2 client. Used to obtain Personal access tokens. Location of the file with GitHub client id. - -Default::: `+NULL+` - -''' - - -== `+CHE_OAUTH2_GITHUB_CLIENTSECRET__FILEPATH+` - -Location of the file with GitHub client secret. - -Default::: `+NULL+` - -''' - - -== `+CHE_OAUTH_GITHUB_AUTHURI+` - -GitHub OAuth authorization URI. - -Default::: `+https://github.com/login/oauth/authorize+` - -''' - - -== `+CHE_OAUTH_GITHUB_TOKENURI+` - -GitHub OAuth token URI. - -Default::: `+https://github.com/login/oauth/access_token+` - -''' - - -== `+CHE_OAUTH_GITHUB_REDIRECTURIS+` - -GitHub OAuth redirect URIs. Separate multiple values with comma, for example: URI,URI,URI - -Default::: `+http://localhost:${CHE_PORT}/api/oauth/callback+` - -''' - - -== `+CHE_OAUTH_OPENSHIFT_CLIENTID+` - -Configuration of OpenShift OAuth client. Used to obtain OpenShift OAuth token. OpenShift OAuth client ID. - -Default::: `+NULL+` - -''' - - -== `+CHE_OAUTH_OPENSHIFT_CLIENTSECRET+` - -Configurationof OpenShift OAuth client. Used to obtain OpenShift OAuth token. OpenShift OAuth client ID. OpenShift OAuth client secret. - -Default::: `+NULL+` - -''' - - -== `+CHE_OAUTH_OPENSHIFT_OAUTH__ENDPOINT+` - -ConfigurationofOpenShift OAuth client. Used to obtain OpenShift OAuth token. OpenShift OAuth client ID. OpenShift OAuth client secret. OpenShift OAuth endpoint. - -Default::: `+NULL+` - -''' - - -== `+CHE_OAUTH_OPENSHIFT_VERIFY__TOKEN__URL+` - -ConfigurationofOpenShiftOAuth client. Used to obtain OpenShift OAuth token. OpenShift OAuth client ID. OpenShift OAuth client secret. OpenShift OAuth endpoint. OpenShift OAuth verification token URL. - -Default::: `+NULL+` - -''' - - -== `+CHE_OAUTH1_BITBUCKET_CONSUMERKEYPATH+` - -Configuration of Bitbucket Server OAuth1 client. Used to obtain Personal access tokens. Location of the file with Bitbucket Server application consumer key (equivalent to a username). - -Default::: `+NULL+` - -''' - - -== `+CHE_OAUTH1_BITBUCKET_PRIVATEKEYPATH+` - -Configurationof Bitbucket Server OAuth1 client. Used to obtain Personal access tokens. Location of the file with Bitbucket Server application consumer key (equivalent to a username). Location of the file with Bitbucket Server application private key - -Default::: `+NULL+` - -''' - - -== `+CHE_OAUTH1_BITBUCKET_ENDPOINT+` - -ConfigurationofBitbucket Server OAuth1 client. Used to obtain Personal access tokens. Location of the file with Bitbucket Server application consumer key (equivalent to a username). Location of the file with Bitbucket Server application private key Bitbucket Server URL. To work correctly with factories the same URL has to be part of `che.integration.bitbucket.server_endpoints` too. - -Default::: `+NULL+` - -''' - - -[id="internal"] -= Internal - - -== `+SCHEDULE_CORE__POOL__SIZE+` - -{prod-short} extensions can be scheduled executions on a time basis. This configures the size of the thread pool allocated to extensions that are launched on a recurring schedule. - -Default::: `+10+` - -''' - - -== `+DB_SCHEMA_FLYWAY_BASELINE_ENABLED+` - -DB initialization and migration configuration If true, ignore scripts up to the version configured by baseline.version. - -Default::: `+true+` - -''' - - -== `+DB_SCHEMA_FLYWAY_BASELINE_VERSION+` - -Scripts with version up to this are ignored. Note that scripts with version equal to baseline version are also ignored. - -Default::: `+5.0.0.8.1+` - -''' - - -== `+DB_SCHEMA_FLYWAY_SCRIPTS_PREFIX+` - -Prefix of migration scripts. - -Default::: empty - -''' - - -== `+DB_SCHEMA_FLYWAY_SCRIPTS_SUFFIX+` - -Suffix of migration scripts. - -Default::: `+.sql+` - -''' - - -== `+DB_SCHEMA_FLYWAY_SCRIPTS_VERSION__SEPARATOR+` - -Separator of version from the other part of script name. - -Default::: `+__+` - -''' - - -== `+DB_SCHEMA_FLYWAY_SCRIPTS_LOCATIONS+` - -Locations where to search migration scripts. - -Default::: `+classpath:che-schema+` - -''' - - -[id="kubernetes-infra-parameters"] -= Kubernetes Infra parameters - - -== `+CHE_INFRA_KUBERNETES_MASTER__URL+` - -Configuration of Kubernetes client master URL that Infra will use. - -Default::: empty - -''' - - -== `+CHE_INFRA_KUBERNETES_TRUST__CERTS+` - -Boolean to configure Kubernetes client to use trusted certificates. - -Default::: `+false+` - -''' - - -== `+CHE_INFRA_KUBERNETES_CLUSTER__DOMAIN+` - -Kubernetes cluster domain. If not set, svc names will not contain information about the cluster domain. - -Default::: `+NULL+` - -''' - - -== `+CHE_INFRA_KUBERNETES_SERVER__STRATEGY+` - -Defines the way how servers are exposed to the world in Kubernetes infra. List of strategies implemented in {prod-short}: `default-host`, `multi-host`, `single-host`. - -Default::: `+multi-host+` - -''' - - -== `+CHE_INFRA_KUBERNETES_SINGLEHOST_WORKSPACE_EXPOSURE+` - -Defines the way in which the workspace plugins and editors are exposed in the single-host mode. Supported exposures: `native`: Exposes servers using Kubernetes Ingresses. Works only on Kubernetes. `gateway`: Exposes servers using reverse-proxy gateway. - -Default::: `+native+` - -''' - - -== `+CHE_INFRA_KUBERNETES_SINGLEHOST_WORKSPACE_DEVFILE__ENDPOINT__EXPOSURE+` - -Defines the way how to expose devfile endpoints, as end-user's applications, in single-host server strategy. They can either follow the single-host strategy and be exposed on subpaths, or they can be exposed on subdomains. `multi-host`: expose on subdomains `single-host`: expose on subpaths - -Default::: `+multi-host+` - -''' - - -== `+CHE_INFRA_KUBERNETES_SINGLEHOST_GATEWAY_CONFIGMAP__LABELS+` - -Defines labels which will be set to ConfigMaps configuring single-host gateway. - -Default::: `+app=che,component=che-gateway-config+` - -''' - - -== `+CHE_INFRA_KUBERNETES_INGRESS_DOMAIN+` - -Used to generate domain for a server in a workspace in case property `che.infra.kubernetes.server_strategy` is set to `multi-host` - -Default::: empty - -''' - - -== `+CHE_INFRA_KUBERNETES_NAMESPACE_CREATION__ALLOWED+` - -Indicates whether {prod-short} server is allowed to create {orch-namespace} for user workspaces, or they're intended to be created manually by cluster administrator. This property is also used by the OpenShift infra. - -Default::: `+true+` - -''' - - -== `+CHE_INFRA_KUBERNETES_NAMESPACE_DEFAULT+` - -Defines Kubernetes default namespace in which user's workspaces are created if user does not override it. It's possible to use `` and `` placeholders (for example: `che-workspace-`). In that case, new namespace will be created for each user. Used by OpenShift infra as well to specify a Project. The `` or `` placeholder is mandatory. - -Default::: `+-che+` - -''' - - -== `+CHE_INFRA_KUBERNETES_NAMESPACE_LABEL+` - -Defines whether che-server should try to label the workspace namespaces. NOTE: It is strongly recommended to keep the value of this property set to true. If false, the new workspace namespaces will not be labeled automatically and therefore not recognized by the {prod-short} operator making some features of DevWorkspaces not working. If false, an administrator is required to label the namespaces manually using the labels specified in che.infra.kubernetes.namespace.labels. If you want to manage the namespaces yourself, make sure to follow \https://www.eclipse.org/che/docs/stable/administration-guide/provisioning-namespaces-in-advance/. Any additional labels present on the namespace are kept in place and do not affect the functionality. Also note that the the administrator is free to pre-create and label the namespaces manually even if this property is true. No updates to the namespaces are done if they already conform to the labeling requirements. - -Default::: `+true+` - -''' - - -== `+CHE_INFRA_KUBERNETES_NAMESPACE_ANNOTATE+` - -Defines whether che-server should try to annotate the workspace namespaces. - -Default::: `+true+` - -''' - - -== `+CHE_INFRA_KUBERNETES_NAMESPACE_LABELS+` - -List of labels to find {orch-namespace} that are used for {prod-short} Workspaces. They are used to: - find prepared {orch-namespace} for users in combination with `che.infra.kubernetes.namespace.annotations`. - actively label {orch-namespace} with any workspace. NOTE: It is strongly recommended not to change the value of this property because the {prod-short} operator relies on these labels and their precise values when reconciling DevWorkspaces. If this configuration is changed, the namespaces will not be automatically recognized by the {prod-short} operator as workspace namespaces unless manually labeled as such using the default labels and values. Additional labels on the namespace do not affect the functionality. - -Default::: `+app.kubernetes.io/part-of=che.eclipse.org,app.kubernetes.io/component=workspaces-namespace+` - -''' - - -== `+CHE_INFRA_KUBERNETES_NAMESPACE_ANNOTATIONS+` - -List of annotations to find {orch-namespace} prepared for {prod-short} users workspaces. Only {orch-namespace} matching the `che.infra.kubernetes.namespace.labels` will be matched against these annotations. {orch-namespace} that matches both `che.infra.kubernetes.namespace.labels` and `che.infra.kubernetes.namespace.annotations` will be preferentially used for User's workspaces. It's possible to use `` placeholder to specify the {orch-namespace} to concrete user. They are used to: - find prepared {orch-namespace} for users in combination with `che.infra.kubernetes.namespace.labels`. - actively annotate {orch-namespace} with any workspace. - -Default::: `+che.eclipse.org/username=+` - -''' - - -== `+CHE_INFRA_KUBERNETES_SERVICE__ACCOUNT__NAME+` - -Defines Kubernetes Service Account name which should be specified to be bound to all workspaces Pods. the {prod-short} Operator that Kubernetes Infrastructure will not create the service account and it should exist. OpenShift infrastructure will check if project is predefined(if `che.infra.openshift.project` is not empty): - if it is predefined then service account must exist there - if it is 'NULL' or empty string then infrastructure will create new OpenShift project per workspace and prepare workspace service account with needed roles there - -Default::: `+NULL+` - -''' - - -== `+CHE_INFRA_KUBERNETES_WORKSPACE__SA__CLUSTER__ROLES+` - -Specifies optional, additional cluster roles to use with the workspace service account. the {prod-short} Operator that the cluster role names must already exist, and the {prod-short} service account needs to be able to create a Role Binding to associate these cluster roles with the workspace service account. The names are comma separated. This property deprecates `che.infra.kubernetes.cluster_role_name`. - -Default::: `+NULL+` - -''' - - -== `+CHE_INFRA_KUBERNETES_USER__CLUSTER__ROLES+` - -Cluster roles to assign to user in his namespace - -Default::: `+NULL+` - -''' - - -== `+CHE_INFRA_KUBERNETES_WORKSPACE__START__TIMEOUT__MIN+` - -Defines wait time that limits the Kubernetes workspace start time. - -Default::: `+8+` - -''' - - -== `+CHE_INFRA_KUBERNETES_INGRESS__START__TIMEOUT__MIN+` - -Defines the timeout in minutes that limits the period for which Kubernetes Ingress become ready - -Default::: `+5+` - -''' - - -== `+CHE_INFRA_KUBERNETES_WORKSPACE__UNRECOVERABLE__EVENTS+` - -If during workspace startup an unrecoverable event defined in the property occurs, stop the workspace immediately rather than waiting until timeout. the {prod-short} Operator that this SHOULD NOT include a mere "Failed" reason, because that might catch events that are not unrecoverable. A failed container startup is handled explicitly by {prod-short} server. - -Default::: `+FailedMount,FailedScheduling,MountVolume.SetUpfailed,Failed to pull image,FailedCreate,ReplicaSetCreateError+` - -''' - - -== `+CHE_INFRA_KUBERNETES_PVC_ENABLED+` - -Defines whether use the Persistent Volume Claim for {prod-short} workspace needs, for example: backup projects, logs, or disable it. - -Default::: `+true+` - -''' - - -== `+CHE_INFRA_KUBERNETES_PVC_STRATEGY+` - -Defined which strategy will be used while choosing PVC for workspaces. Supported strategies: `common`: All workspaces in the same {orch-namespace} will reuse the same PVC. Name of PVC may be configured with `che.infra.kubernetes.pvc.name`. Existing PVC will be used or a new one will be created if it does not exist. `unique`: Separate PVC for each workspace's volume will be used. Name of PVC is evaluated as `'{che.infra.kubernetes.pvc.name} + '-' + \{generated_8_chars}'`. Existing PVC will be used or a new one will be created if it does not exist. `per-workspace`: Separate PVC for each workspace will be used. Name of PVC is evaluated as `'{che.infra.kubernetes.pvc.name} + '-' + \{WORKSPACE_ID}'`. Existing PVC will be used or a new one will be created if it doesn't exist. - -Default::: `+common+` - -''' - - -== `+CHE_INFRA_KUBERNETES_PVC_PRECREATE__SUBPATHS+` - -Defines whether to run a job that creates workspace's subpath directories in persistent volume for the `common` strategy before launching a workspace. Necessary in some versions of {orch-name} as workspace subpath volume mounts are created with root permissions, and therefore cannot be modified by workspaces running as a user (presents an error importing projects into a workspace in {prod-short}). The default is `true`, but should be set to `false` if the version of {orch-name} creates subdirectories with user permissions. See: link:https://github.com/kubernetes/kubernetes/issues/41638[subPath in volumeMount is not writable for non-root users #41638] the {prod-short} Operator that this property has effect only if the `common` PVC strategy used. - -Default::: `+true+` - -''' - - -== `+CHE_INFRA_KUBERNETES_PVC_NAME+` - -Defines the settings of PVC name for {prod-short} workspaces. Each PVC strategy supplies this value differently. See documentation for `che.infra.kubernetes.pvc.strategy` property - -Default::: `+claim-che-workspace+` - -''' - - -== `+CHE_INFRA_KUBERNETES_PVC_STORAGE__CLASS__NAME+` - -Defines the storage class of Persistent Volume Claim for the workspaces. Empty strings means "use default". - -Default::: empty - -''' - - -== `+CHE_INFRA_KUBERNETES_PVC_QUANTITY+` - -Defines the size of Persistent Volume Claim of {prod-short} workspace. See: link:https://docs.openshift.com/container-platform/4.4/storage/understanding-persistent-storage.html[Understanding persistent storage] - -Default::: `+10Gi+` - -''' - - -== `+CHE_INFRA_KUBERNETES_PVC_JOBS_IMAGE+` - -Pod that is launched when performing persistent volume claim maintenance jobs on OpenShift - -Default::: `+registry.access.redhat.com/ubi8-minimal:8.3-230+` - -''' - - -== `+CHE_INFRA_KUBERNETES_PVC_JOBS_IMAGE_PULL__POLICY+` - -Image pull policy of container that used for the maintenance jobs on {orch-name} cluster - -Default::: `+IfNotPresent+` - -''' - - -== `+CHE_INFRA_KUBERNETES_PVC_JOBS_MEMORYLIMIT+` - -Defines Pod memory limit for persistent volume claim maintenance jobs - -Default::: `+250Mi+` - -''' - - -== `+CHE_INFRA_KUBERNETES_PVC_ACCESS__MODE+` - -Defines Persistent Volume Claim access mode. the {prod-short} Operator that for common PVC strategy changing of access mode affects the number of simultaneously running workspaces. If the OpenShift instance running {prod-short} is using Persistent Volumes with RWX access mode, then a limit of running workspaces at the same time is bounded only by {prod-short} limits configuration: RAM, CPU, and so on. See: link:https://docs.openshift.com/container-platform/4.4/storage/understanding-persistent-storage.html[Understanding persistent storage] - -Default::: `+ReadWriteOnce+` - -''' - - -== `+CHE_INFRA_KUBERNETES_PVC_WAIT__BOUND+` - -Defines if {prod-short} Server should wait workspaces Persistent Volume Claims to become bound after creating. Default value is `true`. The parameter is used by all Persistent Volume Claim strategies. It should be set to `false` when `volumeBindingMode` is configured to `WaitForFirstConsumer` otherwise workspace starts will hangs up on phase of waiting PVCs. - -Default::: `+true+` - -''' - - -== `+CHE_INFRA_KUBERNETES_INGRESS_ANNOTATIONS__JSON+` - -Defines annotations for ingresses which are used for servers exposing. Value depends on the kind of ingress controller. OpenShift infrastructure ignores this property because it uses Routes rather than Ingresses. the {prod-short} Operator that for a single-host deployment strategy to work, a controller supporting URL rewriting has to be used (so that URLs can point to different servers while the servers do not need to support changing the app root). The `che.infra.kubernetes.ingress.path.rewrite_transform` property defines how the path of the ingress should be transformed to support the URL rewriting and this property defines the set of annotations on the ingress itself that instruct the chosen ingress controller to actually do the URL rewriting, potentially building on the path transformation (if required by the chosen ingress controller). For example for Nginx ingress controller 0.22.0 and later the following value is recommended: `{"ingress.kubernetes.io/rewrite-target": "/$1","ingress.kubernetes.io/ssl-redirect": "false",\ "ingress.kubernetes.io/proxy-connect-timeout": "3600","ingress.kubernetes.io/proxy-read-timeout": "3600", "nginx.org/websocket-services": ""}` and the `che.infra.kubernetes.ingress.path.rewrite_transform` should be set to `"%s(.*)"`. For nginx ingress controller older than 0.22.0, the rewrite-target should be set to merely `/` and the path transform to `%s` (see the `che.infra.kubernetes.ingress.path.rewrite_transform` property). See the Nginx ingress controller documentation for the explanation of how the ingress controller uses the regular expression available in the ingress path and how it achieves the URL rewriting. - -Default::: `+NULL+` - -''' - - -== `+CHE_INFRA_KUBERNETES_INGRESS_PATH__TRANSFORM+` - -Defines a recipe on how to declare the path of the ingress that should expose a server. The `%s` represents the base public URL of the server and is guaranteed to end with a forward slash. This property must be a valid input to the `String.format()` method and contain exactly one reference to `%s`. See the description of the `che.infra.kubernetes.ingress.annotations_json` property to see how these two properties interplay when specifying the ingress annotations and path. If not defined, this property defaults to `%s` (without the quotes) which means that the path is not transformed in any way for use with the ingress controller. - -Default::: `+NULL+` - -''' - - -== `+CHE_INFRA_KUBERNETES_INGRESS_LABELS+` - -Additional labels to add into every Ingress created by {prod-short} server to allow clear identification. - -Default::: `+NULL+` - -''' - - -== `+CHE_INFRA_KUBERNETES_POD_SECURITY__CONTEXT_RUN__AS__USER+` - -Defines security context for Pods that will be created by Kubernetes Infra This is ignored by OpenShift infra - -Default::: `+NULL+` - -''' - - -== `+CHE_INFRA_KUBERNETES_POD_SECURITY__CONTEXT_FS__GROUP+` - -Defines security context for Pods that will be created by Kubernetes Infra. A special supplemental group that applies to all containers in a Pod. This is ignored by OpenShift infra. - -Default::: `+NULL+` - -''' - - -== `+CHE_INFRA_KUBERNETES_POD_TERMINATION__GRACE__PERIOD__SEC+` - -Defines grace termination period for Pods that will be created by {orch-name} infrastructures. Default value: `0`. It allows to stop Pods quickly and significantly decrease the time required for stopping a workspace. the {prod-short} Operator: if `terminationGracePeriodSeconds` have been explicitly set in {orch-name} recipe it will not be overridden. - -Default::: `+0+` - -''' - - -== `+CHE_INFRA_KUBERNETES_TLS__ENABLED+` - -Creates Ingresses with Transport Layer Security (TLS) enabled. In OpenShift infrastructure, Routes will be TLS-enabled. - -Default::: `+false+` - -''' - - -== `+CHE_INFRA_KUBERNETES_TLS__SECRET+` - -Name of a secret that should be used when creating workspace ingresses with TLS. This property is ignored by OpenShift infrastructure. - -Default::: empty - -''' - - -== `+CHE_INFRA_KUBERNETES_TLS__KEY+` - -Data for TLS Secret that should be used for workspaces Ingresses. `cert` and `key` should be encoded with Base64 algorithm. These properties are ignored by OpenShift infrastructure. - -Default::: `+NULL+` - -''' - - -== `+CHE_INFRA_KUBERNETES_TLS__CERT+` - -Certificate data for TLS Secret that should be used for workspaces Ingresses. Certificate should be encoded with Base64 algorithm. This property is ignored by OpenShift infrastructure. - -Default::: `+NULL+` - -''' - - -== `+CHE_INFRA_KUBERNETES_RUNTIMES__CONSISTENCY__CHECK__PERIOD__MIN+` - -Defines the period with which runtimes consistency checks will be performed. If runtime has inconsistent state then runtime will be stopped automatically. Value must be more than 0 or `-1`, where `-1` means that checks won't be performed at all. It is disabled by default because there is possible {prod-short} Server configuration when {prod-short} Server doesn't have an ability to interact with Kubernetes API when operation is not invoked by user. It DOES work on the following configurations: - workspaces objects are created in the same namespace where {prod-short} Server is located; - `cluster-admin` service account token is mounted to {prod-short} Server Pod. It DOES NOT work on the following configurations: - {prod-short} Server communicates with Kubernetes API using token from OAuth provider. - -Default::: `+-1+` - -''' - - -== `+CHE_INFRA_KUBERNETES_TRUSTED__CA_SRC__CONFIGMAP+` - -Name of the ConfigMap in {prod-short} server namespace with additional CA TLS certificates to be propagated into all user's workspaces. If the property is set on OpenShift 4 infrastructure, and `che.infra.openshift.trusted_ca.dest_configmap_labels` includes the `config.openshift.io/inject-trusted-cabundle=true` label, then cluster CA bundle will be propagated too. - -Default::: `+NULL+` - -''' - - -== `+CHE_INFRA_KUBERNETES_TRUSTED__CA_DEST__CONFIGMAP+` - -Name of the ConfigMap in a workspace namespace with additional CA TLS certificates. Holds the copy of `che.infra.kubernetes.trusted_ca.src_configmap` but in a workspace namespace. Content of this ConfigMap is mounted into all workspace containers including plugin brokers. Do not change the ConfigMap name unless it conflicts with the already existing ConfigMap. the {prod-short} Operator that the resulting ConfigMap name can be adjusted eventually to make it unique in {orch-namespace}. The original name would be stored in `che.original_name` label. - -Default::: `+ca-certs+` - -''' - - -== `+CHE_INFRA_KUBERNETES_TRUSTED__CA_MOUNT__PATH+` - -Configures path on workspace containers where the CA bundle should be mounted. Content of ConfigMap specified by `che.infra.kubernetes.trusted_ca.dest_configmap` is mounted. - -Default::: `+/public-certs+` - -''' - - -== `+CHE_INFRA_KUBERNETES_TRUSTED__CA_DEST__CONFIGMAP__LABELS+` - -Comma separated list of labels to add to the CA certificates ConfigMap in user workspace. See the `che.infra.kubernetes.trusted_ca.dest_configmap` property. - -Default::: empty - -''' - - -[id="openshift-infra-parameters"] -= OpenShift Infra parameters - - -== `+CHE_INFRA_OPENSHIFT_TRUSTED__CA_DEST__CONFIGMAP__LABELS+` - -Comma separated list of labels to add to the CA certificates ConfigMap in user workspace. See `che.infra.kubernetes.trusted_ca.dest_configmap` property. This default value is used for automatic cluster CA bundle injection in OpenShift 4. - -Default::: `+config.openshift.io/inject-trusted-cabundle=true+` - -''' - - -== `+CHE_INFRA_OPENSHIFT_ROUTE_LABELS+` - -Additional labels to add into every Route created by {prod-short} server to allow clear identification. - -Default::: `+NULL+` - -''' - - -== `+CHE_INFRA_OPENSHIFT_ROUTE_HOST_DOMAIN__SUFFIX+` - -The hostname that should be used as a suffix for the workspace routes. For example: Using `domain_suffix=__<{prod-host}>__`, the route resembles: `routed3qrtk.__<{prod-host}>__`. It has to be a valid DNS name. - -Default::: `+NULL+` - -''' - - -== `+CHE_INFRA_OPENSHIFT_PROJECT_INIT__WITH__SERVER__SA+` - -Initialize OpenShift project with {prod-short} server's service account if OpenShift OAuth is enabled. - -Default::: `+true+` - -''' - - -[id="experimental-properties"] -= Experimental properties - - -== `+CHE_WORKSPACE_PLUGIN__BROKER_METADATA_IMAGE+` - -Docker image of {prod-short} plugin broker app that resolves workspace tools configuration and copies plugins dependencies to a workspace. The {prod-short} Operator overrides these images by default. Changing the images here will not have an effect if {prod-short} is installed using the Operator. - -Default::: `+quay.io/eclipse/che-plugin-metadata-broker:v3.4.0+` - -''' - - -== `+CHE_WORKSPACE_PLUGIN__BROKER_ARTIFACTS_IMAGE+` - -Docker image of {prod-short} plugin artifacts broker. This broker runs as an init container on the workspace Pod. Its job is to take in a list of plugin identifiers (either references to a plugin in the registry or a link to a plugin meta.yaml) and ensure that the correct .vsix and .theia extensions are downloaded into the /plugins directory, for each plugin requested for the workspace. - -Default::: `+quay.io/eclipse/che-plugin-artifacts-broker:v3.4.0+` - -''' - - -== `+CHE_WORKSPACE_PLUGIN__BROKER_DEFAULT__MERGE__PLUGINS+` - -Configures the default behavior of the plugin brokers when provisioning plugins into a workspace. If set to true, the plugin brokers will attempt to merge plugins when possible: they run in the same sidecar image and do not have conflicting settings. This value is the default setting used when the devfile does not specify the `mergePlugins` attribute. - -Default::: `+false+` - -''' - - -== `+CHE_WORKSPACE_PLUGIN__BROKER_PULL__POLICY+` - -Docker image of {prod-short} plugin broker app that resolves workspace tools configuration and copies plugins dependencies to a workspace - -Default::: `+Always+` - -''' - - -== `+CHE_WORKSPACE_PLUGIN__BROKER_WAIT__TIMEOUT__MIN+` - -Defines the timeout in minutes that limits the max period of result waiting for plugin broker. - -Default::: `+3+` - -''' - - -== `+CHE_WORKSPACE_PLUGIN__REGISTRY__URL+` - -Workspace plug-ins registry endpoint. Should be a valid HTTP URL. Example: ++http://che-plugin-registry-eclipse-che.192.168.65.2.nip.io++ In case {prod-short} plug-ins registry is not needed value 'NULL' should be used - -Default::: `+https://che-plugin-registry.prod-preview.openshift.io/v3+` - -''' - - -== `+CHE_WORKSPACE_PLUGIN__REGISTRY__INTERNAL__URL+` - -Workspace plugins registry internal endpoint. Should be a valid HTTP URL. Example: ++http://devfile-registry.che.svc.cluster.local:8080++ In case {prod-short} plug-ins registry is not needed value 'NULL' should be used - -Default::: `+NULL+` - -''' - - -== `+CHE_WORKSPACE_DEVFILE__REGISTRY__URL+` - -Devfile Registry endpoint. Should be a valid HTTP URL. Example: ++http://che-devfile-registry-eclipse-che.192.168.65.2.nip.io++ In case {prod-short} plug-ins registry is not needed value 'NULL' should be used - -Default::: `+https://che-devfile-registry.prod-preview.openshift.io/+` - -''' - - -== `+CHE_WORKSPACE_DEVFILE__REGISTRY__INTERNAL__URL+` - -Devfile Registry "internal" endpoint. Should be a valid HTTP URL. Example: ++http://plugin-registry.che.svc.cluster.local:8080++ In case {prod-short} plug-ins registry is not needed value 'NULL' should be used - -Default::: `+NULL+` - -''' - - -== `+CHE_WORKSPACE_STORAGE_AVAILABLE__TYPES+` - -The configuration property that defines available values for storage types that clients such as the Dashboard should propose to users during workspace creation and update. Available values: - `persistent`: Persistent Storage slow I/O but persistent. - `ephemeral`: Ephemeral Storage allows for faster I/O but may have limited storage and is not persistent. - `async`: Experimental feature: Asynchronous storage is combination of Ephemeral and Persistent storage. Allows for faster I/O and keep your changes, will backup on stop and restore on start workspace. Will work only if: - `che.infra.kubernetes.pvc.strategy='common'` - `che.limits.user.workspaces.run.count=1` - `che.infra.kubernetes.namespace.default` contains `` in other cases remove `async` from the list. - -Default::: `+persistent,ephemeral,async+` - -''' - - -== `+CHE_WORKSPACE_STORAGE_PREFERRED__TYPE+` - -The configuration property that defines a default value for storage type that clients such as the Dashboard should propose to users during workspace creation and update. The `async` value is an experimental feature, not recommended as default type. - -Default::: `+persistent+` - -''' - - -== `+CHE_SERVER_SECURE__EXPOSER+` - -Configures in which way secure servers will be protected with authentication. Suitable values: - `default`: `jwtproxy` is configured in a pass-through mode. Servers should authenticate requests themselves. - `jwtproxy`: `jwtproxy` will authenticate requests. Servers will receive only authenticated requests. - -Default::: `+jwtproxy+` - -''' - - -== `+CHE_SERVER_SECURE__EXPOSER_JWTPROXY_TOKEN_ISSUER+` - -`Jwtproxy` issuer string, token lifetime, and optional auth page path to route unsigned requests to. - -Default::: `+wsmaster+` - -''' - - -== `+CHE_SERVER_SECURE__EXPOSER_JWTPROXY_TOKEN_TTL+` - -JWTProxy issuer token lifetime. - -Default::: `+8800h+` - -''' - - -== `+CHE_SERVER_SECURE__EXPOSER_JWTPROXY_AUTH_LOADER_PATH+` - -Optional authentication page path to route unsigned requests to. - -Default::: `+/_app/loader.html+` - -''' - - -== `+CHE_SERVER_SECURE__EXPOSER_JWTPROXY_IMAGE+` - -JWTProxy image. - -Default::: `+quay.io/eclipse/che-jwtproxy:0.10.0+` - -''' - - -== `+CHE_SERVER_SECURE__EXPOSER_JWTPROXY_MEMORY__REQUEST+` - -JWTProxy memory request. - -Default::: `+15mb+` - -''' - - -== `+CHE_SERVER_SECURE__EXPOSER_JWTPROXY_MEMORY__LIMIT+` - -JWTProxy memory limit. - -Default::: `+128mb+` - -''' - - -== `+CHE_SERVER_SECURE__EXPOSER_JWTPROXY_CPU__REQUEST+` - -JWTProxy CPU request. - -Default::: `+0.03+` - -''' - - -== `+CHE_SERVER_SECURE__EXPOSER_JWTPROXY_CPU__LIMIT+` - -JWTProxy CPU limit. - -Default::: `+0.5+` - -''' - - -[id="configuration-of-the-major-websocket-endpoint"] -= Configuration of the major WebSocket endpoint - - -== `+CHE_CORE_JSONRPC_PROCESSOR__MAX__POOL__SIZE+` - -Maximum size of the JSON RPC processing pool in case if pool size would be exceeded message execution will be rejected - -Default::: `+50+` - -''' - - -== `+CHE_CORE_JSONRPC_PROCESSOR__CORE__POOL__SIZE+` - -Initial JSON processing pool. Minimum number of threads that used to process major JSON RPC messages. - -Default::: `+5+` - -''' - - -== `+CHE_CORE_JSONRPC_PROCESSOR__QUEUE__CAPACITY+` - -Configuration of queue used to process JSON RPC messages. - -Default::: `+100000+` - -''' - - -== `+CHE_METRICS_PORT+` - -Port the HTTP server endpoint that would be exposed with Prometheus metrics. - -Default::: `+8087+` - -''' - - -[id="cors-settings"] -= CORS settings - - -== `+CHE_CORS_ALLOWED__ORIGINS+` - -Indicates which request origins are allowed. CORS filter on WS Master is turned off by default. Use environment variable "CHE_CORS_ENABLED=true" to turn it on. - -Default::: `+*+` - -''' - - -== `+CHE_CORS_ALLOW__CREDENTIALS+` - -Indicates if it allows processing of requests with credentials (in cookies, headers, TLS client certificates). - -Default::: `+false+` - -''' - - -[id="factory-defaults"] -= Factory defaults - - -== `+CHE_FACTORY_DEFAULT__PLUGINS+` - -Editor and plugin which will be used for factories that are created from a remote Git repository which does not contain any {prod-short}-specific workspace descriptor Multiple plugins must be comma-separated, for example: `pluginFooPublisher/pluginFooName/pluginFooVersion,pluginBarPublisher/pluginBarName/pluginBarVersion` - -Default::: `+redhat/vscode-commons/latest+` - -''' - - -== `+CHE_FACTORY_DEFAULT__DEVFILE__FILENAMES+` - -Devfile filenames to look on repository-based factories (for example GitHub). Factory will try to locate those files in the order they enumerated in the property. - -Default::: `+devfile.yaml,.devfile.yaml+` - -''' - - -[id="devfile-defaults"] -= Devfile defaults - - -== `+CHE_FACTORY_DEFAULT__EDITOR+` - -Editor that will be used for factories that are created from a remote Git repository which does not contain any {prod-short}-specific workspace descriptor. - -Default::: `+eclipse/che-theia/latest+` - -''' - - -== `+CHE_FACTORY_SCM__FILE__FETCHER__LIMIT__BYTES+` - -File size limit for the URL fetcher which fetch files from the SCM repository. - -Default::: `+102400+` - -''' - - -== `+CHE_FACTORY_DEVFILE2__FILES__RESOLUTION__LIST+` - -Additional files which may be present in repository to complement devfile v2, and should be referenced as links to SCM resolver service in factory to retrieve them. - -Default::: `+.che/che-editor.yaml,.che/che-theia-plugins.yaml,.vscode/extensions.json+` - -''' - - -== `+CHE_WORKSPACE_DEVFILE_DEFAULT__EDITOR+` - -Default Editor that should be provisioned into Devfile if there is no specified Editor Format is `editorPublisher/editorName/editorVersion` value. `NULL` or absence of value means that default editor should not be provisioned. - -Default::: `+eclipse/che-theia/latest+` - -''' - - -== `+CHE_WORKSPACE_DEVFILE_DEFAULT__EDITOR_PLUGINS+` - -Default Plug-ins which should be provisioned for Default Editor. All the plugins from this list that are not explicitly mentioned in the user-defined devfile will be provisioned but only when the default editor is used or if the user-defined editor is the same as the default one (even if in different version). Format is comma-separated `pluginPublisher/pluginName/pluginVersion` values, and URLs. For example: `eclipse/che-theia-exec-plugin/0.0.1,eclipse/che-theia-terminal-plugin/0.0.1,https://cdn.pluginregistry.com/vi-mode/meta.yaml` If the plugin is a URL, the plugin's `meta.yaml` is retrieved from that URL. - -Default::: `+NULL+` - -''' - - -== `+CHE_WORKSPACE_PROVISION_SECRET_LABELS+` - -Defines comma-separated list of labels for selecting secrets from a user namespace, which will be mount into workspace containers as a files or environment variables. Only secrets that match ALL given labels will be selected. - -Default::: `+app.kubernetes.io/part-of=che.eclipse.org,app.kubernetes.io/component=workspace-secret+` - -''' - - -== `+CHE_WORKSPACE_DEVFILE_ASYNC_STORAGE_PLUGIN+` - -Plugin is added in case asynchronous storage feature will be enabled in workspace configuration and supported by environment - -Default::: `+eclipse/che-async-pv-plugin/latest+` - -''' - - -== `+CHE_INFRA_KUBERNETES_ASYNC_STORAGE_IMAGE+` - -Docker image for the {prod-short} asynchronous storage - -Default::: `+quay.io/eclipse/che-workspace-data-sync-storage:0.0.1+` - -''' - - -== `+CHE_WORKSPACE_POD_NODE__SELECTOR+` - -Optionally configures node selector for workspace Pod. Format is comma-separated key=value pairs, for example: `disktype=ssd,cpu=xlarge,foo=bar` - -Default::: `+NULL+` - -''' - - -== `+CHE_WORKSPACE_POD_TOLERATIONS__JSON+` - -Optionally configures tolerations for workspace Pod. Format is a string representing a JSON Array of taint tolerations, or `NULL` to disable it. The objects contained in the array have to follow the link:https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.20/#toleration-v1-core[toleration v1 core specifications]. Example: `[{"effect":"NoExecute","key":"aNodeTaint","operator":"Equal","value":"aValue"}]` - -Default::: `+NULL+` - -''' - - -== `+CHE_INFRA_KUBERNETES_ASYNC_STORAGE_SHUTDOWN__TIMEOUT__MIN+` - -The timeout for the Asynchronous Storage Pod shutdown after stopping the last used workspace. Value less or equal to 0 interpreted as disabling shutdown ability. - -Default::: `+120+` - -''' - - -== `+CHE_INFRA_KUBERNETES_ASYNC_STORAGE_SHUTDOWN__CHECK__PERIOD__MIN+` - -Defines the period with which the Asynchronous Storage Pod stopping ability will be performed (once in 30 minutes by default) - -Default::: `+30+` - -''' - - -== `+CHE_INTEGRATION_BITBUCKET_SERVER__ENDPOINTS+` - -Bitbucket endpoints used for factory integrations. Comma separated list of Bitbucket server URLs or NULL if no integration expected. - -Default::: `+NULL+` - -''' - - -== `+CHE_INTEGRATION_GITLAB_SERVER__ENDPOINTS+` - -GitLab endpoints used for factory integrations. Comma separated list of GitLab server URLs or NULL if no integration expected. - -Default::: `+NULL+` - -''' - - -== `+CHE_INTEGRATION_GITLAB_OAUTH__ENDPOINT+` - -Address of the GitLab server with configured OAuth 2 integration - -Default::: `+NULL+` - -''' - - -== `+CHE_OAUTH2_GITLAB_CLIENTID__FILEPATH+` - -Configuration of GitLab OAuth2 client. Used to obtain Personal access tokens. Location of the file with GitLab client id. - -Default::: `+NULL+` - -''' - - -== `+CHE_OAUTH2_GITLAB_CLIENTSECRET__FILEPATH+` - -Location of the file with GitLab client secret. - -Default::: `+NULL#+` - -''' - - -[id="che-system"] -= Che system - - -== `+CHE_SYSTEM_SUPER__PRIVILEGED__MODE+` - -System Super Privileged Mode. Grants users with the manageSystem permission additional permissions for getByKey, getByNameSpace, stopWorkspaces, and getResourcesInformation. These are not given to admins by default and these permissions allow admins gain visibility to any workspace along with naming themselves with administrator privileges to those workspaces. - -Default::: `+false+` - -''' - - -== `+CHE_SYSTEM_ADMIN__NAME+` - -Grant system permission for `che.admin.name` user. If the user already exists it'll happen on component startup, if not - during the first login when user is persisted in the database. - -Default::: `+admin+` - -''' - - -[id="workspace-limits"] -= Workspace limits - - -== `+CHE_LIMITS_WORKSPACE_ENV_RAM+` - -Workspaces are the fundamental runtime for users when doing development. You can set parameters that limit how workspaces are created and the resources that are consumed. The maximum amount of RAM that a user can allocate to a workspace when they create a new workspace. The RAM slider is adjusted to this maximum value. - -Default::: `+16gb+` - -''' - - -== `+CHE_LIMITS_WORKSPACE_IDLE_TIMEOUT+` - -The length of time in milliseconds that a user is idle with their workspace when the system will suspend the workspace and then stopping it. Idleness is the length of time that the user has not interacted with the workspace, meaning that one of the agents has not received interaction. Leaving a browser window open counts toward idleness. - -Default::: `+1800000+` - -''' - - -== `+CHE_LIMITS_WORKSPACE_RUN_TIMEOUT+` - -The length of time in milliseconds that a workspace will run, regardless of activity, before the system will suspend it. Set this property if you want to automatically stop workspaces after a period of time. The default is zero, meaning that there is no run timeout. - -Default::: `+0+` - -''' - - -[id="users-workspace-limits"] -= Users workspace limits - - -== `+CHE_LIMITS_USER_WORKSPACES_RAM+` - -The total amount of RAM that a single user is allowed to allocate to running workspaces. A user can allocate this RAM to a single workspace or spread it across multiple workspaces. - -Default::: `+-1+` - -''' - - -== `+CHE_LIMITS_USER_WORKSPACES_COUNT+` - -The maximum number of workspaces that a user is allowed to create. The user will be presented with an error message if they try to create additional workspaces. This applies to the total number of both running and stopped workspaces. - -Default::: `+-1+` - -''' - - -== `+CHE_LIMITS_USER_WORKSPACES_RUN_COUNT+` - -The maximum number of running workspaces that a single user is allowed to have. If the user has reached this threshold and they try to start an additional workspace, they will be prompted with an error message. The user will need to stop a running workspace to activate another. - -Default::: `+1+` - -''' - - -[id="organizations-workspace-limits"] -= Organizations workspace limits - - -== `+CHE_LIMITS_ORGANIZATION_WORKSPACES_RAM+` - -The total amount of RAM that a single organization (team) is allowed to allocate to running workspaces. An organization owner can allocate this RAM however they see fit across the team's workspaces. - -Default::: `+-1+` - -''' - - -== `+CHE_LIMITS_ORGANIZATION_WORKSPACES_COUNT+` - -The maximum number of workspaces that a organization is allowed to own. The organization will be presented an error message if they try to create additional workspaces. This applies to the total number of both running and stopped workspaces. - -Default::: `+-1+` - -''' - - -== `+CHE_LIMITS_ORGANIZATION_WORKSPACES_RUN_COUNT+` - -The maximum number of running workspaces that a single organization is allowed. If the organization has reached this threshold and they try to start an additional workspace, they will be prompted with an error message. The organization will need to stop a running workspace to activate another. - -Default::: `+-1+` - -''' - - -[id="multi-user-specific-openshift-infrastructure-configuration"] -= Multi-user-specific OpenShift infrastructure configuration - - -== `+CHE_INFRA_OPENSHIFT_OAUTH__IDENTITY__PROVIDER+` - -Alias of the OpenShift identity provider registered in Keycloak, that should be used to create workspace OpenShift resources in OpenShift namespaces owned by the current {prod-short} user. Should be set to NULL if `che.infra.openshift.project` is set to a non-empty value. See: link:https://www.keycloak.org/docs/latest/server_admin/#openshift-4[OpenShift identity provider] - -Default::: `+NULL+` - -''' - - -[id="oidc-configuration"] -= OIDC configuration - - -== `+CHE_OIDC_AUTH__SERVER__URL+` - -Url to OIDC identity provider server Can be set to NULL only if `che.oidc.oidcProvider` is used - -Default::: `+http://${CHE_HOST}:5050/auth+` - -''' - - -== `+CHE_OIDC_AUTH__INTERNAL__SERVER__URL+` - -Internal network service Url to OIDC identity provider server - -Default::: `+NULL+` - -''' - - -== `+CHE_OIDC_ALLOWED__CLOCK__SKEW__SEC+` - -The number of seconds to tolerate for clock skew when verifying `exp` or `nbf` claims. - -Default::: `+3+` - -''' - - -== `+CHE_OIDC_USERNAME__CLAIM+` - -Username claim to be used as user display name when parsing JWT token if not defined the fallback value is 'preferred_username' in Keycloak installations and `name` in Dex installations. - -Default::: `+NULL+` - -''' - - -== `+CHE_OIDC_OIDC__PROVIDER+` - -Base URL of an alternate OIDC provider that provides a discovery endpoint as detailed in the following specification link:https://openid.net/specs/openid-connect-discovery-1_0.html#ProviderConfig[Obtaining OpenID Provider Configuration Information] Deprecated, use `che.oidc.auth_server_url` and `che.oidc.auth_internal_server_url` instead. - -Default::: `+NULL+` - -''' - - -[id="keycloak-configuration"] -= Keycloak configuration - - -== `+CHE_KEYCLOAK_REALM+` - -Keycloak realm is used to authenticate users Can be set to NULL only if `che.keycloak.oidcProvider` is used - -Default::: `+che+` - -''' - - -== `+CHE_KEYCLOAK_CLIENT__ID+` - -Keycloak client identifier in `che.keycloak.realm` to authenticate users in the dashboard, the IDE, and the CLI. - -Default::: `+che-public+` - -''' - - -== `+CHE_KEYCLOAK_OSO_ENDPOINT+` - -URL to access OSO OAuth tokens - -Default::: `+NULL+` - -''' - - -== `+CHE_KEYCLOAK_GITHUB_ENDPOINT+` - -URL to access Github OAuth tokens - -Default::: `+NULL+` - -''' - - -== `+CHE_KEYCLOAK_USE__NONCE+` - -Use the OIDC optional `nonce` feature to increase security. - -Default::: `+true+` - -''' - - -== `+CHE_KEYCLOAK_JS__ADAPTER__URL+` - -URL to the Keycloak Javascript adapter to use. if set to NULL, then the default used value is `$++{che.keycloak.auth_server_url}++/js/keycloak.js`, or `/api/keycloak/OIDCKeycloak.js` if an alternate `oidc_provider` is used - -Default::: `+NULL+` - -''' - - -== `+CHE_KEYCLOAK_USE__FIXED__REDIRECT__URLS+` - -Set to true when using an alternate OIDC provider that only supports fixed redirect Urls This property is ignored when `che.keycloak.oidc_provider` is NULL - -Default::: `+false+` - -''' - - -== `+CHE_OAUTH_SERVICE__MODE+` - -Configuration of OAuth Authentication Service that can be used in "embedded" or "delegated" mode. If set to "embedded", then the service work as a wrapper to {prod-short}'s OAuthAuthenticator ( as in Single User mode). If set to "delegated", then the service will use Keycloak IdentityProvider mechanism. Runtime Exception `wii` be thrown, in case if this property is not set properly. - -Default::: `+delegated+` - -''' - - -== `+CHE_KEYCLOAK_CASCADE__USER__REMOVAL__ENABLED+` - -Configuration for enabling removing user from Keycloak server on removing user from {prod-short} database. By default it's disabled. Can be enabled in some special cases when deleting a user in {prod-short} database should execute removing related-user from Keycloak. For correct work need to set administrator username $++{che.keycloak.admin_username}++ and password $++{che.keycloak.admin_password}++. - -Default::: `+false+` - -''' - - -== `+CHE_KEYCLOAK_ADMIN__USERNAME+` - -Keycloak administrator username. Will be used for deleting user from Keycloak on removing user from {prod-short} database. Make sense only in case $++{che.keycloak.cascade_user_removal_enabled}++ set to 'true' - -Default::: `+NULL+` - -''' - - -== `+CHE_KEYCLOAK_ADMIN__PASSWORD+` - -Keycloak administrator password. Will be used for deleting user from Keycloak on removing user from {prod-short} database. Make sense only in case $++{che.keycloak.cascade_user_removal_enabled}++ set to 'true' - -Default::: `+NULL+` - -''' - - -== `+CHE_KEYCLOAK_USERNAME_REPLACEMENT__PATTERNS+` - -User name adjustment configuration. {prod-short} needs to use the usernames as part of Kubernetes object names and labels and therefore has stricter requirements on their format than the identity providers usually allow (it needs them to be DNS-compliant). The adjustment is represented by comma-separated key-value pairs. These are sequentially used as arguments to the String.replaceAll function on the original username. The keys are regular expressions, values are replacement strings that replace the characters in the username that match the regular expression. The modified username will only be stored in the {prod-short} database and will not be advertised back to the identity provider. It is recommended to use DNS-compliant characters as replacement strings (values in the key-value pairs). Example: `\\=-,@=-at-` changes `\` to `-` and `@` to `-at-` so the username `org\user@com` becomes `org-user-at-com.` - -Default::: `+NULL+` - -''' diff --git a/modules/administration-guide/images/architecture/che-dashboard-interactions.png b/modules/administration-guide/images/architecture/che-dashboard-interactions.png deleted file mode 100644 index a2e6ee3ae9..0000000000 Binary files a/modules/administration-guide/images/architecture/che-dashboard-interactions.png and /dev/null differ diff --git a/modules/administration-guide/images/architecture/che-deployments-interacting-with-devworkspace.png b/modules/administration-guide/images/architecture/che-deployments-interacting-with-devworkspace.png deleted file mode 100644 index c289636968..0000000000 Binary files a/modules/administration-guide/images/architecture/che-deployments-interacting-with-devworkspace.png and /dev/null differ diff --git a/modules/administration-guide/images/architecture/che-devfile-registry-interactions.png b/modules/administration-guide/images/architecture/che-devfile-registry-interactions.png deleted file mode 100644 index 67fd546126..0000000000 Binary files a/modules/administration-guide/images/architecture/che-devfile-registry-interactions.png and /dev/null differ diff --git a/modules/administration-guide/images/architecture/che-gateway-interactions.png b/modules/administration-guide/images/architecture/che-gateway-interactions.png deleted file mode 100644 index 2c8174a615..0000000000 Binary files a/modules/administration-guide/images/architecture/che-gateway-interactions.png and /dev/null differ diff --git a/modules/administration-guide/images/architecture/che-interacting-with-devworkspace.png b/modules/administration-guide/images/architecture/che-interacting-with-devworkspace.png deleted file mode 100644 index 29abc42de9..0000000000 Binary files a/modules/administration-guide/images/architecture/che-interacting-with-devworkspace.png and /dev/null differ diff --git a/modules/administration-guide/images/architecture/che-plugin-registry-interactions.png b/modules/administration-guide/images/architecture/che-plugin-registry-interactions.png deleted file mode 100644 index c808193d36..0000000000 Binary files a/modules/administration-guide/images/architecture/che-plugin-registry-interactions.png and /dev/null differ diff --git a/modules/administration-guide/images/architecture/che-postgresql-interactions.png b/modules/administration-guide/images/architecture/che-postgresql-interactions.png deleted file mode 100644 index 5ab1b254fb..0000000000 Binary files a/modules/administration-guide/images/architecture/che-postgresql-interactions.png and /dev/null differ diff --git a/modules/administration-guide/images/architecture/che-server-interactions.png b/modules/administration-guide/images/architecture/che-server-interactions.png deleted file mode 100644 index 47ec11f4db..0000000000 Binary files a/modules/administration-guide/images/architecture/che-server-interactions.png and /dev/null differ diff --git a/modules/administration-guide/images/architecture/che-user-workspaces-interactions.png b/modules/administration-guide/images/architecture/che-user-workspaces-interactions.png deleted file mode 100644 index 53fe862d4e..0000000000 Binary files a/modules/administration-guide/images/architecture/che-user-workspaces-interactions.png and /dev/null differ diff --git a/modules/administration-guide/images/architecture/workspace-components-with-dw.png b/modules/administration-guide/images/workspace-components-with-dw.png similarity index 100% rename from modules/administration-guide/images/architecture/workspace-components-with-dw.png rename to modules/administration-guide/images/workspace-components-with-dw.png diff --git a/modules/administration-guide/pages/architecture-overview.adoc b/modules/administration-guide/pages/architecture-overview.adoc index a4c5e1fba6..6f1562a893 100644 --- a/modules/administration-guide/pages/architecture-overview.adoc +++ b/modules/administration-guide/pages/architecture-overview.adoc @@ -8,7 +8,7 @@ = {prod-short} architecture .High-level {prod-short} architecture with the {devworkspace} operator -image::architecture/che-interacting-with-devworkspace.png[] +image::architecture/{project-context}-interacting-with-devworkspace.png[] {prod-short} runs on three groups of components: diff --git a/modules/administration-guide/pages/checluster-custom-resource-fields-reference.adoc b/modules/administration-guide/pages/checluster-custom-resource-fields-reference.adoc index 8717533ff5..82f26f3d4a 100644 --- a/modules/administration-guide/pages/checluster-custom-resource-fields-reference.adoc +++ b/modules/administration-guide/pages/checluster-custom-resource-fields-reference.adoc @@ -47,4 +47,4 @@ spec: ---- ==== -include::example$checluster-properties.adoc[leveloffset=+1] +include::example$checluster-properties/checluster-properties.adoc[leveloffset=+1] diff --git a/modules/administration-guide/pages/user-workspaces.adoc b/modules/administration-guide/pages/user-workspaces.adoc index 6a34eabc29..d24a47dd64 100644 --- a/modules/administration-guide/pages/user-workspaces.adoc +++ b/modules/administration-guide/pages/user-workspaces.adoc @@ -29,7 +29,7 @@ A workspace is one {orch-name} Deployment containing the workspace containers an * Endpoints * Ingresses or Routes * Secrets -* Persistent Volumes (PVs) +* Persistent Volumes (PV) A {prod-short} workspace contains the source code of the projects, persisted in a {platforms-name} Persistent Volume (PV). Microservices have read-write access to this shared directory. @@ -38,6 +38,6 @@ Use the devfile v2 format to specify the tools and runtime applications of a {pr The following diagram shows one running {prod-short} workspace and its components. .{prod-short} workspace components -image::architecture/workspace-components-with-dw.png[] +image::workspace-components-with-dw.png[] In the diagram, there is one running workspaces. diff --git a/modules/administration-guide/partials/ref_che-server-component-system-properties-reference.adoc b/modules/administration-guide/partials/ref_che-server-component-system-properties-reference.adoc index 36c0792534..278ba24a92 100644 --- a/modules/administration-guide/partials/ref_che-server-component-system-properties-reference.adoc +++ b/modules/administration-guide/partials/ref_che-server-component-system-properties-reference.adoc @@ -3,5 +3,5 @@ The following document describes all possible configuration properties of the {prod-short} server component. -include::example$system-variables.adoc[leveloffset=+1] +include::example$che-server-properties/system-variables.adoc[leveloffset=+1] diff --git a/tools/antora-to-plain-asciidoc.sh b/tools/antora-to-plain-asciidoc.sh index 5db646af8f..49c2eb58c3 100755 --- a/tools/antora-to-plain-asciidoc.sh +++ b/tools/antora-to-plain-asciidoc.sh @@ -10,9 +10,19 @@ # Exit on any error set -e +umask 002 + +info() { + echo -e "\e[32mINFO $1" +} +error() { + echo -e "\e[31mERROR $1" +} + +info "Converting to plain AsciiDoc" # Variables for the project -SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )" +SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" >/dev/null 2>&1 && pwd)" # Variables for SOURCE SOURCE_SRC="${SCRIPT_DIR%tools*}modules" @@ -24,8 +34,7 @@ DESTINATION_TEMPLATES_DIR="${DESTINATION_ROOT_DIR}/templates" mkdir -p "$DESTINATION_TEMPLATES_DIR" -for GUIDE in ${SOURCE_GUIDES} -do +for GUIDE in ${SOURCE_GUIDES}; do # Generate title, copy topics, examples and images. SOURCE_GUIDE="${SOURCE_SRC}/${GUIDE}" DESTINATION_DIR="${DESTINATION_ROOT_DIR}/${GUIDE}" @@ -44,13 +53,13 @@ do s@\*\*\* (.*)\]@\1leveloffset=+3]@; s@\*\* (.*)\]@\1leveloffset=+2]@; s@\* (.*)\]@\1leveloffset=+1]@; - " "${SOURCE_GUIDE}/nav.adoc" > "${DESTINATION_TITLE}" + " "${SOURCE_GUIDE}/nav.adoc" >"${DESTINATION_TITLE}" # Copy topics, examples, and images # Remove old topics, but keep examples and images as they may mix content - find "${DESTINATION_TOPICS_DIR}" -maxdepth 1 -name '*.adoc' -exec rm {} + + find "${DESTINATION_TOPICS_DIR}" -maxdepth 1 -name '*.adoc' -exec rm {} + # shellcheck disable=SC2086 - cp ${VERBOSE} -t "${DESTINATION_TOPICS_DIR}" "${SOURCE_GUIDE}/pages/"* "${SOURCE_GUIDE}/partials/"* + cp ${VERBOSE} -t "${DESTINATION_TOPICS_DIR}" "${SOURCE_GUIDE}/pages/"* "${SOURCE_GUIDE}/partials/"* # shellcheck disable=SC2086 cp ${VERBOSE} -f -r -t "${DESTINATION_EXAMPLES_DIR}" "${SOURCE_GUIDE}/examples/"* # shellcheck disable=SC2086 @@ -71,15 +80,13 @@ ${FILE_TO_ID_CROSS} # Convert include statements using `partial$` and `example$`` in plain AsciiDoc include statements shopt -s globstar nullglob -for file in "${DESTINATION_ROOT_DIR}"/**/*.adoc -do +for file in "${DESTINATION_ROOT_DIR}"/**/*.adoc; do # Substitutions sed -E -i "${SUBSTITUTIONS}" "$file" done # Validate asciidoctor build -for GUIDE in ${SOURCE_GUIDES} -do +for GUIDE in ${SOURCE_GUIDES}; do asciidoctor -a project-context=che -a context=che "${DESTINATION_ROOT_DIR}/${GUIDE}/index.adoc" done diff --git a/tools/build-and-verify-container.sh b/tools/build-and-verify-container.sh index c5e11e5714..c18e2fc370 100755 --- a/tools/build-and-verify-container.sh +++ b/tools/build-and-verify-container.sh @@ -10,6 +10,7 @@ # Fail on errors set -e +umask 002 CHE_DOCS_IMAGE=che-docs-devel export CHE_DOCS_IMAGE diff --git a/tools/build.sh b/tools/build.sh index 9f98358eb0..d088f8164b 100755 --- a/tools/build.sh +++ b/tools/build.sh @@ -10,14 +10,6 @@ # Fail on errors set -ex -id -ls -ltr umask 002 -./tools/checluster_docs_gen.sh -./tools/environment_docs_gen.sh -./tools/create_architecture_diagrams.py CI=true antora generate antora-playbook-for-development.yml --stacktrace --log-failure-level=warn htmltest -./tools/detect-unused-content.sh -./tools/validate_language_changes.sh -./tools/antora-to-plain-asciidoc.sh diff --git a/tools/checluster_docs_gen.sh b/tools/checluster_docs_gen.sh index 0d67ca950e..48663f3bad 100755 --- a/tools/checluster_docs_gen.sh +++ b/tools/checluster_docs_gen.sh @@ -9,6 +9,13 @@ # set -o pipefail set -e +umask 002 +info() { + echo -e "\e[32mINFO $1" +} +error() { + echo -e "\e[31mERROR $1" +} CURRENT_VERSION="" PRODUCT="" @@ -17,29 +24,35 @@ NEWLINE=$'\n' NEWLINEx2="$NEWLINE$NEWLINE" TABLE_HEADER="$NEWLINE[cols=\"2,5\", options=\"header\"]$NEWLINE:=== $NEWLINE Property: Description $NEWLINE" TABLE_FOOTER=":=== $NEWLINEx2" -PARENT_PATH=$(cd "$(dirname "${BASH_SOURCE[0]}")/.."; pwd -P) +PARENT_PATH=$( + cd "$(dirname "${BASH_SOURCE[0]}")/.." + pwd -P +) BUFF="" -OUTPUT_PATH="$PARENT_PATH/modules/administration-guide/examples/checluster-properties.adoc" +OUTPUT_DIR="$PARENT_PATH/build/collector/checluster-properties" +OUTPUT_PATH="$OUTPUT_DIR/checluster-properties.adoc" + +mkdir -p "$OUTPUT_DIR" fetch_current_version() { - # echo "Trying to read current product version from $PARENT_PATH/antora.yml..." >&2 + # info "Trying to read current product version from $PARENT_PATH/antora.yml..." >&2 # remove spaces, single and double quotes from the value of prod-ver, then append x. - CURRENT_VERSION=$(yq -M '.asciidoc.attributes."prod-ver"' "$PARENT_PATH/antora.yml" | tr -d " '\"" ).x + CURRENT_VERSION=$(yq -M '.asciidoc.attributes."prod-ver"' "$PARENT_PATH/antora.yml" | tr -d " '\"").x if [[ "$CURRENT_VERSION" == 'main.x' ]]; then CURRENT_VERSION="main" fi - echo "Detected version: $CURRENT_VERSION" >&2 + info "Version: $CURRENT_VERSION" >&2 } fetch_product_name() { - # echo "Trying to read product name from $PARENT_PATH/antora.yml..." >&2 + # info "Trying to read product name from $PARENT_PATH/antora.yml..." >&2 PRODUCT=$(yq -rM '.asciidoc.attributes."prod-id-short"' "$PARENT_PATH/antora.yml") - echo "Detected product: $PRODUCT" >&2 + info "Product: $PRODUCT" >&2 } fetch_conf_files_content() { - # echo "Fetching property files content from GitHub..." >&2 + # info "Fetching property files content from GitHub..." >&2 if [[ $PRODUCT == "che" ]]; then CHECLUSTER_PROPERTIES_URL="https://raw.githubusercontent.com/eclipse-che/che-operator/$CURRENT_VERSION/config/crd/bases/org.eclipse.che_checlusters.yaml" @@ -48,7 +61,7 @@ fetch_conf_files_content() { fi RAW_CONTENT=$(curl -sf "$CHECLUSTER_PROPERTIES_URL") - echo "Fetching content done. Trying to parse it." >&2 + # info "Fetching content done. Trying to parse it." >&2 } parse_content() { @@ -67,20 +80,19 @@ parse_content() { parse_section "status" "\`CheCluster\` Custom Resource \`status\` defines the observed state of {prod-short} installation" BUFF="pass:[] -$BUFF" - echo "$BUFF" > "$OUTPUT_PATH" - echo "Processing done. Output file is $OUTPUT_PATH" >&2 +$BUFF" + echo "$BUFF" >"$OUTPUT_PATH" + info "Single-sourced $OUTPUT_PATH" >&2 } - parse_section() { local section local sectionName=$1 - local sectionName2Id=$(echo $sectionName | tr '.' '-' ) + local sectionName2Id=$(echo $sectionName | tr '.' '-') local id="[id=\"checluster-custom-resource-$sectionName2Id-settings_{context}\"]" local caption=$2 - # echo "Parsing section: "$sectionName + # info "Parsing section: "$sectionName if [[ $sectionName == "status" ]]; then section=$(echo "$RAW_CONTENT" | yq -M '.spec.versions[] | select(.name == "v2") | .schema.openAPIV3Schema.properties.status') else @@ -88,19 +100,18 @@ parse_section() { fi local properties=( - $(echo "$section" | yq -M '.properties | keys[]' ) + $(echo "$section" | yq -M '.properties | keys[]') ) BUFF="$BUFF$id$NEWLINE" BUFF="$BUFF.$caption$NEWLINE" BUFF="$BUFF$TABLE_HEADER" - for PROP in "${properties[@]}" - do - PROP="${PROP//\"}" + for PROP in "${properties[@]}"; do + PROP="${PROP//\"/}" DESCR_BUFF=$(echo "$section" | yq -M '.properties.'"$PROP"'.description') - DESCR_BUFF="${DESCR_BUFF//\"}" + DESCR_BUFF="${DESCR_BUFF//\"/}" DESCR_BUFF="${DESCR_BUFF//:/\\:}" - DESCR_BUFF="$(sed 's|Eclipse Che|{prod-short}|g' <<< $DESCR_BUFF)" + DESCR_BUFF="$(sed 's|Eclipse Che|{prod-short}|g' <<<$DESCR_BUFF)" BUFF="$BUFF${PROP}: ${DESCR_BUFF}$NEWLINE" done BUFF="$BUFF$TABLE_FOOTER" diff --git a/tools/count_vale_errors.sh b/tools/count_vale_errors.sh index ec1029e743..88fb274a22 100755 --- a/tools/count_vale_errors.sh +++ b/tools/count_vale_errors.sh @@ -8,6 +8,7 @@ # SPDX-License-Identifier: EPL-2.0 # set -e +umask 002 vale --version diff --git a/tools/create_architecture_diagrams.py b/tools/create_architecture_diagrams.py index 75f38acea9..f9d1a4a0b9 100755 --- a/tools/create_architecture_diagrams.py +++ b/tools/create_architecture_diagrams.py @@ -7,9 +7,11 @@ # # SPDX-License-Identifier: EPL-2.0 # +""" +Generate architecture diagrams +""" from diagrams import * -import diagrams from diagrams.custom import Custom from diagrams.k8s.controlplane import APIServer from diagrams.k8s.rbac import User @@ -18,13 +20,17 @@ from diagrams.onprem.vcs import Git from diagrams.outscale.compute import Compute from diagrams.outscale.storage import SimpleStorageService -import os -def ArchitectureDiagrams(prod_short, project_context, orch_name): +def architecture_diagrams(prod_short, project_context, orchestrator_name): + """ + + :param prod_short: Short product name + :param project_context: project-context AsciiDoc attribute value + :param orchestrator_name: Orchestrator name + """ script_path = os.path.dirname(os.path.realpath(__file__)) - file_path = script_path + \ - '/../modules/administration-guide/images/architecture/' + project_context + '-' + file_path = script_path + '/../build/collector/architecture-diagrams/' + project_context + '-' prod_icon = script_path + '/' + project_context + '-icon.png' graph_attr = { "bgcolor": "white", @@ -36,12 +42,10 @@ def ArchitectureDiagrams(prod_short, project_context, orch_name): filename = file_path + 'interacting-with-devworkspace' with Diagram(filename=filename, show=False, - direction="LR", - outformat="png", graph_attr=graph_attr): devfile = Git('Devfile v2') dashboard = Custom('User dashboard', prod_icon) - with Cluster(orch_name + ' API'): + with Cluster(orchestrator_name + ' API'): devworkspace_operator = Compute('DevWorkspace') workspace = Compute('User workspace') devfile >> dashboard >> devworkspace_operator >> workspace @@ -50,7 +54,6 @@ def ArchitectureDiagrams(prod_short, project_context, orch_name): with Diagram(filename=filename, show=False, direction="TB", - outformat="png", graph_attr=graph_attr ): che_dashboard = Custom('User dashboard', icon_path=prod_icon) @@ -60,7 +63,7 @@ def ArchitectureDiagrams(prod_short, project_context, orch_name): git = Git('Git provider') postgres = PostgreSQL('PostgreSQL') plugin_registry = SimpleStorageService('Plug-in registry') - kubernetes_api = APIServer(orch_name + ' API') + kubernetes_api = APIServer(orchestrator_name + ' API') user = User('User browser') user >> che_gateway che_gateway >> [che_dashboard, devfile_registries, che_host, @@ -71,7 +74,6 @@ def ArchitectureDiagrams(prod_short, project_context, orch_name): with Diagram(filename=filename, show=False, direction="TB", - outformat="png", graph_attr=graph_attr): user = User('User') che_gateway = Traefik('Gateway') @@ -87,13 +89,12 @@ def ArchitectureDiagrams(prod_short, project_context, orch_name): with Diagram(filename=filename, show=False, direction="TB", - outformat="png", graph_attr=graph_attr): che_dashboard = Custom('User dashboard', icon_path=prod_icon) devfile_registry = SimpleStorageService('Devfile registries') che_host = Custom(prod_short + ' server', icon_path=prod_icon) plugin_registry = SimpleStorageService('Plug-in registry') - crd_workspace = APIServer(orch_name + ' API') + crd_workspace = APIServer(orchestrator_name + ' API') che_dashboard >> che_host, che_dashboard >> [ devfile_registry, plugin_registry] @@ -103,7 +104,6 @@ def ArchitectureDiagrams(prod_short, project_context, orch_name): with Diagram(filename=filename, show=False, direction="TB", - outformat="png", graph_attr=graph_attr): che_host = Custom(prod_short + ' server', icon_path=prod_icon) postgres = PostgreSQL('PostgreSQL') @@ -119,7 +119,6 @@ def ArchitectureDiagrams(prod_short, project_context, orch_name): with Diagram(filename=filename, show=False, direction="TB", - outformat="png", graph_attr=graph_attr): che_host = Custom(prod_short + ' server', icon_path=prod_icon) postgres = PostgreSQL('PostgreSQL') @@ -129,7 +128,6 @@ def ArchitectureDiagrams(prod_short, project_context, orch_name): with Diagram(filename=filename, show=False, direction="TB", - outformat="png", graph_attr=graph_attr): che_dashboard = Custom('User dashboard', icon_path=prod_icon) devfile_registry = SimpleStorageService('Devfile registries') @@ -139,7 +137,6 @@ def ArchitectureDiagrams(prod_short, project_context, orch_name): with Diagram(filename=filename, show=False, direction="TB", - outformat="png", graph_attr=graph_attr): che_dashboard = Custom('User dashboard', icon_path=prod_icon) plugin_registry = SimpleStorageService('Plug-in registry') @@ -149,7 +146,6 @@ def ArchitectureDiagrams(prod_short, project_context, orch_name): with Diagram(filename=filename, show=False, direction="TB", - outformat="png", graph_attr=graph_attr): che_gateway = Traefik('Gateway') git = Git('Git provider') @@ -162,10 +158,10 @@ def ArchitectureDiagrams(prod_short, project_context, orch_name): user_workspace >> [git, container_registries, artifact_management] -ArchitectureDiagrams(project_context='che', - prod_short='Che', - orch_name='Kubernetes') -# -# ArchitectureDiagrams(project_context='devspaces', -# prod_short='Dev Spaces', -# orch_name='OpenShift') +architecture_diagrams(project_context='che', + prod_short='Che', + orchestrator_name='Kubernetes') + +architecture_diagrams(project_context='devspaces', + prod_short='Dev Spaces', + orchestrator_name='OpenShift') diff --git a/tools/detect-unused-content.sh b/tools/detect-unused-content.sh index 8490c48779..6b607e8266 100755 --- a/tools/detect-unused-content.sh +++ b/tools/detect-unused-content.sh @@ -10,143 +10,138 @@ # Exit on any error set -e - -# This is a configuration parameters that can be che or crwctl -PROJECT_CONTEXT=${PROJECT_CONTEXT:-che} - -SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )" +umask 002 +info() { + echo -e "\e[32mINFO $1" +} +error() { + echo -e "\e[31mERROR $1" +} + +SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" >/dev/null 2>&1 && pwd)" DOCS_PROJECT_PATH=$SCRIPT_DIR/.. # we need to move it to make find print relative paths -pushd "$DOCS_PROJECT_PATH/modules" > /dev/null +pushd "$DOCS_PROJECT_PATH/modules" >/dev/null readarray -d '' modules < <(find . -mindepth 1 -maxdepth 1 -type d -print0) missing_anchors="" # Getting anchor list -id_list="$(curl -fsSL https://raw.githubusercontent.com/redhat-developer/devspaces-images/devspaces-3-rhel-8/devspaces-dashboard/packages/dashboard-frontend/assets/branding/product.json \ - | jq -r '.docs[]' | grep '#' | cut -d'#' -f2)" +id_list="$(curl -fsSL https://raw.githubusercontent.com/redhat-developer/devspaces-images/devspaces-3-rhel-8/devspaces-dashboard/packages/dashboard-frontend/assets/branding/product.json | + jq -r '.docs[]' | grep '#' | cut -d'#' -f2)" # Checking the anchors -for id in $id_list -do - if grep --quiet --recursive -e "id=\"${id}_" "${SCRIPT_DIR}/../modules/" - then - true - else - missing_anchors="${missing_anchors} - ${id}" - fi +for id in $id_list; do + if grep --quiet --recursive -e "id=\"${id}_" "${SCRIPT_DIR}/../modules/"; then + true + else + missing_anchors="${missing_anchors} - ${id}" + fi done unused_images="" -for module in "${modules[@]}" -do - pushd "$module" > /dev/null - relative_dir="modules${module#.}" - - if [ ! -d "./images" ]; then - # This module does not have images" - popd > /dev/null - continue +for module in "${modules[@]}"; do + pushd "$module" >/dev/null + relative_dir="modules${module#.}" + + if [ ! -d "./images" ]; then + # This module does not have images" + popd >/dev/null + continue + fi + + readarray -d '' images < <(find "images" -type f -not -name .placeholder -print0) + for image in "${images[@]}"; do + #`../` instead of `images/` is used in the documentation references + image=${image#"images/"} + image_with_che_context="${image/che/{project-context\}}" + image_with_downstream_context="${image/devspaces/{project-context\}}" + if ! grep -q -r "$image" . && ! grep -q -r "$image_with_che_context" . && ! grep -q -r "$image_with_downstream_context" .; then + unused_images="$unused_images - $relative_dir/$image\n" fi + done - readarray -d '' images < <(find "images" -type f -not -name .placeholder -print0) - for image in "${images[@]}" - do - #`../` instead of `images/` is used in the documentation references - image=${image#"images/"} - image_with_che_context="${image/che/{project-context\}}" - image_with_crw_context="${image/${PROJECT_CONTEXT}/{project-context\}}" - if ! grep -q -r "$image" . && ! grep -q -r "$image_with_che_context" . && ! grep -q -r "$image_with_crw_context" . ; then - unused_images="$unused_images - $relative_dir/$image\n" - fi - done - - popd > /dev/null + popd >/dev/null done unused_pages="" -for module in "${modules[@]}" -do - pushd "$module" > /dev/null - relative_dir="modules${module#.}" - - if [ ! -d "./pages" ]; then - # This module does not have pages" - popd > /dev/null - continue +for module in "${modules[@]}"; do + pushd "$module" >/dev/null + relative_dir="modules${module#.}" + + if [ ! -d "./pages" ]; then + # This module does not have pages" + popd >/dev/null + continue + fi + + readarray -d '' pages < <(find "pages" -name '*.adoc' -print0) + for page in "${pages[@]}"; do + page=${page#pages/} + if ! grep -q "$page" nav.adoc; then + unused_pages="$unused_pages - $relative_dir/$page\n" fi + done - readarray -d '' pages < <(find "pages" -name '*.adoc' -print0) - for page in "${pages[@]}" - do - page=${page#pages/} - if ! grep -q "$page" nav.adoc ; then - unused_pages="$unused_pages - $relative_dir/$page\n" - fi - done - - popd > /dev/null + popd >/dev/null done unused_partials="" -for module in "${modules[@]}" -do - pushd "$module" > /dev/null - relative_dir="modules${module#.}" - - if [ ! -d "./partials" ]; then - # This module does not have partials" - popd > /dev/null - continue +for module in "${modules[@]}"; do + pushd "$module" >/dev/null + relative_dir="modules${module#.}" + + if [ ! -d "./partials" ]; then + # This module does not have partials" + popd >/dev/null + continue + fi + + readarray -d '' partials < <(find "partials" -name '*.adoc' -print0) + for partial in "${partials[@]}"; do + #`../` instead of `partials/` is used in the documentation references + partial=${partial#"partials/"} + partial_with_che_context="${partial/che/{project-context\}}" + partial_with_devspaces_context="${partial/devspaces/{project-context\}}" + if ! grep -q -r "$partial" . && ! grep -q -r "$partial_with_che_context" . && ! grep -q -r "$partial_with_devspaces_context" .; then + unused_partials="$unused_partials - $relative_dir/$partial\n" fi + done - readarray -d '' partials < <(find "partials" -name '*.adoc' -print0) - for partial in "${partials[@]}" - do - #`../` instead of `partials/` is used in the documentation references - partial=${partial#"partials/"} - partial_with_che_context="${partial/che/{project-context\}}" - partial_with_crw_context="${partial/${PROJECT_CONTEXT}/{project-context\}}" - if ! grep -q -r "$partial" . && ! grep -q -r "$partial_with_che_context" . && ! grep -q -r "$partial_with_crw_context" . ; then - unused_partials="$unused_partials - $relative_dir/$partial\n" - fi - done - - popd > /dev/null + popd >/dev/null done -popd > /dev/null +popd >/dev/null if [[ "$unused_images" ]]; then - echo "ERROR: The following images are not used in their modules. Remove the files or reference them in the content." - echo -e "${unused_images}" - exit_status=1 + error "The following images are not used in their modules. Remove the files or reference them in the content." + echo -e "${unused_images}" + exit_status=1 else - echo "INFO: All images have reference in the modules." + info "All images have reference in the modules." fi if [[ "$unused_pages" ]]; then - echo "ERROR: The following pages are not used in the navigation. Remove the files or reference them in the nav.adoc file." - echo -e "${unused_pages}" - exit_status=1 + error "The following pages are not used in the navigation. Remove the files or reference them in the nav.adoc file." + echo -e "${unused_pages}" + exit_status=1 else - echo "INFO: All pages have reference in the navigation." + info "All pages have reference in the navigation." fi if [[ "$unused_partials" ]]; then - echo "ERROR: The following partials are not used in their module. Remove the files or include them in a page." - echo -e "${unused_partials}" - exit_status=1 + error "The following partials are not used in their module. Remove the files or include them in a page." + echo -e "${unused_partials}" + exit_status=1 else - echo "INFO: All partials have reference in the modules." + info "All partials have reference in the modules." fi if [[ "$missing_anchors" ]]; then - echo "ERROR: The following anchors required for the application dashboard are missing:" - echo -e "${missing_anchors}" - exit_status=1 + error "The following anchors required for the application dashboard are missing:" + echo -e "${missing_anchors}" + exit_status=1 else - echo "INFO: All dashboard anchors are present." + info "All dashboard anchors are present." fi - exit $exit_status diff --git a/tools/devfiles-list.sh b/tools/devfiles-list.sh index 6d9867d395..2d6e502c17 100755 --- a/tools/devfiles-list.sh +++ b/tools/devfiles-list.sh @@ -7,6 +7,7 @@ # # SPDX-License-Identifier: EPL-2.0 +umask 002 PROJECT=$1 WORKDIR="$(pwd)" diff --git a/tools/environment_docs_gen.sh b/tools/environment_docs_gen.sh index 2a84c21bc1..8a303f44af 100755 --- a/tools/environment_docs_gen.sh +++ b/tools/environment_docs_gen.sh @@ -8,105 +8,115 @@ # SPDX-License-Identifier: EPL-2.0 # set -o pipefail - +umask 002 +info() { + echo -e "\e[32mINFO $1" +} +error() { + echo -e "\e[31mERROR $1" +} CURRENT_VERSION="" RAW_CONTENT="" NEWLINE=$'\n' NEWLINEx2="$NEWLINE$NEWLINE" # TABLE_HEADER="$NEWLINE,=== $NEWLINE Environment Variable Name,Default value, Description $NEWLINE" # TABLE_FOOTER=",=== $NEWLINEx2" -PARENT_PATH=$( cd "$(dirname "${BASH_SOURCE[0]}")/.." ; pwd -P ) +PARENT_PATH=$( + cd "$(dirname "${BASH_SOURCE[0]}")/.." + pwd -P +) BUFF="" -OUTPUT_PATH="$PARENT_PATH/modules/administration-guide/examples/system-variables.adoc" +OUTPUT_DIR="$PARENT_PATH/build/collector/che-server-properties" +OUTPUT_PATH="$OUTPUT_DIR/system-variables.adoc" + +mkdir -p "$OUTPUT_DIR" fetch_current_version() { # echo "Trying to read current product version from $PARENT_PATH/antora.yml..." >&2 # remove spaces, single and double quotes from the value of prod-ver, then append .x CURRENT_VERSION=$(grep 'prod-ver:' "$PARENT_PATH/antora.yml" | cut -d: -f2 | tr -d " '\"").x if [ $? -ne 0 ]; then - echo "Failure: Cannot read version from $PARENT_PATH/antora.yml" >&2 + error "Cannot read version from $PARENT_PATH/antora.yml" >&2 exit 1 fi if [[ "$CURRENT_VERSION" == 'main.x' ]]; then - CURRENT_VERSION="main" + CURRENT_VERSION="main" fi - echo "Detected version: $CURRENT_VERSION" >&2 + info "Version: $CURRENT_VERSION" >&2 } - fetch_conf_files_content() { # echo "Fetching property files content from GitHub..." >&2 CHE_PROPERTIES_URL="https://raw.githubusercontent.com/eclipse-che/che-server/$CURRENT_VERSION/assembly/assembly-wsmaster-war/src/main/webapp/WEB-INF/classes/che/che.properties" RAW_CONTENT=$(curl -sf "$CHE_PROPERTIES_URL") if [ $? -ne 0 ]; then - echo "Failure: Cannot read che.properties from URL $CHE_PROPERTIES_URL" >&2 + error "Cannot read che.properties from URL $CHE_PROPERTIES_URL" >&2 exit 1 fi MULTIUSER_PROPERTIES_URL="https://raw.githubusercontent.com/eclipse-che/che-server/$CURRENT_VERSION/assembly/assembly-wsmaster-war/src/main/webapp/WEB-INF/classes/che/multiuser.properties" RAW_CONTENT="$RAW_CONTENT $(curl -sf "$MULTIUSER_PROPERTIES_URL")" if [ $? -ne 0 ]; then - echo "Failure: Cannot read multiuser.properties from URL $MULTIUSER_PROPERTIES_URL" >&2 + error "Cannot read multiuser.properties from URL $MULTIUSER_PROPERTIES_URL" >&2 exit 1 fi # echo "Fetching content done. Trying to parse it." >&2 } parse_content() { - while read -r LINE - do - if [[ $LINE == '##'* ]]; then # line starting with two or more #s means new topic is started + while read -r LINE; do + if [[ $LINE == '##'* ]]; then # line starting with two or more #s means new topic is started if [[ -n $TOPIC ]]; then - BUFF="$BUFF$TABLE_FOOTER" # topic changes, closing the table + BUFF="$BUFF$TABLE_FOOTER" # topic changes, closing the table fi - TOPIC="${LINE//#}" # read topic, stripping #s - TOPIC="${TOPIC/ }" # trim first space - TOPICID="${TOPIC// /-}" # create topic ID - TOPICID="$(sed 's|-\{2,\}|-|g; s|[\"\/=,.<>?!;:()*]||g; s|\(.*\)|[id="\1"]|;s|prod-short|prod-id-short|' <<< $TOPICID)" - # replace spaces with dashes, create topic ID, convert to lowercase chars - # remove non alpha-num, wrap in AsciiDoc ID markup - TOPICID=${TOPICID,,} + TOPIC="${LINE//#/}" # read topic, stripping #s + TOPIC="${TOPIC/ /}" # trim first space + TOPICID="${TOPIC// /-}" # create topic ID + TOPICID="$(sed 's|-\{2,\}|-|g; s|[\"\/=,.<>?!;:()*]||g; s|\(.*\)|[id="\1"]|;s|prod-short|prod-id-short|' <<<$TOPICID)" + # replace spaces with dashes, create topic ID, convert to lowercase chars + # remove non alpha-num, wrap in AsciiDoc ID markup + TOPICID=${TOPICID,,} # echo " Found begin of topic: $TOPIC" >&2 - BUFF="${BUFF}${NEWLINE}${TOPICID}${NEWLINE}= ${TOPIC}${NEWLINEx2}" # new topic and table header - elif [[ $LINE == '#'* ]] && [[ -n $TOPIC ]]; then # line starting with single # means property description (can be multiline) - TRIM_LINE=${LINE/\#} # read description, stripping first # - DESCR_BUFF="$DESCR_BUFF${TRIM_LINE}" # collect all description lines into buffer + BUFF="${BUFF}${NEWLINE}${TOPICID}${NEWLINE}= ${TOPIC}${NEWLINEx2}" # new topic and table header + elif [[ $LINE == '#'* ]] && [[ -n $TOPIC ]]; then # line starting with single # means property description (can be multiline) + TRIM_LINE=${LINE/\#/} # read description, stripping first # + DESCR_BUFF="$DESCR_BUFF${TRIM_LINE}" # collect all description lines into buffer elif [[ -z $LINE ]] && [[ -n $TOPIC ]]; then - DESCR_BUFF="" # empty line is a separator -> cleanup description and property name + value + DESCR_BUFF="" # empty line is a separator -> cleanup description and property name + value KEY="" VALUE="" - elif [[ -n $TOPIC ]]; then # non-empty line after any topic that doesn't start with # -> treat as property line - IFS=$'=' read -r KEY VALUE <<< "$LINE" # property split into key and value - ENV=${KEY^^} # capitalize property name - ENV="\`+${ENV//_/__}+\`" # replace single underscores with double - ENV=${ENV//./_} # replace dots with single underscore - VALUE="${VALUE/ }" # trim first space - VALUE="\`+${VALUE}+\`" # make sure asciidoc doesn't mix it up with attributes - VALUE="${VALUE/\`++\`/empty}" # remove empty value `++` - - DESCR_BUFF="$(sed 's|\${\([^}]*\)}|$++{\1}++|g' <<< $DESCR_BUFF)" # make sure asciidoc doesn't mix it up with attributes - DESCR_BUFF="$(sed 's|\(Eclipse \)\?\bChe\b|{prod-short}|g' <<< $DESCR_BUFF)" # (Eclipse) Che -> {prod-short} - DESCR_BUFF="$(sed -E 's| http:| \\http:|g' <<< $DESCR_BUFF)" # Deactivate http links - DESCR_BUFF="$(sed -E 's| https:| \\https:|g' <<< $DESCR_BUFF)" # Deactivate http links - DESCR_BUFF="$(sed -E 's|https://docs.openshift.com/container-platform/latest/architecture/additional_concepts/storage.html#pv-access-modes|https://docs.openshift.com/container-platform/4.4/storage/understanding-persistent-storage.html|' <<< $DESCR_BUFF)" # Fix broken link - DESCR_BUFF="$(sed -E 's|https://docs.openshift.com/container-platform/latest/dev_guide/compute_resources.html#dev-compute-resources|https://docs.openshift.com/container-platform/4.4/storage/understanding-persistent-storage.html|' <<< $DESCR_BUFF)" # Fix broken link - DESCR_BUFF="$(sed -E 's|https://www.keycloak.org/docs/3.3/server_admin/topics/identity-broker/social/openshift.html|https://www.keycloak.org/docs/latest/server_admin/index.html#openshift-4|' <<< $DESCR_BUFF)" # Fix broken link - DESCR_BUFF="$(sed -E 's|k8s|{orch-name}|g' <<< $DESCR_BUFF)" # k8s to {orch-name} - DESCR_BUFF="$(sed -E 's| openshift| {ocp}|g' <<< $DESCR_BUFF)" # k8s to {orch-name} - DESCR_BUFF="$(sed -E 's|che-host|prod-host|g' <<< $DESCR_BUFF)" # fix missing attribute che-host - DESCR_BUFF="$(sed -E 's|\{WORKSPACE_ID|\\\{WORKSPACE_ID|g' <<< $DESCR_BUFF)" # fix missing attribute WORKSPACE_ID - DESCR_BUFF="$(sed -E 's|\{generated_8_chars|\\\{generated_8_chars|g' <<< $DESCR_BUFF)" # fix missing attribute generated_8_chars + elif [[ -n $TOPIC ]]; then # non-empty line after any topic that doesn't start with # -> treat as property line + IFS=$'=' read -r KEY VALUE <<<"$LINE" # property split into key and value + ENV=${KEY^^} # capitalize property name + ENV="\`+${ENV//_/__}+\`" # replace single underscores with double + ENV=${ENV//./_} # replace dots with single underscore + VALUE="${VALUE/ /}" # trim first space + VALUE="\`+${VALUE}+\`" # make sure asciidoc doesn't mix it up with attributes + VALUE="${VALUE/\`++\`/empty}" # remove empty value `++` + + DESCR_BUFF="$(sed 's|\${\([^}]*\)}|$++{\1}++|g' <<<$DESCR_BUFF)" # make sure asciidoc doesn't mix it up with attributes + DESCR_BUFF="$(sed 's|\(Eclipse \)\?\bChe\b|{prod-short}|g' <<<$DESCR_BUFF)" # (Eclipse) Che -> {prod-short} + DESCR_BUFF="$(sed -E 's| http:| \\http:|g' <<<$DESCR_BUFF)" # Deactivate http links + DESCR_BUFF="$(sed -E 's| https:| \\https:|g' <<<$DESCR_BUFF)" # Deactivate http links + DESCR_BUFF="$(sed -E 's|https://docs.openshift.com/container-platform/latest/architecture/additional_concepts/storage.html#pv-access-modes|https://docs.openshift.com/container-platform/4.4/storage/understanding-persistent-storage.html|' <<<$DESCR_BUFF)" # Fix broken link + DESCR_BUFF="$(sed -E 's|https://docs.openshift.com/container-platform/latest/dev_guide/compute_resources.html#dev-compute-resources|https://docs.openshift.com/container-platform/4.4/storage/understanding-persistent-storage.html|' <<<$DESCR_BUFF)" # Fix broken link + DESCR_BUFF="$(sed -E 's|https://www.keycloak.org/docs/3.3/server_admin/topics/identity-broker/social/openshift.html|https://www.keycloak.org/docs/latest/server_admin/index.html#openshift-4|' <<<$DESCR_BUFF)" # Fix broken link + DESCR_BUFF="$(sed -E 's|k8s|{orch-name}|g' <<<$DESCR_BUFF)" # k8s to {orch-name} + DESCR_BUFF="$(sed -E 's| openshift| {ocp}|g' <<<$DESCR_BUFF)" # k8s to {orch-name} + DESCR_BUFF="$(sed -E 's|che-host|prod-host|g' <<<$DESCR_BUFF)" # fix missing attribute che-host + DESCR_BUFF="$(sed -E 's|\{WORKSPACE_ID|\\\{WORKSPACE_ID|g' <<<$DESCR_BUFF)" # fix missing attribute WORKSPACE_ID + DESCR_BUFF="$(sed -E 's|\{generated_8_chars|\\\{generated_8_chars|g' <<<$DESCR_BUFF)" # fix missing attribute generated_8_chars - DESCR_BUFF="${DESCR_BUFF/ }" # trim first space - DESCR_BUFF="${DESCR_BUFF//::/:}" # cleanup double colons - BUFF="${BUFF}${NEWLINE}== ${ENV}${NEWLINEx2}${DESCR_BUFF}${NEWLINEx2}Default::: ${VALUE}${NEWLINEx2}'''${NEWLINEx2}" # apply key value and description buffer + DESCR_BUFF="${DESCR_BUFF/ /}" # trim first space + DESCR_BUFF="${DESCR_BUFF//::/:}" # cleanup double colons + BUFF="${BUFF}${NEWLINE}== ${ENV}${NEWLINEx2}${DESCR_BUFF}${NEWLINEx2}Default::: ${VALUE}${NEWLINEx2}'''${NEWLINEx2}" # apply key value and description buffer fi - done <<< "$RAW_CONTENT" + done <<<"$RAW_CONTENT" # BUFF="$BUFF$TABLE_FOOTER" # close last table BUFF="pass:[] -$BUFF" - echo "$BUFF" > "$OUTPUT_PATH" # flush buffer into file - echo "Processing done. Output file is $OUTPUT_PATH" >&2 +$BUFF" + echo "$BUFF" >"$OUTPUT_PATH" # flush buffer into file + info "Single-sourced $OUTPUT_PATH" >&2 } fetch_current_version diff --git a/tools/newtopic.sh b/tools/newtopic.sh index d94388762c..60c42a80f9 100755 --- a/tools/newtopic.sh +++ b/tools/newtopic.sh @@ -8,6 +8,7 @@ # SPDX-License-Identifier: EPL-2.0 # +umask 002 echo 'Choose the target guide:' PS3='Please select the target guide: ' options=("administration-guide" "contributor-guide" "end-user-guide" "extensions" "overview") diff --git a/tools/preview.sh b/tools/preview.sh index 8971229003..1dc5791c55 100755 --- a/tools/preview.sh +++ b/tools/preview.sh @@ -8,9 +8,8 @@ # SPDX-License-Identifier: EPL-2.0 # -# Fail on errors and display commands -set -ex - +# Fail on errors +set -e +umask 002 vale sync - LIVERELOAD=true gulp diff --git a/tools/runnerpreview.sh b/tools/runnerpreview.sh index 7c4a8a929c..1bcf60a10d 100755 --- a/tools/runnerpreview.sh +++ b/tools/runnerpreview.sh @@ -8,13 +8,20 @@ # SPDX-License-Identifier: EPL-2.0 # +umask 002 +info() { + echo -e "\e[32mINFO $1" +} +error() { + echo -e "\e[31mERROR $1" +} # Detect available runner if [ -z ${RUNNER+x} ]; then if command -v podman > /dev/null then RUNNER=podman elif command -v docker > /dev/null then RUNNER=docker - else echo "No installation of podman or docker found in the PATH" ; exit 1 + else error "No installation of podman or docker found in the PATH" ; exit 1 fi fi @@ -22,7 +29,7 @@ fi set -e # Pull the image unless using a container defined in environment variable -[ -z "${CHE_DOCS_IMAGE}" ] && ${RUNNER} pull quay.io/eclipse/che-docs:next +[ -z "${CHE_DOCS_IMAGE}" ] && ${RUNNER} pull --quiet quay.io/eclipse/che-docs:next # Display commands set -x diff --git a/tools/validate_attributes_processing.sh b/tools/validate_attributes_processing.sh index 426f24d936..9752709348 100755 --- a/tools/validate_attributes_processing.sh +++ b/tools/validate_attributes_processing.sh @@ -10,6 +10,7 @@ # Exit on any error set -e +umask 002 function usage { echo "Usage: /${BASH_SOURCE[0]} [-h] diff --git a/tools/validate_language_changes.sh b/tools/validate_language_changes.sh index f078f08001..90f50efcdd 100755 --- a/tools/validate_language_changes.sh +++ b/tools/validate_language_changes.sh @@ -8,18 +8,19 @@ # SPDX-License-Identifier: EPL-2.0 # set -e +umask 002 +info() { + echo -e "\e[32mINFO $1" +} -vale --version - -# Get fresh vale styles -vale sync +# Get fresh vale styles if required +test -d .vale/styles/RedHat/ || vale sync BRANCH=origin/${GITHUB_BASE_REF:-main} FILES=$(git diff --name-only --diff-filter=AM "$BRANCH") -echo "Files added or modified, in comparison to branch $BRANCH: -$FILES" +info "Validating files changed in comparison to branch $BRANCH:" # shellcheck disable=SC2086 (We want to split on spaces) vale ${FILES} diff --git a/tools/verify_xrefs.sh b/tools/verify_xrefs.sh index e1b523fde5..f6ce89a8b3 100755 --- a/tools/verify_xrefs.sh +++ b/tools/verify_xrefs.sh @@ -8,23 +8,27 @@ # SPDX-License-Identifier: EPL-2.0 # -echo "Verifying xrefs." +umask 002 +info() { + echo -e "\e[32mINFO $0" +} +info "Verifying xrefs." for MODULES_DIR in $@ do -echo "* Checking remains of {site-baseurl}:" +info "* Checking remains of {site-baseurl}:" grep -Ernie '{site-baseurl}' "${MODULES_DIR}" | cat -n -echo "* Checking xref with anchor without a {context}:" +info "* Checking xref with anchor without a {context}:" grep -Ernie 'xref:.?*#' "${MODULES_DIR}" | grep -Ev '{context}' | cat -n -echo "* Checking xref with anchor without a file name:" +info "* Checking xref with anchor without a file name:" grep -Ernie 'xref:.?*#' "${MODULES_DIR}" | grep -v 'adoc' | cat -n -echo "* Checking xref with {context} without a #:" +info "* Checking xref with {context} without a #:" grep -Ernie 'xref:.?*{context}' "${MODULES_DIR}" | grep -v '#' | cat -n -echo "* Checking xref without file name:" +info "* Checking xref without file name:" grep -Ernie 'xref:' "${MODULES_DIR}" | grep -v 'adoc.*adoc' | cat -n -done \ No newline at end of file +done