Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -102,11 +102,11 @@ EOF
echo "Creating the 'che-operator-cr-patch.yaml' file locally."
cat > che-operator-cr-patch.yaml << EOF
kind: CheCluster
apiVersion: org.eclipse.che/v1
apiVersion: org.eclipse.che/v2
spec:
server:
airGapContainerRegistryHostname: "$my_registry"
airGapContainerRegistryOrganization: "${my_catalog}"
containerRegistry:
hostname: "$my_registry"
organization: "${my_catalog}"
EOF

echo "Removing index image from mappings.txt to prepare mirroring."
Expand Down
272 changes: 122 additions & 150 deletions modules/administration-guide/examples/checluster-properties.adoc

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -10,35 +10,40 @@
This section describes all fields available to customize the `CheCluster` Custom Resource.

* xref:a-minimal-checluster-custom-resource-example_{context}[]
* xref:checluster-custom-resource-server-settings_{context}[]
* xref:checluster-custom-resource-database-settings_{context}[]
* xref:checluster-custom-resource-auth-settings_{context}[]
* xref:checluster-custom-resource-storage-settings_{context}[]
* xref:checluster-custom-resource-k8s-settings_{context}[]
* xref:checluster-custom-resource-metrics-settings_{context}[]
* xref:checluster-custom-resource-devEnvironments-settings_{context}[]
* xref:checluster-custom-resource-components-settings_{context}[]
* xref:checluster-custom-resource-components-properties-devWorkspace-settings_{context}[]
* xref:checluster-custom-resource-components-properties-cheServer-settings_{context}[]
* xref:checluster-custom-resource-components-properties-pluginRegistry-settings_{context}[]
* xref:checluster-custom-resource-components-properties-devfileRegistry-settings_{context}[]
* xref:checluster-custom-resource-components-properties-database-settings_{context}[]
* xref:checluster-custom-resource-components-properties-dashboard-settings_{context}[]
* xref:checluster-custom-resource-components-properties-imagePuller-settings_{context}[]
* xref:checluster-custom-resource-components-properties-metrics-settings_{context}[]
* xref:checluster-custom-resource-networking-settings_{context}[]
* xref:checluster-custom-resource-containerRegistry-settings_{context}[]
* xref:checluster-custom-resource-status-settings_{context}[]

[id="a-minimal-checluster-custom-resource-example_{context}"]
.A minimal `CheCluster` Custom Resource example.
====
[source,yaml,subs="+quotes,+attributes"]
----
apiVersion: org.eclipse.che/v1
apiVersion: org.eclipse.che/v2
kind: CheCluster
metadata:
name: {prod-checluster}
spec:
auth:
externalIdentityProvider: false
database:
externalDb: false
server:
selfSignedCert: false
gitSelfSignedCert: false
tlsSupport: true
storage:
pvcStrategy: 'common'
pvcClaimSize: '1Gi'
devEnvironments:
defaultNamespace:
template: '<username>-che'
storage:
pvcStrategy: 'common'
components:
database:
externalDb: false
metrics:
enable: true
----
====

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,9 +55,9 @@ app.kubernetes.io/part-of=che.eclipse.org -n {prod-namespace}
[subs="+quotes,+attributes"]
----
spec:
server:
cheHost: <hostname> <1>
cheHostTLSSecret: <secret> <2>
networking:
hostname: <hostname> <1>
tlsSecretName: <secret> <2>
----
<1> Custom {prod} server hostname
<2> The TLS secret name
Expand Down
11 changes: 6 additions & 5 deletions modules/administration-guide/pages/configuring-ingresses.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,14 @@ You can configure {orch-ingress} labels and annotations, if your organization re
[source,yaml,subs="+quotes,+attributes"]
----
spec:
server:
cheServerIngress:
components:
cheServer:
extraProperties:
CHE_INFRA_KUBERNETES_INGRESS_LABELS: __<labels>__ <1>
CHE_INFRA_KUBERNETES_INGRESS_ANNOTATIONS______JSON: "__<annotations>__" <2>
networking:
labels: __<labels>__ <1>
annotations: __<annotations>__ <2>
customCheProperties:
CHE_INFRA_KUBERNETES_INGRESS_LABELS: __<labels>__ <1>
CHE_INFRA_KUBERNETES_INGRESS_ANNOTATIONS______JSON: "__<annotations>__" <2>
----
<1> A comma-separated list of labels for {orch-ingress}: `key1=value1,key2=value2`.
<2> Annotations for {orch-ingress} in JSON format: `{"key1": "value1", "key2" : "value2"}`.
Expand Down
19 changes: 9 additions & 10 deletions modules/administration-guide/pages/configuring-routes.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -22,16 +22,15 @@ You can configure labels, annotations, and domains for OpenShift Route to work w
[source,yaml,subs="+quotes"]
----
spec:
server:
cheServerRoute:
labels: <labels> <1>
domain: <domain> <2>
annotations: <3>
key1: value1
key2: value2
customCheProperties:
CHE_INFRA_OPENSHIFT_ROUTE_LABELS: <labels> <1>
CHE_INFRA_OPENSHIFT_ROUTE_HOST_DOMAIN__SUFFIX: <domain> <2>
components:
cheServer:
extraProperties:
CHE_INFRA_OPENSHIFT_ROUTE_LABELS: <labels> <1>
CHE_INFRA_OPENSHIFT_ROUTE_HOST_DOMAIN__SUFFIX: <domain> <2>
networking:
labels: __<labels>__ <1>
domain: __<domain>__ <2>
annotations: __<annotations>__ <3>
----
<1> A comma-separated list of labels that the target ingress controller uses to filter the set of Routes to service.
<2> The DNS name serviced by the target ingress controller.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,10 @@ The default installation enables the administrative privileges for the `admin` u
[source,yaml,subs="+attributes,+quotes,macros"]
----
spec:
server:
customCheProperties:
pass:[CHE_SYSTEM_ADMIN__NAME]: '__<admin>__'
components:
cheServer:
extraProperties:
pass:[CHE_SYSTEM_ADMIN__NAME]: '__<admin>__'
----

