Skip to content

✨ Promote CAPI v1beta2 conditions in CAPIBM v1beta3 api's#2623

Open
Karthik-K-N wants to merge 1 commit intokubernetes-sigs:mainfrom
Karthik-K-N:promote-v1beta3-condition
Open

✨ Promote CAPI v1beta2 conditions in CAPIBM v1beta3 api's#2623
Karthik-K-N wants to merge 1 commit intokubernetes-sigs:mainfrom
Karthik-K-N:promote-v1beta3-condition

Conversation

@Karthik-K-N
Copy link
Contributor

What this PR does / why we need it:

This PR promots conditions for IBMPowerVSCluster, IBMPowerVSMachine and IBMPowerVSImage resources, Following changes are done

  1. Moved status.V1beta2 to status.conditions
  2. Moved conditions to status.Deprecated

Necessary conversion functions are added and udpated fuzz tests to make sure no data is lost during conversions.

Which issue(s) this PR fixes (optional, in fixes #<issue number>(, fixes #<issue_number>, ...) format, will close the issue(s) when PR gets merged):
Fixes # Part of #2401

Special notes for your reviewer:

In CAPI the apiversion is v1beta2 but for CAPIBM its v1beta3, so we are using some CAPI's helper functions to convert the status, there the function name looks like v1beta1 to v1beta2 and vice versa, We are not supposed to get confused with that.

/area provider/ibmcloud

  1. Please confirm that if this PR changes any image versions, then that's the sole change this PR makes.

Release note:

Promote CAPI v1beta2 conditions

@k8s-ci-robot k8s-ci-robot added the area/provider/ibmcloud Issues or PRs related to ibmcloud provider label Feb 12, 2026
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: Karthik-K-N
Once this PR has been reviewed and has the lgtm label, please assign prajyot-parab for approval. For more information see the Code Review Process.

The full list of commands accepted by this bot can be found here.

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@netlify
Copy link

netlify bot commented Feb 12, 2026

Deploy Preview for kubernetes-sigs-cluster-api-ibmcloud ready!

Name Link
🔨 Latest commit 96e2dc9
🔍 Latest deploy log https://app.netlify.com/projects/kubernetes-sigs-cluster-api-ibmcloud/deploys/698f4007c1e14e0008c837d3
😎 Deploy Preview https://deploy-preview-2623.cluster-api-ibmcloud.sigs.k8s.io
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@Karthik-K-N
Copy link
Contributor Author

/hold
I will test once the cluster creation.

@k8s-ci-robot k8s-ci-robot added size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. labels Feb 12, 2026
@Karthik-K-N
Copy link
Contributor Author

Tested by creating a normal PowerVS cluster

karthikkn@Karthiks-MacBook-Pro cluster-api-provider-ibmcloud % kubectl get ibmpowervscluster
NAME            CLUSTER         AGE
ibm-powervs-1   ibm-powervs-1   35m

karthikkn@Karthiks-MacBook-Pro cluster-api-provider-ibmcloud % kubectl get ibmpowervsmachines
NAME                                CLUSTER         AGE   READY   STATE    HEALTH
ibm-powervs-1-control-plane-29bnm   ibm-powervs-1   29m   true    ACTIVE   OK
ibm-powervs-1-control-plane-dxg8f   ibm-powervs-1   23m   true    ACTIVE   OK
ibm-powervs-1-control-plane-j2gr5   ibm-powervs-1   35m   true    ACTIVE   OK
ibm-powervs-1-md-0-ng8z7-w4m5f      ibm-powervs-1   35m   true    ACTIVE   OK

karthikkn@Karthiks-MacBook-Pro cluster-api-provider-ibmcloud % kubectl get machines
NAME                                CLUSTER         NODE NAME                           FAILURE DOMAIN   READY   AVAILABLE   UP-TO-DATE   PHASE     AGE   VERSION
ibm-powervs-1-control-plane-29bnm   ibm-powervs-1   ibm-powervs-1-control-plane-29bnm                    False   False       True         Running   29m   v1.33.0
ibm-powervs-1-control-plane-dxg8f   ibm-powervs-1   ibm-powervs-1-control-plane-dxg8f                    False   False       True         Running   23m   v1.33.0
ibm-powervs-1-control-plane-j2gr5   ibm-powervs-1   ibm-powervs-1-control-plane-j2gr5                    False   False       True         Running   35m   v1.33.0
ibm-powervs-1-md-0-ng8z7-w4m5f      ibm-powervs-1   ibm-powervs-1-md-0-ng8z7-w4m5f                       False   False       True         Running   35m   v1.33.0

karthikkn@Karthiks-MacBook-Pro cluster-api-provider-ibmcloud % kubectl get ibmpowervscluster -o yaml
apiVersion: v1
items:
- apiVersion: infrastructure.cluster.x-k8s.io/v1beta3
  kind: IBMPowerVSCluster
  metadata:
    creationTimestamp: "2026-02-13T04:43:10Z"
    finalizers:
    - ibmpowervscluster.infrastructure.cluster.x-k8s.io
    generation: 1
    labels:
      cluster.x-k8s.io/cluster-name: ibm-powervs-1
    name: ibm-powervs-1
    namespace: default
    ownerReferences:
    - apiVersion: cluster.x-k8s.io/v1beta2
      blockOwnerDeletion: true
      controller: true
      kind: Cluster
      name: ibm-powervs-1
      uid: b732601e-e08e-4f31-8e04-54979150bdef
    resourceVersion: "1359"
    uid: 7452702b-af6f-4e77-84be-c1d4de8aac93
  spec:
    controlPlaneEndpoint:
      host: 163.68.77.242
      port: 6443
    network:
      name: karthik-capi-test
    serviceInstanceID: 10b1000b-da8d-4e18-ad1f-6b2a56a8c130
  status:
    conditions:
    - lastTransitionTime: "2026-02-13T04:43:11Z"
      message: ""
      observedGeneration: 1
      reason: NotPaused
      status: "False"
      type: Paused
    ready: true
kind: List
metadata:
  resourceVersion: ""
  
  
karthikkn@Karthiks-MacBook-Pro cluster-api-provider-ibmcloud % kubectl get ibmpowervsmachines ibm-powervs-1-control-plane-29bnm -o yaml
apiVersion: infrastructure.cluster.x-k8s.io/v1beta3
kind: IBMPowerVSMachine
metadata:
  creationTimestamp: "2026-02-13T04:49:17Z"
  finalizers:
  - ibmpowervsmachine.infrastructure.cluster.x-k8s.io
  generation: 2
  labels:
    cluster.x-k8s.io/cluster-name: ibm-powervs-1
    cluster.x-k8s.io/control-plane: ""
    cluster.x-k8s.io/control-plane-name: ibm-powervs-1-control-plane
  name: ibm-powervs-1-control-plane-29bnm
  namespace: default
  ownerReferences:
  - apiVersion: cluster.x-k8s.io/v1beta2
    blockOwnerDeletion: true
    controller: true
    kind: Machine
    name: ibm-powervs-1-control-plane-29bnm
    uid: a74bf041-fd19-4e68-a5ac-272ace52e149
  resourceVersion: "5556"
  uid: e1dd4130-12c4-4378-bff6-9887f99163c8
spec:
  image:
    name: capibm-powervs-centos-streams9-1-33-0
  memoryGiB: 4
  network:
    name: karthik-capi-test
  processorType: Shared
  processors: "0.25"
  providerID: ibmpowervs://osa/osa21/10b1000b-da8d-4e18-ad1f-6b2a56a8c130/4e312ad3-f6a8-41fd-a58f-2ec39548be96
  serviceInstanceID: 10b1000b-da8d-4e18-ad1f-6b2a56a8c130
  sshKey: karthik-ssh
  systemType: s922
status:
  addresses:
  - address: ibm-powervs-1-control-plane-29bnm
    type: InternalDNS
  - address: ibm-powervs-1-control-plane-29bnm
    type: Hostname
  - address: 192.168.169.244
    type: InternalIP
  - address: 163.68.77.244
    type: ExternalIP
  conditions:
  - lastTransitionTime: "2026-02-13T04:52:21Z"
    message: ""
    observedGeneration: 2
    reason: Ready
    status: "True"
    type: Ready
  - lastTransitionTime: "2026-02-13T04:52:21Z"
    message: ""
    observedGeneration: 2
    reason: InstanceReady
    status: "True"
    type: InstanceReady
  - lastTransitionTime: "2026-02-13T04:49:35Z"
    message: ""
    observedGeneration: 1
    reason: NotPaused
    status: "False"
    type: Paused
  deprecated:
    v1beta2:
      conditions:
      - lastTransitionTime: "2026-02-13T04:52:21Z"
        status: "True"
        type: Ready
      - lastTransitionTime: "2026-02-13T04:52:21Z"
        status: "True"
        type: InstanceReady
  health: OK
  instanceID: 4e312ad3-f6a8-41fd-a58f-2ec39548be96
  instanceState: ACTIVE
  ready: true

@Karthik-K-N
Copy link
Contributor Author

Suspecting a bug upstream and created a PR kubernetes-sigs/cluster-api#13336, Lets wait to hear back from the maintainer, This PR is blocked till then

@Karthik-K-N
Copy link
Contributor Author

With Infra creation flow

karthikkn@Karthiks-MacBook-Pro cluster-api-provider-ibmcloud % kubectl get ibmpowervscluster
NAME                     CLUSTER                  AGE
karthikkn-capi-powervs   karthikkn-capi-powervs   49m

karthikkn@Karthiks-MacBook-Pro cluster-api-provider-ibmcloud % kubectl get ibmpowervsmachines
NAME                                         CLUSTER                  AGE   READY   STATE    HEALTH
karthikkn-capi-powervs-control-plane-xrphk   karthikkn-capi-powervs   37m   true    ACTIVE   OK
karthikkn-capi-powervs-md-0-d2hjn-5zzwk      karthikkn-capi-powervs   37m   false

karthikkn@Karthiks-MacBook-Pro cluster-api-provider-ibmcloud % kubectl get ibmpowervscluster -o yaml
apiVersion: v1
items:
- apiVersion: infrastructure.cluster.x-k8s.io/v1beta3
  kind: IBMPowerVSCluster
  metadata:
    annotations:
      powervs.cluster.x-k8s.io/create-infra: "true"
    creationTimestamp: "2026-02-13T06:55:08Z"
    finalizers:
    - ibmpowervscluster.infrastructure.cluster.x-k8s.io
    generation: 2
    labels:
      cluster.x-k8s.io/cluster-name: karthikkn-capi-powervs
    name: karthikkn-capi-powervs
    namespace: default
    ownerReferences:
    - apiVersion: cluster.x-k8s.io/v1beta2
      blockOwnerDeletion: true
      controller: true
      kind: Cluster
      name: karthikkn-capi-powervs
      uid: c524c006-4d59-4b62-b5cc-6f115d57fa4f
    resourceVersion: "3991"
    uid: 42fe8dd4-0241-4eb4-8f46-27cf3a79b157
  spec:
    controlPlaneEndpoint:
      host: ae56a443-jp-osa.lb.appdomain.cloud
      port: 6443
    loadBalancers:
    - name: karthikkn-capi-powervs-loadbalancer
      public: true
    network: {}
    resourceGroup:
      name: ibm-hypershift-dev
    serviceInstance:
      name: karthikkn-capi-powervs-serviceInstance
    serviceInstanceID: ""
    transitGateway:
      name: karthikkn-capi-powervs-transitgateway
    vpc:
      name: karthikkn-capi-powervs-vpc
      region: jp-osa
    vpcSubnets:
    - name: karthikkn-capi-powervs-vpcsubnet
    zone: osa21
  status:
    conditions:
    - lastTransitionTime: "2026-02-13T07:07:03Z"
      message: ""
      observedGeneration: 2
      reason: Ready
      status: "True"
      type: Ready
    - lastTransitionTime: "2026-02-13T06:59:40Z"
      message: ""
      observedGeneration: 2
      reason: Ready
      status: "True"
      type: LoadBalancerReady
    - lastTransitionTime: "2026-02-13T07:07:01Z"
      message: ""
      observedGeneration: 2
      reason: Ready
      status: "True"
      type: NetworkReady
    - lastTransitionTime: "2026-02-13T06:59:51Z"
      message: ""
      observedGeneration: 2
      reason: Ready
      status: "True"
      type: TransitGatewayReady
    - lastTransitionTime: "2026-02-13T06:55:23Z"
      message: ""
      observedGeneration: 2
      reason: Ready
      status: "True"
      type: VPCReady
    - lastTransitionTime: "2026-02-13T06:55:30Z"
      message: ""
      observedGeneration: 2
      reason: VPCSecurityGroupReady
      status: "True"
      type: VPCSecurityGroupReady
    - lastTransitionTime: "2026-02-13T06:55:30Z"
      message: ""
      observedGeneration: 2
      reason: Ready
      status: "True"
      type: VPCSubnetReady
    - lastTransitionTime: "2026-02-13T06:56:25Z"
      message: ""
      observedGeneration: 2
      reason: Ready
      status: "True"
      type: WorkspaceReady
    - lastTransitionTime: "2026-02-13T06:55:08Z"
      message: ""
      observedGeneration: 1
      reason: NotPaused
      status: "False"
      type: Paused
    deprecated:
      v1beta2:
        conditions:
        - lastTransitionTime: "2026-02-13T06:59:40Z"
          status: "True"
          type: LoadBalancerReady
        - lastTransitionTime: "2026-02-13T07:07:01Z"
          status: "True"
          type: NetworkReady
        - lastTransitionTime: "2026-02-13T06:56:25Z"
          status: "True"
          type: ServiceInstanceReady
        - lastTransitionTime: "2026-02-13T06:59:51Z"
          status: "True"
          type: TransitGatewayReady
        - lastTransitionTime: "2026-02-13T06:55:23Z"
          status: "True"
          type: VPCReady
        - lastTransitionTime: "2026-02-13T06:55:30Z"
          status: "True"
          type: VPCSecurityGroupReady
        - lastTransitionTime: "2026-02-13T06:55:30Z"
          status: "True"
          type: VPCSubnetReady
    dhcpServer:
      controllerCreated: true
      id: 77d391a3-e29f-498d-bf76-ac020279cca5
    loadBalancers:
      karthikkn-capi-powervs-loadbalancer:
        controllerCreated: true
        hostname: ae56a443-jp-osa.lb.appdomain.cloud
        id: r034-ae56a443-5c5d-40f6-b231-50df684c5819
        state: active
    network:
      controllerCreated: true
      id: 6857763f-97f7-45c6-8116-363ab324fc36
    ready: true
    resourceGroupID:
      controllerCreated: false
      id: 08fe0ad0ec9b45aab2cb6d7a4d6817ba
    serviceInstance:
      controllerCreated: true
      id: 158f071d-c77f-4b42-833c-d7e03338a3c0
    transitGateway:
      controllerCreated: true
      id: e302467c-f854-4a8b-af43-c8a56c7a88e5
      powerVSConnection:
        controllerCreated: true
        id: ed4a49b2-e431-43d7-a980-7fa7ca419615
      vpcConnection:
        controllerCreated: true
        id: 524e1a8f-4d4d-41c7-8bf7-5d6c370414a4
    vpc:
      controllerCreated: true
      id: r034-fe4ba183-380b-417a-aae4-2d0efd1c6765
    vpcSubnet:
      karthikkn-capi-powervs-vpcsubnet:
        controllerCreated: true
        id: 02n7-a5f4ac98-9969-4bf9-afb2-551c3dbf86a0
kind: List
metadata:
  resourceVersion: ""
  
  karthikkn@Karthiks-MacBook-Pro cluster-api-provider-ibmcloud % kubectl get ibmpowervsmachine karthikkn-capi-powervs-control-plane-xrphk -o yaml
apiVersion: infrastructure.cluster.x-k8s.io/v1beta3
kind: IBMPowerVSMachine
metadata:
  creationTimestamp: "2026-02-13T07:07:04Z"
  finalizers:
  - ibmpowervsmachine.infrastructure.cluster.x-k8s.io
  generation: 2
  labels:
    cluster.x-k8s.io/cluster-name: karthikkn-capi-powervs
    cluster.x-k8s.io/control-plane: ""
    cluster.x-k8s.io/control-plane-name: karthikkn-capi-powervs-control-plane
  name: karthikkn-capi-powervs-control-plane-xrphk
  namespace: default
  ownerReferences:
  - apiVersion: cluster.x-k8s.io/v1beta2
    blockOwnerDeletion: true
    controller: true
    kind: Machine
    name: karthikkn-capi-powervs-control-plane-xrphk
    uid: e396d23f-02d7-4b63-944c-841dfc2ac631
  resourceVersion: "9604"
  uid: 9b836008-633b-4305-a981-5777d46c1d39
spec:
  imageRef:
    name: karthikkn-capi-powervs-image
  memoryGiB: 4
  network: {}
  processorType: Shared
  processors: "0.25"
  providerID: ibmpowervs://osa/osa21/158f071d-c77f-4b42-833c-d7e03338a3c0/dc7a46af-6b1f-4003-8ad9-d37c755b4556
  serviceInstance:
    name: karthikkn-capi-powervs-serviceInstance
  serviceInstanceID: ""
  sshKey: karthik-ssh
  systemType: s922
status:
  addresses:
  - address: karthikkn-capi-powervs-control-plane-xrphk
    type: InternalDNS
  - address: karthikkn-capi-powervs-control-plane-xrphk
    type: Hostname
  - address: 192.168.0.10
    type: InternalIP
  conditions:
  - lastTransitionTime: "2026-02-13T07:35:09Z"
    message: ""
    observedGeneration: 2
    reason: Ready
    status: "True"
    type: Ready
  - lastTransitionTime: "2026-02-13T07:35:09Z"
    message: ""
    observedGeneration: 2
    reason: InstanceReady
    status: "True"
    type: InstanceReady
  - lastTransitionTime: "2026-02-13T07:07:04Z"
    message: ""
    observedGeneration: 1
    reason: NotPaused
    status: "False"
    type: Paused
  deprecated:
    v1beta2:
      conditions:
      - lastTransitionTime: "2026-02-13T07:35:09Z"
        status: "True"
        type: Ready
      - lastTransitionTime: "2026-02-13T07:35:09Z"
        status: "True"
        type: InstanceReady
  health: OK
  instanceID: dc7a46af-6b1f-4003-8ad9-d37c755b4556
  instanceState: ACTIVE
  ready: true

@Karthik-K-N Karthik-K-N force-pushed the promote-v1beta3-condition branch from 2e86ad0 to 5846f09 Compare February 13, 2026 11:48
@Karthik-K-N Karthik-K-N force-pushed the promote-v1beta3-condition branch from 5846f09 to 96e2dc9 Compare February 13, 2026 15:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/provider/ibmcloud Issues or PRs related to ibmcloud provider cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants