Skip to content
This repository was archived by the owner on Jun 11, 2025. It is now read-only.

Feature/cluster management#16

Merged
nxtcoder17 merged 9 commits into
kloudlite:release-1.0.5from
abdheshnayak:feature/cluster-management
Jul 13, 2023
Merged

Feature/cluster management#16
nxtcoder17 merged 9 commits into
kloudlite:release-1.0.5from
abdheshnayak:feature/cluster-management

Conversation

@abdheshnayak
Copy link
Copy Markdown
Contributor

Changes:

  • added the platform_cluster to handle cluster creation,
  • added the platform_node to handle master nodes creation and deletion
  • updated the nodes, and node pool to work more efficiently.
  • updated the finalizers of the clustersv1 controllers so they can handle the deletion of the cluster, node pool, and worker nodes.

finalizers was not that much efficient for the node and nodepool controller of clustersv1, so improved and now expected to be run perfectly.
added support to create create cluster from platform cluster for the cloud provider aws and work in progress.
improved finalizers for the cluster/v1 controllers so we can perform deletion of cluster and node also as per requirement.
now nodes can be deleted forcefully in case of requred without draining, and deleting from the cluster. it will try to drain and delete node from the cluster and ignore if any errors comes. force delete can be trigger by adding the label `kloudlite.io/force-delete: "true"`.
added diffrent controller for the resource clusterv1/cluster which will be used for the target cluster, it is responsible for the fetching all the ips of nodes present on the cluster and also responisble for ensuring deletion of the all nodepools before it get deleted.
after the completion of feature, manual test done and found some bugs in
clustersv1 so resolved those bugs.
as byoc will be not used in comming version byoc is replaced with cluster resource of clusterv1.
ctx, obj := req.Context(), req.Object

// fetch the nodepool
cl, err := rApi.Get(ctx, r.Client, fn.NN("", obj.Spec.NodePoolName), &clustersv1.Cluster{})
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fetching nodepool, then type should have been &clustersv1.NodePool, not clustersv1.Cluster ?

Copy link
Copy Markdown
Member

@nxtcoder17 nxtcoder17 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  • folder names should be of format -, no underscores in there
  • test files in operators/clusters/internal/controllers/** should be deleted if outdated

previous code was under development so left lots of conventions to follow, modified all the blocks which are not in conventions.
due to update for the conventions there was some import error.
@nxtcoder17 nxtcoder17 merged commit 8f63bf0 into kloudlite:release-1.0.5 Jul 13, 2023
@nxtcoder17 nxtcoder17 deleted the feature/cluster-management branch July 13, 2023 11:42
abdheshnayak pushed a commit that referenced this pull request Nov 5, 2024
fixes infinite reconcilation because of bad path to secret file in te…
abdheshnayak added a commit that referenced this pull request Nov 5, 2024
* ⚡ Finalizers of cluster's nodepool and node improved in controller

finalizers was not that much efficient for the node and nodepool controller of clustersv1, so improved and now expected to be run perfectly.

* ✨ Added support to create cluster from platform cluster with cp aws

added support to create create cluster from platform cluster for the cloud provider aws and work in progress.

* ⚡ Finalizers are improved for the clusters/v1 controllers

improved finalizers for the cluster/v1 controllers so we can perform deletion of cluster and node also as per requirement.

* ✨ Force delete support for the clustersv1/nodes added

now nodes can be deleted forcefully in case of requred without draining, and deleting from the cluster. it will try to drain and delete node from the cluster and ignore if any errors comes. force delete can be trigger by adding the label `kloudlite.io/force-delete: "true"`.

* ✨ Cluster controller added for the target controller

added diffrent controller for the resource clusterv1/cluster which will be used for the target cluster, it is responsible for the fetching all the ips of nodes present on the cluster and also responisble for ensuring deletion of the all nodepools before it get deleted.

* 🐛 Resolved bugs in clustersv1 found while manual testing

after the completion of feature, manual test done and found some bugs in
clustersv1 so resolved those bugs.

* 🎨 Cluster resource added in place of byoc resource of clusterv1

as byoc will be not used in comming version byoc is replaced with cluster resource of clusterv1.

* 💡 Modified the code styles according to conventions.

previous code was under development so left lots of conventions to follow, modified all the blocks which are not in conventions.

* 🐛 Import by wrong name

due to update for the conventions there was some import error.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants