From 20ed1b689d83a7f9b60797ed257e978aac1aa39b 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 | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/docs/additional-configuration.adoc b/docs/additional-configuration.adoc index c02db115b..93269c144 100644 --- a/docs/additional-configuration.adoc +++ b/docs/additional-configuration.adoc @@ -351,3 +351,25 @@ 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 so that the replicaset can recreate it. The new pod will update the `devworkspace-webhook-server` deployment.