Refactor Power VS reconcile helpers for better readbility and better code grouping #1907
Labels
area/provider/ibmcloud
Issues or PRs related to ibmcloud provider
kind/feature
Categorizes issue or PR as related to a new feature.
Milestone
/kind feature
/area provider/ibmcloud
Describe the solution you'd like
[A clear and concise description of what you want to happen.]
Currently in any Power VS service reconcilation are broadly classified into 3 different functionalities
Fetch service instance id from either spec or status
Ref:
cluster-api-provider-ibmcloud/cloud/scope/powervs_cluster.go
Lines 703 to 722 in 01e1771
Check for existing resources in cloud
Ref:
cluster-api-provider-ibmcloud/cloud/scope/powervs_cluster.go
Lines 725 to 733 in 01e1771
Create the service
Ref:
cluster-api-provider-ibmcloud/cloud/scope/powervs_cluster.go
Lines 736 to 747 in 01e1771
Though its working as expected, since we are adding more complex logic as the feature requests, it would be better to refactor to have particular function names rather than generic in most of the cases.
Anything else you would like to add:
[Miscellaneous information that will assist in solving the issue.]
Since we are relaying more on controllerCreated variable to decide upon user passed vs controller created resources, Eventually we are moving agaist K8s generic princile of level triggered events. IT has its own drawbacks against advantages, We also need to think of better way to avoid this.
The text was updated successfully, but these errors were encountered: