Skip to content

Commit

Permalink
add VNET to machine CR
Browse files Browse the repository at this point in the history
  • Loading branch information
lubedacht committed Aug 19, 2024
1 parent 5140fde commit af102a5
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 0 deletions.
4 changes: 4 additions & 0 deletions api/v1alpha1/ionoscloudmachine_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -183,6 +183,10 @@ type Network struct {
//+kubebuilder:validation:Minimum=1
NetworkID int32 `json:"networkID"`

// VNET is solely used for internal purposes and requires elevated permissions.
//+optional
VNET *string `json:"vnet,omitempty"`

// DHCP indicates whether DHCP is enabled for the LAN.
// The primary NIC will always have DHCP enabled.
//+kubebuilder:default=true
Expand Down
5 changes: 5 additions & 0 deletions api/v1alpha1/zz_generated.deepcopy.go

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

Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,10 @@ spec:
format: int32
minimum: 1
type: integer
vnet:
description: VNET is solely used for internal purposes and requires
elevated permissions.
type: string
required:
- networkID
type: object
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,10 @@ spec:
format: int32
minimum: 1
type: integer
vnet:
description: VNET is solely used for internal purposes
and requires elevated permissions.
type: string
required:
- networkID
type: object
Expand Down
1 change: 1 addition & 0 deletions internal/service/cloud/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -432,6 +432,7 @@ func (s *Service) buildServerEntities(ms *scope.Machine, params serverEntityPara
for _, nic := range ms.IonosMachine.Spec.AdditionalNetworks {
items = append(items, sdk.Nic{Properties: &sdk.NicProperties{
Lan: &nic.NetworkID,
Vnet: nic.VNET,
Dhcp: nic.DHCP,
}})
}
Expand Down

0 comments on commit af102a5

Please sign in to comment.