.Additional resources
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,10 @@ If the value is `-1`, users can create an unlimited number of workspaces. If the
[source,yaml,subs="+quotes"]
----
spec:
server:
customCheProperties:
CHE_LIMITS_USER_WORKSPACES_COUNT: "__<number-of-workspaces>__"
components:
cheServer:
extraProperties:
CHE_LIMITS_USER_WORKSPACES_COUNT: "__<number-of-workspaces>__"
----

.Additional resources
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,10 @@ A valid {orch-namespace} name template follows these conventions:
[source,yaml,subs="+quotes,+attributes"]
----
spec:
server:
workspaceNamespaceDefault: __<workspace_namespace_template_>__
components:
devEnvironments:
defaultNamespace:
template: __<workspace_namespace_template_>__
----
+
.User workspaces {orch-namespace} name template examples
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -401,8 +401,8 @@ Set the telemetry plug-in as a default plug-in. Default plug-ins are applied on
+
----
spec:
server:
workspacesDefaultPlugins:
devEnvironments:
defaultPlugins:
- editor: eclipse/che-theia/next <1>
plugins: <2>
- 'http://apache-che.apps-crc.testing/plugin.yaml'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,9 @@ $ {orch-cli} label configmap che-git-self-signed-cert \
[source,yaml,subs="+attributes"]
----
spec:
server:
gitSelfSignedCert: true
devEnvironments:
trustedCerts:
gitTrustedCertsConfigMapName: che-git-self-signed-cert
----

.Verification steps
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,11 +45,16 @@ Use CheCluster Custom Resource definition to define storage classes:
[source,yaml,subs="+quotes,+attributes"]
----
spec:
storage:
# keep blank unless you need to use a non default storage class for PostgreSQL PVC
postgresPVCStorageClassName: 'postgres-storage'
# keep blank unless you need to use a non default storage class for workspace PVC(s)
workspacePVCStorageClassName: 'workspace-storage'
components:
database:
pvc:
# keep blank unless you need to use a non default storage class for PostgreSQL PVC
storageClass: 'postgres-storage'
devEnvironments:
storage:
pvc:
# keep blank unless you need to use a non default storage class for workspace PVC(s)
storageClass: 'workspace-storage'
----

. Define the persistent volume for a PostgreSQL database in a `che-postgres-pv.yaml` file:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,8 @@ To enable the Woopra plug-in on the {prod} installation:
[source,yaml]
----
spec:
server:
workspacesDefaultPlugins:
devEnvironments:
defaultPlugins:
- editor: eclipse/che-theia/next <1>
plugins: <2>
- 'https://your-web-server/plugin.yaml'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,15 @@

