Generalize CODECO installation for all K8s environements
There is the need to generalize CODECO installation to accommodate for non-KinD environments.
I have decoupled cluster creation from the integration-script.sh
, and user can add the optional --create-cluster
flag that calls the create-kind-cluster.sh
script. This way user may deploy on an already existing cluster if needed.
We need to also adapt the post_deploy.sh script. The kind-specific commands there are:
- node names
- cluster name (for MDM seems to be interchangeable with kubectl context)
- the flannel plugins lines, that already exist inside the
gitlab-profile/create-kind-cluster.sh
script, so we can remove them
These can be covered with the following lines:
CONTROL_PLANE_NODE=$(kubectl get nodes --selector='node-role.kubernetes.io/control-plane' -o jsonpath='{.items[0].metadata.name}')
WORKER_NODE_1=$(kubectl get nodes --selector='!node-role.kubernetes.io/control-plane' -o jsonpath='{.items[0].metadata.name}')
WORKER_NODE_2=$(kubectl get nodes --selector='!node-role.kubernetes.io/control-plane' -o jsonpath='{.items[1].metadata.name}')
CURRENT_CONTEXT=$(kubectl config current-context)
However, a kind specific command (cluster name) appear also in PDLC installation: sed -i 's/sonem/kind/' data_preprocessing/pdlc-dp-deployment.yaml
Regarding this, @karamolegkos said that is not for PDLC, but for MDM calls. Panagioti, is it possible to share the final API call to MDM, so that the MDM guys can tell us with what we should replace this? Any suggestion here @urb?
I have created a new ACM branch to work on the post_deploy script.