By default, managed controllers are created in the same namespace as the operations center instance.
If you want to create a managed controller in a different namespace, you need to pre-populate the namespace with the appropriate resources.
-
To prepare a namespace to install a managed controller, use the following example
values.yamlfile:OperationsCenter: Enabled: false Master: Enabled: true OperationsCenterNamespace: ci(1) Agents: Enabled: true1 Replace ciwith the actual namespace where the operations center is installed. If the operations center is located in another cluster, set it to the same value as the current namespace and then create an operations center service account for authentication. -
Use the following example to perform the installation.
export NAMESPACE=my-team(1) kubectl create namespace $NAMESPACE || true helm install ci-controllers-$NAMESPACE cloudbees/cloudbees-core --namespace $NAMESPACE -f values.yaml1 Replace my-teamwith the actual namespace where the managed controllers will be created.
Controller provisioning configuration
To provision controllers in their own namespaces, each controller must use a specific sub-domain. For example, if the operations center domain is ci.example.org and the URL is https://ci.example.org/cjoc/, a controller dev1 should use the sub-domain dev1.ci.example.org or dev1-ci.example.org. It is preferable to use dev1-ci.example.org if using wild card certificates for the domain example.org.
To configure each controller to use a specific sub-domain in the operations center, navigate to and under Kubernetes Cluster endpoints, set the Controller URL Pattern. For example, if the operations center domain is ci.example.org, the Controller URL Pattern should be https://*-ci.example.org/*/.
Provision controllers
The namespace for the controller resources can be configured as the default namespace for all managed controllers in the main operations center configuration screen with the namespace parameter.
The namespace can also specify a specific managed controller in the controller configuration screen with the namespace parameter.
| Leave the namespace value empty to use the value defined by the Kubernetes endpoint. |