Skip to content

EPIC: Update CAPIBM resources to use v1beta2 API #2389

Open
@Karthik-K-N

Description

@Karthik-K-N

/kind feature
/area provider/ibmcloud

User Story

What would you like to be added?

We would like to do following tasks

  1. 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.
  2. 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
  3. 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.

Migration steps: https://github.com/kubernetes-sigs/cluster-api/blob/9a7f9013d7e4ccb183203d11baf022d435f72bec/docs/book/src/developer/providers/migrations/v1.10-to-v1.11.md#how-to-start-using-metav1conditions

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    area/provider/ibmcloudIssues or PRs related to ibmcloud providerkind/featureCategorizes issue or PR as related to a new feature.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions