Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use user provided vpc subnetid #1728

Merged
merged 1 commit into from
Apr 16, 2024

Conversation

Karthik-K-N
Copy link
Contributor

What this PR does / why we need it:

Currently the loadbalancer reconcilation fails when the user provides the subnet id. This PR tries to fix it.

E0415 15:07:02.894010  185735 controller.go:329] "Reconciler error" err="error subnet required for load balancer creation" controller="ibmpowervscluster" controllerGroup="infrastructure.cluster.x-k8s.io" controllerKind="IBMPowerVSCluster" IBMPowerVSCluster="openshift-cluster-api-guests/rdr-mjturek-capi-mad-rvqk9" namespace="openshift-cluster-api-guests" name="rdr-mjturek-capi-mad-rvqk9" reconcileID="80ca122b-0b9b-4f95-bcc1-34c06faf686e"

IBMPowerVSCluster spec

apiVersion: infrastructure.cluster.x-k8s.io/v1beta2
kind: IBMPowerVSCluster
metadata:
  annotations:
    powervs.cluster.x-k8s.io/create-infra: "true"
  creationTimestamp: null
  name: rdr-mjturek-capi-mad-rvqk9
  namespace: openshift-cluster-api-guests
spec:
  controlPlaneEndpoint:
    host: ""
    port: 0
  cosInstance:
    bucketName: rdr-mjturek-capi-mad-rvqk9-bootstrap-ign
    bucketRegion: eu-de
    name: rdr-mjturek-capi-mad-rvqk9-cos
  ignition:
    version: "3.4"
  loadBalancers:
  - additionalListeners:
    - port: 22
    name: rdr-mjturek-capi-mad-rvqk9-loadbalancer
    public: true
  - additionalListeners:
    - port: 22623
    name: rdr-mjturek-capi-mad-rvqk9-loadbalancer-int
    public: false
  network:
    name: rdr-mjturek-capi-mad-rvqk9-network
  resourceGroup:
    name: powervs-ipi-resource-group
  serviceInstance:
    id: ac4ee92b-4603-41ac-ba79-385398ccabc9
  serviceInstanceID: ""
  transitGateway:
    name: rdr-mjturek-capi-mad-rvqk9-tg
  vpc:
    name: rdr-ipi-mjturek-test
    region: eu-es
  vpcSubnets:
  - id: 02w7-14050071-a51a-44ef-842a-54bb67aae227
  - id: 02x7-569c2a3a-8111-4a0f-964e-3b201bb6394b
  - id: 02y7-26f95684-7d4f-427b-84e8-8c4bf229a60f
  zone: mad02
status:
  ready: false

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 #

Special notes for your reviewer:

/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:


@k8s-ci-robot k8s-ci-robot added area/provider/ibmcloud Issues or PRs related to ibmcloud provider cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. labels Apr 16, 2024
@k8s-ci-robot k8s-ci-robot added the size/S Denotes a PR that changes 10-29 lines, ignoring generated files. label Apr 16, 2024
Copy link

netlify bot commented Apr 16, 2024

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

Name Link
🔨 Latest commit 1ca38b0
🔍 Latest deploy log https://app.netlify.com/sites/kubernetes-sigs-cluster-api-ibmcloud/deploys/661e2f5e1d1d5c0008303e2a
😎 Deploy Preview https://deploy-preview-1728--kubernetes-sigs-cluster-api-ibmcloud.netlify.app
📱 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 site configuration.

@Karthik-K-N Karthik-K-N changed the title User user provided vpc subnetid Use user provided vpc subnetid Apr 16, 2024
Copy link
Contributor

@Amulyam24 Amulyam24 left a comment

Choose a reason for hiding this comment

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

/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Apr 16, 2024
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: Amulyam24, Karthik-K-N, Prajyot-Parab

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

The pull request process is described here

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

@k8s-ci-robot k8s-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Apr 16, 2024
@miyamotoh
Copy link

Just to put it out there, the documantation calls for "names" to be specified in install-config.yaml (probably deemed more user friendly), while this CAPI provider expects the "IDs" in the Spec section. Thus, the OpenShift installer needs to translate the names into IDs, unless we decide to change the doc...

@k8s-ci-robot k8s-ci-robot merged commit f33fc88 into kubernetes-sigs:main Apr 16, 2024
13 checks passed
@Karthik-K-N
Copy link
Contributor Author

Just to put it out there, the documantation calls for "names" to be specified in install-config.yaml (probably deemed more user friendly), while this CAPI provider expects the "IDs" in the Spec section. Thus, the OpenShift installer needs to translate the names into IDs, unless we decide to change the doc...

We already support specifying vpcsubnet with name:

Name *string `json:"name,omitempty"`

For example it will look like following

  vpc:
      name: rdr-miyamotoh-ipi-vpc-wdc06
      region: us-east
    vpcSubnets:
    - name: sn-20240329-01
    zone: wdc06

Please let me know If I am missing something!

@Karthik-K-N Karthik-K-N deleted the use-subnetid branch April 17, 2024 06:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. area/provider/ibmcloud Issues or PRs related to ibmcloud provider cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. lgtm "Looks good to me", indicates that a PR is ready to be merged. size/S Denotes a PR that changes 10-29 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants