Skip to content

Commit 2b4fabe

Browse files
Merge branch 'main' into dependabot/go_modules/github.com/google/go-cmp-0.7.0
2 parents b038a6c + 023554c commit 2b4fabe

9 files changed

+1990
-9
lines changed

lke_clusters_control_plane.go

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@ type LKEClusterControlPlaneACLAddresses struct {
1616

1717
// LKEClusterControlPlaneACL describes the ACL configuration
1818
// for an LKE cluster's control plane.
19-
// NOTE: Control Plane ACLs may not currently be available to all users.
2019
type LKEClusterControlPlaneACL struct {
2120
Enabled bool `json:"enabled"`
2221
Addresses *LKEClusterControlPlaneACLAddresses `json:"addresses"`
@@ -32,7 +31,6 @@ type LKEClusterControlPlaneACLAddressesOptions struct {
3231

3332
// LKEClusterControlPlaneACLOptions represents the options used when
3433
// configuring an LKE cluster's control plane ACL policy.
35-
// NOTE: Control Plane ACLs may not currently be available to all users.
3634
type LKEClusterControlPlaneACLOptions struct {
3735
Enabled *bool `json:"enabled,omitempty"`
3836
Addresses *LKEClusterControlPlaneACLAddressesOptions `json:"addresses,omitempty"`
@@ -49,7 +47,6 @@ type LKEClusterControlPlaneOptions struct {
4947
// LKEClusterControlPlaneACLUpdateOptions represents the options
5048
// available when updating the ACL configuration of an LKE cluster's
5149
// control plane.
52-
// NOTE: Control Plane ACLs may not currently be available to all users.
5350
type LKEClusterControlPlaneACLUpdateOptions struct {
5451
ACL LKEClusterControlPlaneACLOptions `json:"acl"`
5552
}
@@ -62,7 +59,6 @@ type LKEClusterControlPlaneACLResponse struct {
6259

6360
// GetLKEClusterControlPlaneACL gets the ACL configuration for the
6461
// given cluster's control plane.
65-
// NOTE: Control Plane ACLs may not currently be available to all users.
6662
func (c *Client) GetLKEClusterControlPlaneACL(ctx context.Context, clusterID int) (*LKEClusterControlPlaneACLResponse, error) {
6763
return doGETRequest[LKEClusterControlPlaneACLResponse](
6864
ctx,
@@ -73,7 +69,6 @@ func (c *Client) GetLKEClusterControlPlaneACL(ctx context.Context, clusterID int
7369

7470
// UpdateLKEClusterControlPlaneACL updates the ACL configuration for the
7571
// given cluster's control plane.
76-
// NOTE: Control Plane ACLs may not currently be available to all users.
7772
func (c *Client) UpdateLKEClusterControlPlaneACL(
7873
ctx context.Context,
7974
clusterID int,

nodebalancer.go

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,12 @@ type NodeBalancerTransfer struct {
4444
In *float64 `json:"in"`
4545
}
4646

47+
type NodeBalancerVPCOptions struct {
48+
IPv4Range string `json:"ipv4_range"`
49+
IPv6Range string `json:"ipv6_range,omitempty"`
50+
SubnetID int `json:"subnet_id"`
51+
}
52+
4753
// NodeBalancerCreateOptions are the options permitted for CreateNodeBalancer
4854
type NodeBalancerCreateOptions struct {
4955
Label *string `json:"label,omitempty"`
@@ -52,6 +58,7 @@ type NodeBalancerCreateOptions struct {
5258
Configs []*NodeBalancerConfigCreateOptions `json:"configs,omitempty"`
5359
Tags []string `json:"tags"`
5460
FirewallID int `json:"firewall_id,omitempty"`
61+
VPCs []NodeBalancerVPCOptions `json:"vpcs,omitempty"`
5562
}
5663

5764
// NodeBalancerUpdateOptions are the options permitted for UpdateNodeBalancer

nodebalancer_config_nodes.go

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -35,10 +35,11 @@ var (
3535

3636
// NodeBalancerNodeCreateOptions fields are those accepted by CreateNodeBalancerNode
3737
type NodeBalancerNodeCreateOptions struct {
38-
Address string `json:"address"`
39-
Label string `json:"label"`
40-
Weight int `json:"weight,omitempty"`
41-
Mode NodeMode `json:"mode,omitempty"`
38+
Address string `json:"address"`
39+
Label string `json:"label"`
40+
Weight int `json:"weight,omitempty"`
41+
Mode NodeMode `json:"mode,omitempty"`
42+
SubnetID int `json:"subnet_id,omitempty"`
4243
}
4344

4445
// NodeBalancerNodeUpdateOptions fields are those accepted by UpdateNodeBalancerNode

nodebalancer_config_vpc.go

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
package linodego
2+
3+
import (
4+
"context"
5+
)
6+
7+
// NodeBalancerVPCConfig objects represent a VPC config for a NodeBalancer
8+
// s
9+
// NOTE: NodeBalancer VPC support may not currently be available to all users.
10+
type NodeBalancerVPCConfig struct {
11+
ID int `json:"id"`
12+
IPv4Range string `json:"ipv4_range"`
13+
IPv6Range string `json:"ipv6_range,omitempty"`
14+
NodeBalancerID int `json:"nodebalancer_id"`
15+
SubnetID int `json:"subnet_id"`
16+
VPCID int `json:"vpc_id"`
17+
}
18+
19+
// ListNodeBalancerVPCConfigs lists NodeBalancer VPC configs
20+
func (c *Client) ListNodeBalancerVPCConfigs(ctx context.Context, nodebalancerID int, opts *ListOptions) ([]NodeBalancerVPCConfig, error) {
21+
return getPaginatedResults[NodeBalancerVPCConfig](ctx, c, formatAPIPath("nodebalancers/%d/vpcs", nodebalancerID), opts)
22+
}
23+
24+
// GetNodeBalancerVPCConfig gets the NodeBalancer VPC config with the specified id
25+
func (c *Client) GetNodeBalancerVPCConfig(ctx context.Context, nodebalancerID int, vpcID int) (*NodeBalancerVPCConfig, error) {
26+
e := formatAPIPath("nodebalancers/%d/vpcs/%d", nodebalancerID, vpcID)
27+
return doGETRequest[NodeBalancerVPCConfig](ctx, c, e)
28+
}

0 commit comments

Comments
 (0)