From 1893b8295f80b0540857b8ab3f85a47d417518f7 Mon Sep 17 00:00:00 2001 From: Andrew Obuchowicz Date: Fri, 6 Sep 2024 11:59:17 -0400 Subject: [PATCH] chore: Document webhook configuration in additonal docs Signed-off-by: Andrew Obuchowicz --- docs/additional-configuration.adoc | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/docs/additional-configuration.adoc b/docs/additional-configuration.adoc index c02db115b..027d9d35d 100644 --- a/docs/additional-configuration.adoc +++ b/docs/additional-configuration.adoc @@ -351,3 +351,24 @@ spec: ---- For documentation on Runtime Classes, see https://kubernetes.io/docs/concepts/containers/runtime-class/ + +## Configuring the Webhook deployment +The `devworkspace-webhook-server` deployment can be configured in the global DevWorkspaceOperatorConfig (DWOC). The configuration options include: https://kubernetes.io/docs/concepts/workloads/controllers/deployment/#replicas[replicas], https://kubernetes.io/docs/concepts/scheduling-eviction/taint-and-toleration/[pod tolerations] and https://kubernetes.io/docs/concepts/scheduling-eviction/assign-pod-node/#nodeselector[nodeSelector]. + +These configuration options exist in the **global** DWOC's `config.webhook` field: + +```YAML +apiVersion: controller.devfile.io/v1alpha1 +kind: DevWorkspaceOperatorConfig +metadata: + name: devworkspace-operator-config + namespace: $OPERATOR_INSTALL_NAMESPACE +config: + webhook: + nodeSelector: + tolerations: <[]tolerations> + replicas: +``` +**Note:** In order for the `devworkspace-webhook-server` configuration options to take effect: +- You must place them in the https://github.com/devfile/devworkspace-operator?tab=readme-ov-file#global-configuration-for-the-devworkspace-operator[global DWOC], which has the name `devworkspace-operator-config` and exists in the namespace where the DevWorkspaceOperator is installed. If it does not already exist on the cluster, you must create it. +- You'll need to terminate the `devworkspace-controller-manager` pod and restart it so that the `devworkspace-webhook-server` deployment can be adjusted accordingly.