Skip to content

Commit 813aaa7

Browse files
committed
enable vm level firewall by default
1 parent 0e775b5 commit 813aaa7

File tree

4 files changed

+9
-2
lines changed

4 files changed

+9
-2
lines changed

api/v1beta1/proxmoxmachine_types.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ type ProxmoxMachineSpec struct {
5353
CloudInit CloudInit `json:"cloudInit,omitempty"`
5454

5555
// Hardware
56-
// +kubebuilder:default:={cpu:2,disk:"50G",memory:4096,networkDevice:{model:virtio,bridge:vmbr0}}
56+
// +kubebuilder:default:={cpu:2,disk:"50G",memory:4096,networkDevice:{model:virtio,bridge:vmbr0,firewall:true}}
5757
Hardware Hardware `json:"hardware"`
5858

5959
// Network

api/v1beta1/type.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ type Hardware struct {
9898

9999
// network devices
100100
// to do: multiple devices
101-
// +kubebuilder:default:={model:virtio,bridge:vmbr0}
101+
// +kubebuilder:default:={model:virtio,bridge:vmbr0,firewall:true}
102102
NetworkDevice NetworkDevice `json:"networkDevice"`
103103
}
104104

@@ -110,6 +110,7 @@ type NetworkDevice struct {
110110
// +kubebuilder:default:="vmbr0"
111111
Bridge NetworkDeviceBridge `json:"bridge"`
112112

113+
// +kubebuilder:default:=true
113114
Firewall bool `json:"firewall,omitempty"`
114115

115116
LinkDown bool `json:"linkDown,omitempty"`

config/crd/bases/infrastructure.cluster.x-k8s.io_proxmoxmachines.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -225,6 +225,7 @@ spec:
225225
memory: 4096
226226
networkDevice:
227227
bridge: vmbr0
228+
firewall: true
228229
model: virtio
229230
description: Hardware
230231
properties:
@@ -258,6 +259,7 @@ spec:
258259
networkDevice:
259260
default:
260261
bridge: vmbr0
262+
firewall: true
261263
model: virtio
262264
description: 'network devices to do: multiple devices'
263265
properties:
@@ -266,6 +268,7 @@ spec:
266268
pattern: vmbr[0-9]{1,4}
267269
type: string
268270
firewall:
271+
default: true
269272
type: boolean
270273
linkDown:
271274
type: boolean

config/crd/bases/infrastructure.cluster.x-k8s.io_proxmoxmachinetemplates.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -242,6 +242,7 @@ spec:
242242
memory: 4096
243243
networkDevice:
244244
bridge: vmbr0
245+
firewall: true
245246
model: virtio
246247
description: Hardware
247248
properties:
@@ -275,6 +276,7 @@ spec:
275276
networkDevice:
276277
default:
277278
bridge: vmbr0
279+
firewall: true
278280
model: virtio
279281
description: 'network devices to do: multiple devices'
280282
properties:
@@ -283,6 +285,7 @@ spec:
283285
pattern: vmbr[0-9]{1,4}
284286
type: string
285287
firewall:
288+
default: true
286289
type: boolean
287290
linkDown:
288291
type: boolean

0 commit comments

Comments
 (0)