Description
/kind feature
/area provider/ibmcloud
User Story
What would you like to be added?
We would like to do following tasks
- CAPI has an enhacment to update Status fields of resources, as a part of it there few changes in API and how the conditions are represented. More information can be found in this enhancement.
- CAPI also working on v1beta2 API's and there is update in Provider contract, We would like to adopt to it. It wil be as a part of CAPI v1.11 release. More information about version migration can be found here
- CAPI provides few standard utility functions to organise the controller better for readbility and functionality, Like adding finalizers, checking whether the resource is paused, Using predicates. We should adopt them to maintain controller uniformity.
Note: Need to pay special attention to imports.
import (
...
v1beta1conditions "sigs.k8s.io/cluster-api/util/deprecated/v1beta1/conditions"
v1beta2conditions "sigs.k8s.io/cluster-api/util/deprecated/v1beta1/conditions/v1beta2"
v1beta1patch "sigs.k8s.io/cluster-api/util/deprecated/v1beta1/patch"
)
the v1beta1conditions package alias provides access to utils for managing clusterv1beta1.Conditions in status.conditions
the v1beta2conditions package alias provides access to utils for managing metav1.Conditions in status.v1beta2.conditions
the v1beta1patch package alias provides access to utils for patching objects in this phase.
The whole requirement is divided in to following tasks as of now. New items may get added if required.
-
Introduce v1beta2 conditions for IBMPowerVS Image and standardize controller code(Use CAPI provided helper functions for setting finalizers, checking paused condition, predicates ....)
Similar to
- Adopt CAPI v1beta2 status changes and respective controller changes for IBMPowerVSCluster #2312
- Adopt CAPI v1beta2 status changes and respective controller changes for IBMPowerVSMachine #2272Importing right modules reference: - https://github.com/kubernetes-sigs/cluster-api-provider-ibmcloud/pull/2393
-
Introduce v1beta2 conditions for VPC Machine and standardize controller code(Use CAPI provided helper functions for setting finalizers, checking paused condition, predicates ....)
Similar to
- Adopt CAPI v1beta2 status changes and respective controller changes for IBMPowerVSCluster #2312
- Adopt CAPI v1beta2 status changes and respective controller changes for IBMPowerVSMachine #2272Importing right modules reference: - https://github.com/kubernetes-sigs/cluster-api-provider-ibmcloud/pull/2393
-
Introduce v1beta2 conditions for VPC Cluster and standardize controller code(Use CAPI provided helper functions for setting finalizers, checking paused condition, predicates ....)
Similar to
- Adopt CAPI v1beta2 status changes and respective controller changes for IBMPowerVSCluster #2312
- Adopt CAPI v1beta2 status changes and respective controller changes for IBMPowerVSMachine #2272Importing right modules reference: - https://github.com/kubernetes-sigs/cluster-api-provider-ibmcloud/pull/2393
-
Update PowerVS and VPC ClusterClass templates to use v1beta2 types