Skip to content

Commit 3349ab8

Browse files
committed
wip: add Image to proxmoxmachine
1 parent 7831d06 commit 3349ab8

File tree

6 files changed

+67
-12
lines changed

6 files changed

+67
-12
lines changed

api/v1beta1/proxmoxmachine_types.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ type ProxmoxMachineSpec struct {
3939
ProviderID *string `json:"providerID,omitempty"`
4040

4141
// Image is the image to be provisioned
42-
// Image Image `json:"image"`
42+
Image Image `json:"image"`
4343

4444
// CloudInit defines options related to the bootstrapping systems where
4545
// CloudInit is used.

api/v1beta1/type.go

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -19,16 +19,16 @@ type ObjectReference struct {
1919
}
2020

2121
// Image is the image to be provisioned
22-
// type Image struct {
23-
// // URL is a location of an image to deploy.
24-
// URL string `json:"url"`
22+
type Image struct {
23+
// URL is a location of an image to deploy.
24+
URL string `json:"url"`
2525

26-
// // Checksum
27-
// Checksum string `json:"checksum,omitempty"`
26+
// Checksum
27+
Checksum string `json:"checksum,omitempty"`
2828

29-
// // ChecksumType
30-
// ChecksumType *string `json:"checksumType,omitempty"`
31-
// }
29+
// ChecksumType
30+
ChecksumType *string `json:"checksumType,omitempty"`
31+
}
3232

3333
// Hardware
3434
type Hardware struct {

api/v1beta1/zz_generated.deepcopy.go

Lines changed: 21 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

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

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,21 @@ spec:
7777
minimum: 16
7878
type: integer
7979
type: object
80+
image:
81+
description: Image is the image to be provisioned
82+
properties:
83+
checksum:
84+
description: Checksum
85+
type: string
86+
checksumType:
87+
description: ChecksumType
88+
type: string
89+
url:
90+
description: URL is a location of an image to deploy.
91+
type: string
92+
required:
93+
- url
94+
type: object
8095
network:
8196
description: Network
8297
properties:
@@ -100,6 +115,8 @@ spec:
100115
providerID:
101116
description: ProviderID
102117
type: string
118+
required:
119+
- image
103120
type: object
104121
status:
105122
description: ProxmoxMachineStatus defines the observed state of ProxmoxMachine

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

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -115,6 +115,21 @@ spec:
115115
minimum: 16
116116
type: integer
117117
type: object
118+
image:
119+
description: Image is the image to be provisioned
120+
properties:
121+
checksum:
122+
description: Checksum
123+
type: string
124+
checksumType:
125+
description: ChecksumType
126+
type: string
127+
url:
128+
description: URL is a location of an image to deploy.
129+
type: string
130+
required:
131+
- url
132+
type: object
118133
network:
119134
description: Network
120135
properties:
@@ -138,6 +153,8 @@ spec:
138153
providerID:
139154
description: ProviderID
140155
type: string
156+
required:
157+
- image
141158
type: object
142159
required:
143160
- spec

config/samples/controlplane.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -37,8 +37,8 @@ metadata:
3737
spec:
3838
template:
3939
spec:
40-
# image:
41-
# url: "dummy"
40+
image:
41+
url: https://cloud-images.ubuntu.com/jammy/current/jammy-server-cloudimg-amd64-disk-kvm.img
4242
cloudInit:
4343
user:
4444
user: ubnt
@@ -47,5 +47,5 @@ spec:
4747
ipConfig:
4848
gateway: 192.168.1.1
4949
ip: 192.168.1.222/32
50-
nameServer: "192.168.1.1"
50+
nameServer: 192.168.1.1
5151

0 commit comments

Comments
 (0)