Skip to content
This repository was archived by the owner on Aug 12, 2025. It is now read-only.

Commit 89644f4

Browse files
committed
fix: use omitempty on billingcycle
Signed-off-by: Chris Privitere <[email protected]>
1 parent 42bf1e7 commit 89644f4

File tree

4 files changed

+2
-6
lines changed

4 files changed

+2
-6
lines changed

api/v1alpha3/packetmachine_types.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ const (
3232
// PacketMachineSpec defines the desired state of PacketMachine.
3333
type PacketMachineSpec struct {
3434
OS string `json:"OS"` //nolint: tagliatelle
35-
BillingCycle metal.DeviceCreateInputBillingCycle `json:"billingCycle"`
35+
BillingCycle metal.DeviceCreateInputBillingCycle `json:"billingCycle,omitempty"`
3636
MachineType string `json:"machineType"`
3737
SshKeys []string `json:"sshKeys,omitempty"`
3838

api/v1beta1/packetmachine_types.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ const (
5555
// PacketMachineSpec defines the desired state of PacketMachine.
5656
type PacketMachineSpec struct {
5757
OS string `json:"os"`
58-
BillingCycle metal.DeviceCreateInputBillingCycle `json:"billingCycle"`
58+
BillingCycle metal.DeviceCreateInputBillingCycle `json:"billingCycle,omitempty"`
5959
MachineType string `json:"machineType"`
6060
SSHKeys []string `json:"sshKeys,omitempty"`
6161

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

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,6 @@ spec:
101101
type: array
102102
required:
103103
- OS
104-
- billingCycle
105104
- machineType
106105
type: object
107106
status:
@@ -239,7 +238,6 @@ spec:
239238
type: string
240239
type: array
241240
required:
242-
- billingCycle
243241
- machineType
244242
- os
245243
type: object

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

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,6 @@ spec:
9090
type: array
9191
required:
9292
- OS
93-
- billingCycle
9493
- machineType
9594
type: object
9695
required:
@@ -173,7 +172,6 @@ spec:
173172
type: string
174173
type: array
175174
required:
176-
- billingCycle
177175
- machineType
178176
- os
179177
type: object

0 commit comments

Comments
 (0)