A default deployment of {prod-short} consists of a `CheCluster` Custom Resource parameterized by the {prod} Operator.

The `CheCluster` Custom Resource is a {kubernetes} object. You can configure it by editing the `CheCluster` Custom Resource YAML file. This file contains sections to configure each component: `auth`, `database`, `server`, `storage`.
The `CheCluster` Custom Resource is a {kubernetes} object. You can configure it by editing the `CheCluster` Custom Resource YAML file. This file contains sections to configure each component: `devWorkspace`, `cheServer`, `pluginRegistry`, `devfileRegistry`, `database`, `dashboard` and `imagePuller`.

The {prod} Operator translates the `CheCluster` Custom Resource into a config map usable by each component of the {prod-short} installation.

The {orch-name} platform applies the configuration to each component, and creates the necessary Pods. When {orch-name} detects changes in the configuration of a component, it restarts the Pods accordingly.

.Configuring the main properties of the {prod-short} server component
====
. Apply the `CheCluster` Custom Resource YAML file with suitable modifications in the `server` component section.
. Apply the `CheCluster` Custom Resource YAML file with suitable modifications in the `cheServer` component section.
. The Operator generates the `che` `ConfigMap`.
. {orch-name} detects changes in the `ConfigMap` and triggers a restart of the {prod-short} Pod.
====
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,10 @@
[source,yaml]
----
spec:
server:
customCheProperties:
CHE_LOGGER_CONFIG: "che.infra.request-logging=TRACE"
components:
cheServer:
extraProperties:
CHE_LOGGER_CONFIG: "che.infra.request-logging=TRACE"
----

.Additional resources
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,10 @@ map of additional environment variables to apply to the {prod-short} server comp
[source,yaml,subs="+quotes,+attributes,+macros"]
----
spec:
server:
customCheProperties:
pass:[CHE_WORKSPACE_DEFAULT__MEMORY__LIMIT__MB]: "2048"
components:
cheServer:
extraProperties:
pass:[CHE_WORKSPACE_DEFAULT__MEMORY__LIMIT__MB]: "2048"
----
====

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,10 @@
[source,yaml,subs="+attributes,+quotes"]
----
spec:
server:
customCheProperties:
CHE_LOGGER_CONFIG: "__<key1=value1,key2=value2>__" <1>
components:
cheServer:
extraProperties:
CHE_LOGGER_CONFIG: "__<key1=value1,key2=value2>__" <1>
----
<1> Comma-separated list of key-value pairs, where keys are the names of the loggers as seen
in the {prod-short} server log output and values are the required log levels.
Expand All @@ -22,9 +23,10 @@ in the {prod-short} server log output and values are the required log levels.
[source,yaml]
----
spec:
server:
customCheProperties:
CHE_LOGGER_CONFIG: "org.eclipse.che.api.workspace.server.WorkspaceManager=DEBUG"
components:
cheServer:
extraProperties:
CHE_LOGGER_CONFIG: "org.eclipse.che.api.workspace.server.WorkspaceManager=DEBUG"
----
====

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,8 @@ You can configure this behaviour.
[source,yaml,subs="+attributes,+quotes"]
----
spec:
metrics:
enable: __<boolean>__ <1>
components:
metrics:
enable: __<boolean>__ <1>
----
<1> `true` to enable, `false` to disable.
46 changes: 21 additions & 25 deletions tools/checluster_docs_gen.sh
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ fetch_current_version() {
if [[ "$CURRENT_VERSION" == 'main.x' ]]; then
CURRENT_VERSION="main"
fi

echo "Detected version: $CURRENT_VERSION" >&2
}

Expand All @@ -41,25 +42,28 @@ fetch_conf_files_content() {
# echo "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_v1_che_crd.yaml"
CHECLUSTER_PROPERTIES_URL="https://raw.githubusercontent.com/eclipse-che/che-operator/$CURRENT_VERSION/config/crd/bases/org.eclipse.che_checlusters.yaml"
else
CHECLUSTER_PROPERTIES_URL="https://raw.githubusercontent.com/redhat-developer/codeready-workspaces-operator/$CURRENT_VERSION/config/crd/bases/org_v1_che_crd.yaml"
CHECLUSTER_PROPERTIES_URL="https://raw.githubusercontent.com/redhat-developer/codeready-workspaces-operator/$CURRENT_VERSION/config/crd/bases/org.eclipse.che_checlusters.yaml"
fi

RAW_CONTENT=$(curl -sf "$CHECLUSTER_PROPERTIES_URL")
local crdVersion=$(echo "$RAW_CONTENT" | yq -r '.apiVersion')
echo "Fetching content done. CRD version: $crdVersion. Trying to parse it." >&2
echo "Fetching content done. Trying to parse it." >&2
}

