Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 16 additions & 0 deletions api/v1beta1/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -240,6 +240,22 @@ type SubnetSpec struct {
// +kubebuilder:default=PRIVATE_RFC_1918
// +optional
Purpose *string `json:"purpose,omitempty"`

// StackType: The stack type for the subnet. If set to IPV4_ONLY, new VMs in
// the subnet are assigned IPv4 addresses only. If set to IPV4_IPV6, new VMs in
// the subnet can be assigned both IPv4 and IPv6 addresses. If not specified,
// IPV4_ONLY is used. This field can be both set at resource creation time and
// updated using patch.
//
// Possible values:
// "IPV4_IPV6" - New VMs in this subnet can have both IPv4 and IPv6
// addresses.
// "IPV4_ONLY" - New VMs in this subnet will only be assigned IPv4 addresses.
// "IPV6_ONLY" - New VMs in this subnet will only be assigned IPv6 addresses.
// +kubebuilder:validation:Enum=IPV4_ONLY;IPV4_IPV6;IPV6_ONLY
// +kubebuilder:default=IPV4_ONLY
// +optional
StackType string `json:"stackType,omitempty"`
}

// String returns a string representation of the subnet.
Expand Down
1 change: 1 addition & 0 deletions cloud/scope/cluster.go
Original file line number Diff line number Diff line change
Expand Up @@ -263,6 +263,7 @@ func (s *ClusterScope) SubnetSpecs() []*compute.Subnetwork {
Network: s.NetworkLink(),
Purpose: ptr.Deref(subnetwork.Purpose, "PRIVATE_RFC_1918"),
Role: "ACTIVE",
StackType: subnetwork.StackType,
})
}

Expand Down
1 change: 1 addition & 0 deletions cloud/scope/managedcluster.go
Original file line number Diff line number Diff line change
Expand Up @@ -247,6 +247,7 @@ func (s *ManagedClusterScope) SubnetSpecs() []*compute.Subnetwork {
Network: s.NetworkLink(),
Purpose: ptr.Deref(subnetwork.Purpose, "PRIVATE_RFC_1918"),
Role: "ACTIVE",
StackType: subnetwork.StackType,
})
}

Expand Down
19 changes: 19 additions & 0 deletions config/crd/bases/infrastructure.cluster.x-k8s.io_gcpclusters.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -248,6 +248,25 @@ spec:
SecondaryCidrBlocks defines secondary CIDR ranges,
from which secondary IP ranges of a VM may be allocated
type: object
stackType:
default: IPV4_ONLY
description: |-
StackType: The stack type for the subnet. If set to IPV4_ONLY, new VMs in
the subnet are assigned IPv4 addresses only. If set to IPV4_IPV6, new VMs in
the subnet can be assigned both IPv4 and IPv6 addresses. If not specified,
IPV4_ONLY is used. This field can be both set at resource creation time and
updated using patch.

Possible values:
"IPV4_IPV6" - New VMs in this subnet can have both IPv4 and IPv6
addresses.
"IPV4_ONLY" - New VMs in this subnet will only be assigned IPv4 addresses.
"IPV6_ONLY" - New VMs in this subnet will only be assigned IPv6 addresses.
enum:
- IPV4_ONLY
- IPV4_IPV6
- IPV6_ONLY
type: string
type: object
type: array
type: object
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -265,6 +265,25 @@ spec:
SecondaryCidrBlocks defines secondary CIDR ranges,
from which secondary IP ranges of a VM may be allocated
type: object
stackType:
default: IPV4_ONLY
description: |-
StackType: The stack type for the subnet. If set to IPV4_ONLY, new VMs in
the subnet are assigned IPv4 addresses only. If set to IPV4_IPV6, new VMs in
the subnet can be assigned both IPv4 and IPv6 addresses. If not specified,
IPV4_ONLY is used. This field can be both set at resource creation time and
updated using patch.

Possible values:
"IPV4_IPV6" - New VMs in this subnet can have both IPv4 and IPv6
addresses.
"IPV4_ONLY" - New VMs in this subnet will only be assigned IPv4 addresses.
"IPV6_ONLY" - New VMs in this subnet will only be assigned IPv6 addresses.
enum:
- IPV4_ONLY
- IPV4_IPV6
- IPV6_ONLY
type: string
type: object
type: array
type: object
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -244,6 +244,25 @@ spec:
SecondaryCidrBlocks defines secondary CIDR ranges,
from which secondary IP ranges of a VM may be allocated
type: object
stackType:
default: IPV4_ONLY
description: |-
StackType: The stack type for the subnet. If set to IPV4_ONLY, new VMs in
the subnet are assigned IPv4 addresses only. If set to IPV4_IPV6, new VMs in
the subnet can be assigned both IPv4 and IPv6 addresses. If not specified,
IPV4_ONLY is used. This field can be both set at resource creation time and
updated using patch.

Possible values:
"IPV4_IPV6" - New VMs in this subnet can have both IPv4 and IPv6
addresses.
"IPV4_ONLY" - New VMs in this subnet will only be assigned IPv4 addresses.
"IPV6_ONLY" - New VMs in this subnet will only be assigned IPv6 addresses.
enum:
- IPV4_ONLY
- IPV4_IPV6
- IPV6_ONLY
type: string
type: object
type: array
type: object
Expand Down
Loading