Skip to content
Open
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
3 changes: 1 addition & 2 deletions cloud/scope/machinepool.go
Original file line number Diff line number Diff line change
Expand Up @@ -342,8 +342,7 @@ func (m *MachinePoolScope) InstanceTemplateResource(ctx context.Context) (*compu
instance.Disks = append(instance.Disks, m.InstanceAdditionalDiskSpec()...)
instance.Metadata = InstanceAdditionalMetadataSpec(m.GCPMachinePool.Spec.AdditionalMetadata)
instance.ServiceAccounts = append(instance.ServiceAccounts, instanceServiceAccountsSpec(m.GCPMachinePool.Spec.ServiceAccount))
var aliasIPRanges []infrav1.AliasIPRange // Not supported by MachinePool
instance.NetworkInterfaces = append(instance.NetworkInterfaces, InstanceNetworkInterfaceSpec(m.ClusterGetter, m.GCPMachinePool.Spec.PublicIP, m.GCPMachinePool.Spec.Subnet, aliasIPRanges))
instance.NetworkInterfaces = append(instance.NetworkInterfaces, InstanceNetworkInterfaceSpec(m.ClusterGetter, m.GCPMachinePool.Spec.PublicIP, m.GCPMachinePool.Spec.Subnet, m.GCPMachinePool.Spec.AliasIPRanges))
instance.GuestAccelerators = instanceGuestAcceleratorsSpec(m.GCPMachinePool.Spec.GuestAccelerators)
if len(instance.GuestAccelerators) > 0 {
instance.Scheduling.OnHostMaintenance = onHostMaintenanceTerminate
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -181,6 +181,32 @@ spec:
items:
type: string
type: array
aliasIPRanges:
description: AliasIPRanges let you assign ranges of internal IP addresses
as aliases to a VM's network interfaces.
items:
description: AliasIPRange is an alias IP range attached to an instance's
network interface.
properties:
ipCidrRange:
description: |-
IPCidrRange is the IP alias ranges to allocate for this interface. This IP
CIDR range must belong to the specified subnetwork and cannot contain IP
addresses reserved by system or used by other network interfaces. This range
may be a single IP address (such as 10.2.3.4), a netmask (such as /24) or a
CIDR-formatted string (such as 10.1.2.0/24).
pattern: ^((([0-9]|[0-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[0-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])/([0-9]|[12][0-9]|3[0-2])|(([0-9]|[0-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[0-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])|(/([0-9]|[12][0-9]|3[0-2])))$
type: string
subnetworkRangeName:
description: |-
SubnetworkRangeName is the name of a subnetwork secondary IP range from which
to allocate an IP alias range. If not specified, the primary range of the
subnetwork is used.
type: string
required:
- ipCidrRange
type: object
type: array
confidentialCompute:
description: |-
ConfidentialCompute Defines whether the instance should have confidential compute enabled or not, and the confidential computing technology of choice.
Expand Down
5 changes: 5 additions & 0 deletions exp/api/v1beta1/gcpmachinepool_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,9 @@
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/apimachinery/pkg/runtime/schema"

capg "sigs.k8s.io/cluster-api-provider-gcp/api/v1beta1"

Check failure on line 23 in exp/api/v1beta1/gcpmachinepool_types.go

View workflow job for this annotation

GitHub Actions / lint

ST1019: package "sigs.k8s.io/cluster-api-provider-gcp/api/v1beta1" is being imported more than once (staticcheck)
"sigs.k8s.io/cluster-api/util/conditions"

Check failure on line 24 in exp/api/v1beta1/gcpmachinepool_types.go

View workflow job for this annotation

GitHub Actions / lint

File is not properly formatted (gofmt)
infrav1 "sigs.k8s.io/cluster-api-provider-gcp/api/v1beta1"
)

// Constants block.
Expand All @@ -45,6 +46,10 @@
// +optional
Subnet *string `json:"subnet,omitempty"`

// AliasIPRanges let you assign ranges of internal IP addresses as aliases to a VM's network interfaces.
// +optional
AliasIPRanges []infrav1.AliasIPRange `json:"aliasIPRanges,omitempty"`

// ImageFamily is the full reference to a valid image family to be used for this machine.
// +optional
ImageFamily *string `json:"imageFamily,omitempty"`
Expand Down
5 changes: 5 additions & 0 deletions exp/api/v1beta1/zz_generated.deepcopy.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading