Update Parameters in the CR File or Deployment
If you need to do some customization in the CR file or in the operator deployment, check the following sections.
Update Parameters in the CR File
The custom resource (CR) should be on the cluster under CRD digitalaireleases.xlr.digital.ai
(or digitalaireleaseocps.xlrocp.digital.ai
for OpenShift)
❯ kubectl get crd
NAME CREATED AT
...
digitalaireleases.xlr.digital.ai 2022-06-20T12:35:09Z
...
❯ kubectl get digitalaireleases.xlr.digital.ai -n digitalai
NAME AGE
dai-xlr 4h33m
You can change the CR dai-xlr
by editing the CR on the cluster, for example
❯ kubectl edit digitalaireleases.xlr.digital.ai dai-xlr -n digitalai
Or you can edit the file that was used during installation, for example digitalai-release/kubernetes/dairelease_cr.yaml
:
❯ kubectl apply -f digitalai-release/kubernetes/dairelease_cr.yaml -n digitalai
Or you can do a merge patch to update some part of the CR (for example, update context root):
❯ kubectl patch -n digitalai digitalaireleases.xlr.digital.ai dai-xlr \
--type=merge --patch '{"spec": {"appContextRoot": "/xlr-root"}}'
After changes are applied on the cluster, if the parameters are related to the release pods you need to restart release statefulset:
❯ kubectl rollout restart dai-xlr-digitalai-release -n digitalai
Update Parameters in the Operator Deployment
The operator deployment should be on the cluster in the namespace with name xlr-operator-controller-manager
:
❯ kubectl get deployment -n digitalai
NAME READY UP-TO-DATE AVAILABLE AGE
dai-xlr-1234567890-nginx-ingress-controller 1/1 1 1 4h8m
dai-xlr-1234567890-nginx-ingress-controller-default-backend 1/1 1 1 4h8m
xlr-operator-controller-manager 1/1 1 1 3d5h
By changing that resource, you can update:
- the version of the operator image (do this only in case that you know there are no major changes in the operator image, contact support)
- update operator resources under the path
spec.template.spec.containers[1].resources
You can change the deployment xlr-operator-controller-manager
by editing the deployment on the cluster, for example
❯ kubectl edit deployment xlr-operator-controller-manager -n digitalai
Or you can edit the file that was used during installation, for example digitalai-release/kubernetes/template/deployment.yaml
:
❯ kubectl apply -f digitalai-release/kubernetes/template/deployment.yaml -n digitalai
Or you can do a merge patch to update some part of the deployment (for example, update the operator image):
❯ kubectl patch -n digitalai deployment xlr-operator-controller-manager \
--type='json' --patch '[{"op": "replace", "path": "/spec/template/spec/containers/1/image", "value": "xebialabs/deploy-operator:23.3.1"}]'
After changes are applied on the cluster, there should be also visible and the deployment will automatically restart.