Skip to content

Commit 70f10b3

Browse files
authored
Align pxebootconfig controller with gardenlinux OCI spec (#124)
1 parent 8e898e3 commit 70f10b3

File tree

10 files changed

+391
-74
lines changed

10 files changed

+391
-74
lines changed

api/v1alpha1/zz_generated.deepcopy.go

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

cmd/main.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,9 @@ func main() {
7575
var ipxeServiceProtocol string
7676
var ipxeServicePort int
7777
var imageServerURL string
78+
var architecture string
7879

80+
flag.StringVar(&architecture, "architecture", "amd64", "Target system architecture (e.g., amd64, arm64)")
7981
flag.IntVar(&ipxeServicePort, "ipxe-service-port", 5000, "IPXE Service port to listen on.")
8082
flag.StringVar(&ipxeServiceProtocol, "ipxe-service-protocol", "http", "IPXE Service Protocol.")
8183
flag.StringVar(&ipxeServiceURL, "ipxe-service-url", "", "IPXE Service URL.")
@@ -192,6 +194,7 @@ func main() {
192194
Client: mgr.GetClient(),
193195
Scheme: mgr.GetScheme(),
194196
IPXEServiceURL: ipxeServiceURL,
197+
Architecture: architecture,
195198
}).SetupWithManager(mgr); err != nil {
196199
setupLog.Error(err, "unable to create controller", "controller", "ServerBootConfigPxe")
197200
os.Exit(1)
Lines changed: 87 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,87 @@
1+
---
2+
apiVersion: apiextensions.k8s.io/v1
3+
kind: CustomResourceDefinition
4+
metadata:
5+
annotations:
6+
controller-gen.kubebuilder.io/version: v0.16.0
7+
name: httpbootconfigs.metal.ironcore.dev
8+
spec:
9+
group: metal.ironcore.dev
10+
names:
11+
kind: HTTPBootConfig
12+
listKind: HTTPBootConfigList
13+
plural: httpbootconfigs
14+
singular: httpbootconfig
15+
scope: Namespaced
16+
versions:
17+
- additionalPrinterColumns:
18+
- jsonPath: .status.state
19+
name: State
20+
type: string
21+
- jsonPath: .metadata.creationTimestamp
22+
name: Age
23+
type: date
24+
name: v1alpha1
25+
schema:
26+
openAPIV3Schema:
27+
description: HTTPBootConfig is the Schema for the httpbootconfigs API
28+
properties:
29+
apiVersion:
30+
description: |-
31+
APIVersion defines the versioned schema of this representation of an object.
32+
Servers should convert recognized schemas to the latest internal value, and
33+
may reject unrecognized values.
34+
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources
35+
type: string
36+
kind:
37+
description: |-
38+
Kind is a string value representing the REST resource this object represents.
39+
Servers may infer this from the endpoint the client submits requests to.
40+
Cannot be updated.
41+
In CamelCase.
42+
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
43+
type: string
44+
metadata:
45+
type: object
46+
spec:
47+
description: HTTPBootConfigSpec defines the desired state of HTTPBootConfig
48+
properties:
49+
ignitionSecretRef:
50+
description: IgnitionSecretRef is a reference to the secret containing
51+
Ignition configuration.
52+
properties:
53+
name:
54+
default: ""
55+
description: |-
56+
Name of the referent.
57+
This field is effectively required, but due to backwards compatibility is
58+
allowed to be empty. Instances of this type with an empty value here are
59+
almost certainly wrong.
60+
More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
61+
type: string
62+
type: object
63+
x-kubernetes-map-type: atomic
64+
systemIPs:
65+
description: SystemIPs is a list of IP addresses assigned to the server.
66+
items:
67+
type: string
68+
type: array
69+
systemUUID:
70+
description: SystemUUID is the unique identifier (UUID) of the server.
71+
type: string
72+
ukiURL:
73+
description: UKIURL is the URL where the UKI (Unified Kernel Image)
74+
is hosted.
75+
type: string
76+
type: object
77+
status:
78+
description: HTTPBootConfigStatus defines the observed state of HTTPBootConfig
79+
properties:
80+
state:
81+
type: string
82+
type: object
83+
type: object
84+
served: true
85+
storage: true
86+
subresources:
87+
status: {}
Lines changed: 119 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,119 @@
1+
---
2+
apiVersion: apiextensions.k8s.io/v1
3+
kind: CustomResourceDefinition
4+
metadata:
5+
annotations:
6+
controller-gen.kubebuilder.io/version: v0.16.0
7+
name: ipxebootconfigs.metal.ironcore.dev
8+
spec:
9+
group: metal.ironcore.dev
10+
names:
11+
kind: IPXEBootConfig
12+
listKind: IPXEBootConfigList
13+
plural: ipxebootconfigs
14+
singular: ipxebootconfig
15+
scope: Namespaced
16+
versions:
17+
- additionalPrinterColumns:
18+
- jsonPath: .status.state
19+
name: State
20+
type: string
21+
- jsonPath: .metadata.creationTimestamp
22+
name: Age
23+
type: date
24+
name: v1alpha1
25+
schema:
26+
openAPIV3Schema:
27+
description: IPXEBootConfig is the Schema for the ipxebootconfigs API
28+
properties:
29+
apiVersion:
30+
description: |-
31+
APIVersion defines the versioned schema of this representation of an object.
32+
Servers should convert recognized schemas to the latest internal value, and
33+
may reject unrecognized values.
34+
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources
35+
type: string
36+
kind:
37+
description: |-
38+
Kind is a string value representing the REST resource this object represents.
39+
Servers may infer this from the endpoint the client submits requests to.
40+
Cannot be updated.
41+
In CamelCase.
42+
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
43+
type: string
44+
metadata:
45+
type: object
46+
spec:
47+
description: IPXEBootConfigSpec defines the desired state of IPXEBootConfig
48+
properties:
49+
ignitionSecretRef:
50+
description: IgnitionSecretRef is a reference to the secret containing
51+
the Ignition configuration.
52+
properties:
53+
name:
54+
default: ""
55+
description: |-
56+
Name of the referent.
57+
This field is effectively required, but due to backwards compatibility is
58+
allowed to be empty. Instances of this type with an empty value here are
59+
almost certainly wrong.
60+
More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
61+
type: string
62+
type: object
63+
x-kubernetes-map-type: atomic
64+
image:
65+
description: Image is deprecated and will be removed.
66+
type: string
67+
initrdURL:
68+
description: InitrdURL is the URL where the Initrd (initial RAM disk)
69+
of the OS is hosted, eg. the URL to the Initrd layer of the OS OCI
70+
image.
71+
type: string
72+
ipxeScriptSecretRef:
73+
description: IPXEScriptSecretRef is a reference to the secret containing
74+
the custom IPXE script.
75+
properties:
76+
name:
77+
default: ""
78+
description: |-
79+
Name of the referent.
80+
This field is effectively required, but due to backwards compatibility is
81+
allowed to be empty. Instances of this type with an empty value here are
82+
almost certainly wrong.
83+
More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
84+
type: string
85+
type: object
86+
x-kubernetes-map-type: atomic
87+
ipxeServerURL:
88+
description: IPXEServerURL is deprecated and will be removed.
89+
type: string
90+
kernelURL:
91+
description: KernelURL is the URL where the kernel of the OS is hosted,
92+
eg. the URL to the Kernel layer of the OS OCI image.
93+
type: string
94+
squashfsURL:
95+
description: SquashfsURL is the URL where the Squashfs of the OS is
96+
hosted, eg. the URL to the Squashfs layer of the OS OCI image.
97+
type: string
98+
systemIPs:
99+
description: SystemIPs is a list of IP addresses assigned to the server.
100+
items:
101+
type: string
102+
type: array
103+
systemUUID:
104+
description: SystemUUID is the unique identifier (UUID) of the server.
105+
type: string
106+
type: object
107+
status:
108+
description: IPXEBootConfigStatus defines the observed state of IPXEBootConfig
109+
properties:
110+
state:
111+
description: 'Important: Run "make" to regenerate code after modifying
112+
this file'
113+
type: string
114+
type: object
115+
type: object
116+
served: true
117+
storage: true
118+
subresources:
119+
status: {}

go.mod

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,10 @@ module github.com/ironcore-dev/boot-operator
33
go 1.23.0
44

55
require (
6+
github.com/containerd/containerd v1.7.25
67
github.com/coreos/butane v0.23.0
78
github.com/go-logr/logr v1.4.2
89
github.com/ironcore-dev/controller-utils v0.9.7
9-
github.com/ironcore-dev/ironcore-image v0.2.4
1010
github.com/ironcore-dev/metal v0.0.0-20240624131301-18385f342755
1111
github.com/ironcore-dev/metal-operator v0.0.0-20241009145147-7ccca8caf3b1
1212
github.com/onsi/ginkgo/v2 v2.22.2
@@ -20,12 +20,12 @@ require (
2020
)
2121

2222
require (
23+
github.com/AdaLogics/go-fuzz-headers v0.0.0-20230811130428-ced1acdcaa24 // indirect
2324
github.com/aws/aws-sdk-go v1.55.5 // indirect
2425
github.com/beorn7/perks v1.0.1 // indirect
2526
github.com/cespare/xxhash/v2 v2.3.0 // indirect
2627
github.com/clarketm/json v1.17.1 // indirect
27-
github.com/containerd/containerd v1.7.23 // indirect
28-
github.com/containerd/errdefs v1.0.0 // indirect
28+
github.com/containerd/errdefs v0.3.0 // indirect
2929
github.com/containerd/log v0.1.0 // indirect
3030
github.com/containerd/platforms v0.2.1 // indirect
3131
github.com/coreos/go-json v0.0.0-20230131223807-18775e0fb4fb // indirect
@@ -36,8 +36,10 @@ require (
3636
github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc // indirect
3737
github.com/emicklei/go-restful/v3 v3.12.0 // indirect
3838
github.com/evanphx/json-patch/v5 v5.9.0 // indirect
39+
github.com/felixge/httpsnoop v1.0.4 // indirect
3940
github.com/fsnotify/fsnotify v1.7.0 // indirect
4041
github.com/fxamacker/cbor/v2 v2.7.0 // indirect
42+
github.com/go-logr/stdr v1.2.2 // indirect
4143
github.com/go-logr/zapr v1.3.0 // indirect
4244
github.com/go-openapi/jsonpointer v0.21.0 // indirect
4345
github.com/go-openapi/jsonreference v0.21.0 // indirect
@@ -52,8 +54,9 @@ require (
5254
github.com/google/uuid v1.6.0 // indirect
5355
github.com/josharian/intern v1.0.0 // indirect
5456
github.com/json-iterator/go v1.1.12 // indirect
55-
github.com/klauspost/compress v1.17.4 // indirect
57+
github.com/klauspost/compress v1.16.7 // indirect
5658
github.com/mailru/easyjson v0.7.7 // indirect
59+
github.com/moby/locker v1.0.1 // indirect
5760
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect
5861
github.com/modern-go/reflect2 v1.0.2 // indirect
5962
github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 // indirect
@@ -69,6 +72,10 @@ require (
6972
github.com/stretchr/testify v1.10.0 // indirect
7073
github.com/vincent-petithory/dataurl v1.0.0 // indirect
7174
github.com/x448/float16 v0.8.4 // indirect
75+
go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.53.0 // indirect
76+
go.opentelemetry.io/otel v1.28.0 // indirect
77+
go.opentelemetry.io/otel/metric v1.28.0 // indirect
78+
go.opentelemetry.io/otel/trace v1.28.0 // indirect
7279
go.uber.org/multierr v1.11.0 // indirect
7380
go.uber.org/zap v1.27.0 // indirect
7481
golang.org/x/exp v0.0.0-20240719175910-8a7402abbf56 // indirect

0 commit comments

Comments
 (0)