Install Release in a Custom Namespace

  • If you would like to install multiple Release instances on the same cluster, you need to use a custom namespace.
  • Installation of the Release in custom namespace is for users that don’t want to install Release in the default namespace: digitalai.

Note: Don’t use custom namespace name that is longer from 24 characters. The namespace name is composing the CR name when using change-namespace script, and longer CR name could cause naming of some resources that are longer from 63 characters. Consider using namespace names up to 10 characters.

A few points to consider if you install Release in a custom namespace:

  • multiple Release instances on the same cluster in different namespaces.
  • each instance of the Release uses custom CR name.
  • when nginx is used, different IngressClass is created for each namespace.
  • all instances in different namespaces are reusing the same CRD; so exercise caution before deleting the CRD when you remove one of the instances.
  • every instance has one Release operator running that is managing the instance in only one namespace.


This guide is for administrators who install and manage Release.

Before You Begin

If you are doing this process as part of installation steps, you are OK, and go to next section.

  1. The Operator zip file is downloaded from the Release Software Distribution site and extracted to the standalone Deploy server you would use to install Release on the Kubernetes cluster.
  2. Created custom namespace on the cluster.

    kubectl create namespace <name-0f-the-custom-namespace>
  3. Install XL CLI.

    See Install the XL-CLI.

    Note: Use the version that matches your product version in the public folder.

Configuring Custom Namespace

  • Run the XL CLI’s xl op command with the --change-namespace flag.
  • This command changes nothing on the cluster
  • This command checks the current state of CRD and CRs, for the case if they already exist on the cluster.
  • This command prepares the YAML files in the operator zip file.
xl op --change-namespace

For example, here’s is the list of questions you would be prompted with when you run the xl op command in Azure for a custom namespace called custom-namespace-1, for example. These questions are also discussed in Upgrade Operator-based Deployments

? Select the setup mode? advanced
? Select the Kubernetes setup where the digitalai Devops Platform will be installed or uninstalled: AzureAKS [Azure AKS]
? Do you want to use Kubernetes\' current-context from ~/.kube/config? Yes
? Do you want to use an custom Kubernetes namespace (current default is 'digitalai')? Yes
? Enter the name of the existing Kubernetes namespace where the XebiaLabs DevOps Platform will be installed, updated or undeployed: custom-namespace-1
? Product server you want to deploy? daiRelease
? Does product custom resource definition already exists on the cluster? No
? Enter path to the operator package: /xl-release-kubernetes-operator/release-operator-azure-aks
Using custom resource name dai-xlr-custom-namespace-1
Everything has been updated!

Refer to the specific cloud provider documentation to gather details about the provided infrastructure.

The last two questions are specific to this process and so let us discuss them here:

? Does product custom resource definition already exists on the cluster?

  • The Release Operator CRD is reused between Release installations on the same cluster.
  • This name cannot change as it is defined in the Release’s Operator image.
  • If the CRD resource for the Release Operator already exists on the cluster, in that case answer Yes and creation of the Release operator CRD during installation will be skipped..
  • In other cases, by answering No, the Release Operator CRD will be created.

If not sure, you can run the kubectl get crd command to verify the list of CRDs on the cluster.

For example, answer Yes if you see the following result for the kubectl get crd command:

❯ kubectl get crd
NAME                                             CREATED AT
...                 2022-06-14T09:05:54Z

? Enter path to the operator package:

  • Input the absolute path to the unpacked operator’s zip file.
  • The yaml files in the zip file should be already changed.
  • The process of changing namespace checks the ingress settings to make changes in the CR file.
  • It depends on the following CR yaml dairelease_cr.yaml paths:

    • spec.nginx-ingress-controller.install
    • spec.haproxy-ingress.install

Post change namespace steps

The following files in the Operator-based installer package are updated with the custom namespace name, for example custom-namespace-1, as you change the namespace.

File name Yaml path Value to set
digitalai-release/infrastructure.yaml spec[0].children[0].children[0].name custom-namespace-1
digitalai-release/infrastructure.yaml (not on OpenShift) spec[0].children[0].children[0].namespaceName custom-namespace-1
digitalai-release/infrastructure.yaml (only on OpenShift) spec[0].children[0].children[0].projectName custom-namespace-1
digitalai-release/environment.yaml spec[0].children[0].members[0] ~Infrastructure/k8s-infra/xlr/custom-namespace-1
digitalai-release/kubernetes/template/cluster-role-digital-proxy-role.yaml custom-namespace-1-xlr-operator-proxy-role
digitalai-release/kubernetes/template/cluster-role-manager-role.yaml custom-namespace-1-xlr-operator-manager-role
digitalai-release/kubernetes/template/cluster-role-metrics-reader.yaml custom-namespace-1-xlr-operator-metrics-reader
digitalai-release/kubernetes/template/leader-election-rolebinding.yaml subjects[0].namespace custom-namespace-1
digitalai-release/kubernetes/template/manager-rolebinding.yaml custom-namespace-1-xlr-operator-manager-rolebinding
digitalai-release/kubernetes/template/manager-rolebinding.yaml custom-namespace-1-xlr-operator-manager-role
digitalai-release/kubernetes/template/manager-rolebinding.yaml subjects[0].namespace custom-namespace-1
digitalai-release/kubernetes/template/proxy-rolebinding.yaml custom-namespace-1-xlr-operator-proxy-rolebinding
digitalai-release/kubernetes/template/proxy-rolebinding.yaml custom-namespace-1-xlr-operator-proxy-role
digitalai-release/kubernetes/template/proxy-rolebinding.yaml subjects[0].namespace custom-namespace-1
digitalai-release/kubernetes/dairelease_cr.yaml dai-xlr-custom-namespace-1

Update the following files in case you use the nginx ingress (default behavior). In other words, if you have set the following parameters.

  • spec.haproxy-ingress.install = false
  • spec.nginx-ingress-controller.install = true

Note: Skip this part for OpenShift and On Premise setups. On these two providers there is already provider’s ingress setup.

File name Yaml path Value to set
digitalai-release/kubernetes/dairelease_cr.yaml nginx-dai-xlr-custom-namespace-1
digitalai-release/kubernetes/dairelease_cr.yaml nginx-dai-xlr-custom-namespace-1
digitalai-release/kubernetes/dairelease_cr.yaml spec.nginx-ingress-controller.extraArgs.ingress-class nginx-dai-xlr-custom-namespace-1
digitalai-release/kubernetes/dairelease_cr.yaml spec.nginx-ingress-controller.ingressClassResource.controllerClass
digitalai-release/kubernetes/dairelease_cr.yaml nginx-dai-xlr-custom-namespace-1

Update the following files in case you use the haproxy ingress. In other words, if you have set the following parameters.

  • spec.haproxy-ingress.install = true
  • spec.nginx-ingress-controller.install = false
File name Yaml path Value to set
digitalai-release/kubernetes/dairelease_cr.yaml haproxy-dai-xlr-custom-namespace-1
digitalai-release/kubernetes/dairelease_cr.yaml spec.haproxy-ingress.controller.ingressClass haproxy-dai-xlr-custom-namespace-1

Next Step—Proceed with the Installation

  • If you are doing this process as part of installation steps, you are finished with current step, continue with next step.
  • Once the setup is finalized you can proceed to applying the changed files to the cluster.
  • You can now run the xl apply command to deploy the setup to the cluster.