parse_content() {
parse_section "server" "\`CheCluster\` Custom Resource \`server\` settings, related to the {prod-short} server component."
parse_section "database" "\`CheCluster\` Custom Resource \`database\` configuration settings related to the database used by {prod-short}."
parse_section "auth" "Custom Resource \`auth\` configuration settings related to authentication used by {prod-short}."
parse_section "storage" "\`CheCluster\` Custom Resource \`storage\` configuration settings related to persistent storage used by {prod-short}."
if [[ $PRODUCT == "che" ]]; then
parse_section "k8s" "\`CheCluster\` Custom Resource \`k8s\` configuration settings specific to {prod-short} installations on {platforms-name}."
fi
parse_section "metrics" "\`CheCluster\` Custom Resource \`metrics\` settings, related to the {prod-short} metrics collection used by {prod-short}."
parse_section "devEnvironments" "Development environment configuration options."
parse_section "components" "{prod-short} components configuration."
parse_section "components.properties.devWorkspace" "DevWorkspace operator component configuration."
parse_section "components.properties.cheServer" "General configuration settings related to the {prod-short} server component."
parse_section "components.properties.pluginRegistry" "Configuration settings related to the Plug-in registry component used by the {prod-short} installation."
parse_section "components.properties.devfileRegistry" "Configuration settings related to the Devfile registry component used by the {prod-short} installation."
parse_section "components.properties.database" "Configuration settings related to the Database component used by the {prod-short} installation."
parse_section "components.properties.dashboard" "Configuration settings related to the Dashboard component used by the {prod-short} installation."
parse_section "components.properties.imagePuller" "Kubernetes Image Puller component configuration."
parse_section "components.properties.metrics" "{prod-short} server metrics component configuration."
parse_section "networking" "Networking, {prod-short} authentication and TLS configuration."
parse_section "containerRegistry" "Configuration of an alternative registry that stores {prod-short} images."
parse_section "status" "\`CheCluster\` Custom Resource \`status\` defines the observed state of {prod-short} installation"
BUFF="pass:[<!-- vale off -->]

Expand All @@ -72,23 +76,15 @@ $BUFF"
parse_section() {
local section
local sectionName=$1
local id="[id=\"checluster-custom-resource-$sectionName-settings_{context}\"]"
local sectionName2Id=$(echo $sectionName | tr '.' '-' )
local id="[id=\"checluster-custom-resource-$sectionName2Id-settings_{context}\"]"
local caption=$2
local crdVersion=$(echo "$RAW_CONTENT" | yq -r '.apiVersion')
# echo "Parsing section: "$sectionName

# echo "Parsing section: "$sectionName
if [[ $sectionName == "status" ]]; then
if [[ $crdVersion == "apiextensions.k8s.io/v1beta1" ]]; then
section=$(echo "$RAW_CONTENT" | yq -M '.spec.validation.openAPIV3Schema.properties.status')
else
section=$(echo "$RAW_CONTENT" | yq -M '.spec.versions[] | select(.name == "v1") | .schema.openAPIV3Schema.properties.status')
fi
section=$(echo "$RAW_CONTENT" | yq -M '.spec.versions[] | select(.name == "v2") | .schema.openAPIV3Schema.properties.status')
else
if [[ $crdVersion == "apiextensions.k8s.io/v1beta1" ]]; then
section=$(echo "$RAW_CONTENT" | yq -M '.spec.validation.openAPIV3Schema.properties.spec.properties.'"$sectionName")
else
section=$(echo "$RAW_CONTENT" | yq -M '.spec.versions[] | select(.name == "v1") | .schema.openAPIV3Schema.properties.spec.properties.'"$sectionName")
fi
section=$(echo "$RAW_CONTENT" | yq -M '.spec.versions[] | select(.name == "v2") | .schema.openAPIV3Schema.properties.spec.properties.'"$sectionName")
fi

local properties=(
Expand Down