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.
Note: After updating the files, you must restart (by deleting STS) the Deploy CC node followed by the master and worker nodes. There is not automatic restart of the PODs for Deploy because we need ordering of the restart for the master (pekko cluster requires ordered start of Deploy master pods from pod enumerated with 0).
Update Parameters in the CR File
The custom resource (CR) should be on the cluster under CRD digitalaideploys.xld.digital.ai
.
❯ kubectl get crd
NAME CREATED AT
...
digitalaideploys.xld.digital.ai 2022-06-20T12:35:09Z
...
❯ kubectl get digitalaideploys.xld.digital.ai -n digitalai
NAME AGE
dai-xld 4h33m
You can change the CR dai-xld
by editing the CR on the cluster, for example
❯ kubectl edit digitalaideploys.xld.digital.ai dai-xld -n digitalai
Or you can edit the file that was used during installation, for example, digitalai-deploy/kubernetes/daideploy_cr.yaml
and apply the changes:
❯ kubectl apply -f digitalai-deploy/kubernetes/daideploy_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 digitalaideploys.xld.digital.ai dai-xld \
--type=merge --patch '{"spec": {"appContextRoot": "/xld-root"}}'
After changes are applied on the cluster, if the parameters are related to the Deploy pods you need to restart Deploy statefulsets:
❯ kubectl delete sts dai-xld-digitalai-deploy-master -n digitalai
❯ kubectl delete sts dai-xld-digitalai-deploy-worker -n digitalai
Update Parameters in the Operator Deployment
The operator deployment should be on the cluster in the namespace with name xld-operator-controller-manager
:
❯ kubectl get deployment -n digitalai
NAME READY UP-TO-DATE AVAILABLE AGE
dai-xld-1234567890-nginx-ingress-controller 1/1 1 1 4h8m
dai-xld-1234567890-nginx-ingress-controller-default-backend 1/1 1 1 4h8m
xld-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 xld-operator-controller-manager
by editing the deployment on the cluster. For example:
❯ kubectl edit deployment xld-operator-controller-manager -n digitalai
Or you can edit the file that was used during installation, for example digitalai-deploy/kubernetes/template/deployment.yaml
:
❯ kubectl apply -f digitalai-deploy/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 xld-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.