Skip to content

Conversation

@komer3
Copy link
Contributor

@komer3 komer3 commented Dec 1, 2025

  • Add FrontendAddressType and FrontendVPCSubnetID fields to NodeBalancer struct
  • Add FrontendVPCs field to NodeBalancerCreateOptions struct
  • Add clarifying comment to IPv4RangeAutoAssign field in NodeBalancerVPCOptions

📝 Description

What does this PR do and why is this change necessary?

✔️ How to Test

What are the steps to reproduce the issue or verify the changes?

How do I run the relevant unit/integration tests?

📷 Preview

If applicable, include a screenshot or code snippet of this change. Otherwise, please remove this section.

- Add `FrontendAddressType` and `FrontendVPCSubnetID` fields to `NodeBalancer` struct
- Add `FrontendVPCs` field to `NodeBalancerCreateOptions` struct
- Add clarifying comment to `IPv4RangeAutoAssign` field in `NodeBalancerVPCOptions`
@komer3 komer3 marked this pull request as ready for review December 15, 2025 20:56
@komer3 komer3 requested a review from a team as a code owner December 15, 2025 20:56
@komer3 komer3 requested review from Copilot, yec-akamai and zliang-akamai and removed request for a team December 15, 2025 20:56
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR adds support for frontend VPC configuration to NodeBalancers, enabling VPC-based frontend addressing alongside the existing backend VPC support. The changes introduce new fields to track frontend VPC subnet information and allow frontend VPC specification during NodeBalancer creation.

Key changes:

  • Added FrontendAddressType and FrontendVPCSubnetID fields to track frontend VPC configuration
  • Added FrontendVPCs option to enable frontend VPC specification during creation
  • Clarified that IPv4RangeAutoAssign applies only to backend VPC configuration

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@yec-akamai yec-akamai changed the base branch from main to proj/frontend-vpcs January 9, 2026 19:38
Comment on lines 26 to 28
FrontendAddressType *string `json:"frontend_address_type,omitempty"`
// Frontend VPC subnet ID when using VPC addressing
FrontendVPCSubnetID *int `json:"frontend_vpc_subnet_id,omitempty"`
Copy link
Member

Choose a reason for hiding this comment

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

If they are not nullable, can we have them as non-pointer types?

SubnetID int `json:"subnet_id"`
// IPv4RangeAutoAssign is only used for backend VPC configuration.
// For frontend VPCs, this field is ignored.
IPv4RangeAutoAssign bool `json:"ipv4_range_auto_assign,omitempty"`
Copy link
Member

Choose a reason for hiding this comment

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

Couldn't find this attribute in the API spec doc. Is the doc outdated?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

That field was part of backend VPC support for NB!

nodebalancer.go Outdated
Comment on lines 59 to 60
IPv4Range string `json:"ipv4_range,omitempty"`
IPv6Range string `json:"ipv6_range,omitempty"`
Copy link
Member

Choose a reason for hiding this comment

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

If these fields are optional, can we have them as pointer types?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yeah, makes sense to me!

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Updated!

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 2 out of 2 changed files in this pull request and generated 3 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

IPv4 *string `json:"ipv4"`
// This NodeBalancer's public IPv6 address.
IPv6 *string `json:"ipv6"`
// Frontend address type (Either "vpc" or "public")
Copy link

Copilot AI Jan 20, 2026

Choose a reason for hiding this comment

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

Comment should start with the field name for consistency with Go documentation conventions. Should be: 'FrontendAddressType is the frontend address type (either "vpc" or "public")'.

Suggested change
// Frontend address type (Either "vpc" or "public")
// FrontendAddressType is the frontend address type (either "vpc" or "public").

Copilot uses AI. Check for mistakes.
IPv6 *string `json:"ipv6"`
// Frontend address type (Either "vpc" or "public")
FrontendAddressType *string `json:"frontend_address_type,omitempty"`
// Frontend VPC subnet ID when using VPC addressing
Copy link

Copilot AI Jan 20, 2026

Choose a reason for hiding this comment

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

Comment should start with the field name for consistency with Go documentation conventions. Should be: 'FrontendVPCSubnetID is the VPC subnet ID when using VPC addressing for the frontend'.

Suggested change
// Frontend VPC subnet ID when using VPC addressing
// FrontendVPCSubnetID is the VPC subnet ID when using VPC addressing for the frontend

Copilot uses AI. Check for mistakes.
Comment on lines +59 to +61
IPv4Range *string `json:"ipv4_range,omitempty"`
IPv6Range *string `json:"ipv6_range,omitempty"`
SubnetID int `json:"subnet_id"`
Copy link

Copilot AI Jan 20, 2026

Choose a reason for hiding this comment

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

Changing IPv4Range and IPv6Range from string to *string is a breaking API change that could affect existing users of this struct. Consider the impact on backwards compatibility.

Suggested change
IPv4Range *string `json:"ipv4_range,omitempty"`
IPv6Range *string `json:"ipv6_range,omitempty"`
SubnetID int `json:"subnet_id"`
IPv4Range string `json:"ipv4_range,omitempty"`
IPv6Range string `json:"ipv6_range,omitempty"`
SubnetID int `json:"subnet_id"`

Copilot uses AI. Check for mistakes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants