feat(ibmcloud): remove public gateway from VPC network module — use FIP-only for outbound

Đang mở
#936 4 bình luận 0 reaction 1 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 4 ngày

@adrianriobo đang làm issue này rồi.

Từ ngày 16/10/2026.

Đánh giá

Issue này chưa được đánh giá.

Mô tả

provider/IBMCLOUD wontfix

Background

Every IBM Cloud VPC target that uses network.New() (kind, snc, ibm-z, ibm-gaudi) provisions two outbound internet paths:

  1. Public Gateway — subnet-level; all instances in the subnet can reach the internet immediately from first boot.
  2. Floating IP — instance-level 1:1 NAT; provides both inbound SSH/API access and outbound internet once attached.

The floating IP alone is sufficient for outbound connectivity. Once it is associated with an instance's NIC, the instance uses the FIP's public address for all outbound traffic — no gateway needed.

Why the gateway exists today

The Pulumi resource graph attaches the floating IP after the instance is created (it needs the NIC ID):

network.New() → FIP reserved (not yet attached)
↓
NewIsInstance() → VM boots, cloud-init starts
↓
NewIsInstanceNetworkInterfaceFloatingIp() → FIP attached

There is a window between "instance running" and "FIP associated" during which cloud-init runs apt-get update and downloads the kind binary and node image. Without the public gateway that window has no outbound internet path and cloud-init fails.

The gateway is attached to the subnet before the instance exists, so it covers that window reliably.

Opportunity

The IBM Cloud VPC REST API accepts primary_network_interface.floating_ips[] during instance creation, allowing the FIP to be associated atomically — the instance would boot with the FIP already wired, eliminating the race window entirely.

If the Pulumi IBM Cloud provider exposed this field on IsInstancePrimaryNetworkInterfaceArgs, we could:

  • Pass the pre-created FIP ID at instance creation time
  • Drop the separate IsInstanceNetworkInterfaceFloatingIp resource
  • Remove the public gateway and its subnet attachment entirely

Current blocker

IsInstancePrimaryNetworkInterfaceArgs in pulumi-ibmcloud v0.0.16 does not include a FloatingIps field:

type IsInstancePrimaryNetworkInterfaceArgs struct {
    AllowIpSpoofing    pulumi.BoolPtrInput
    Name               pulumi.StringPtrInput
    PrimaryIp          IsInstancePrimaryNetworkInterfacePrimaryIpPtrInput
    SecurityGroups     pulumi.StringArrayInput
    Subnet             pulumi.StringInput
    // FloatingIps missing — IBM Cloud API supports this
}

Cost and simplification benefit

  • One fewer VPC resource per stack (public gateway + subnet attachment): reduces IBM Cloud VPC resource quota consumption and simplifies teardown.
  • Public gateways themselves are not charged hourly by IBM Cloud, but data egress through them is billed at the same rate as through a FIP. Net cost saving is minimal but quota consumption drops.
  • The main gain is architectural simplicity: a single outbound path (the FIP) instead of two overlapping ones.

Proposed path

  1. Open an issue or PR against mapt-oss/pulumi-ibmcloud to expose FloatingIps []string on IsInstancePrimaryNetworkInterfaceArgs.
  2. Once the SDK is updated, refactor network.New() to:
    • Accept the pre-created FIP ID
    • Pass it in PrimaryNetworkInterface.FloatingIps
    • Remove NewIsPublicGateway and NewIsSubnetPublicGatewayAttachment
    • Remove the separate NewIsInstanceNetworkInterfaceFloatingIp call from each action
Ngôn ngữ chính
Go
Star
25
Fork
41
Merge trung bình
5 ngày 3 giờ
Pull request đã merge (30 ngày)
16

Chuẩn bị môi trường

Dự án này không cung cấp dev container, Dockerfile hay hướng dẫn đóng góp, nên bạn cần tự thiết lập môi trường: hãy bắt đầu từ README và xem hướng dẫn đóng góp lần đầu của chúng tôi để biết các bước chung.

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của redhat-developer/mapt

Tất cả issue của redhat-developer/mapt

Issue tương tự

Thêm issue về Go

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.