@@ -179,7 +179,9 @@ const (
179
179
// DockerMachineTemplateStatus defines the observed state of a DockerMachineTemplate
180
180
type DockerMachineTemplateStatus struct {
181
181
Capacity corev1.ResourceList `json:"capacity,omitempty"`
182
- NodeInfo *platform.NodeSystemInfo `json:"nodeInfo,omitempty"`
182
+
183
+ // +optional
184
+ NodeInfo *platform.NodeInfo `json:"nodeInfo,omitempty"`
183
185
}
184
186
185
187
// DockerMachineTemplate is the Schema for the dockermachinetemplates API.
@@ -201,17 +203,26 @@ Its definition would look like this:
201
203
``` go
202
204
package platform
203
205
206
+ // Architecture represents the architecture of the node. Its underlying type is a string.
207
+ // +enum
204
208
type Architecture string
205
209
210
+ // Architecture constants defined for clarity and to be used by the cluster-api providers.
206
211
const (
207
212
ArchitectureAmd64 Architecture = " amd64"
208
213
ArchitectureArm64 Architecture = " arm64"
209
214
ArchitectureS390x Architecture = " s390x"
210
215
ArchitecturePpc64le Architecture = " ppc64le"
211
216
)
212
217
213
- type NodeSystemInfo struct {
218
+ // NodeInfo contains information about the node's architecture and operating system.
219
+ type NodeInfo struct {
220
+ // Architecture is the architecture of the node. It is a string that can be any of (amd64, arm64, s390x, ppc64le).
221
+ // +optional
222
+ // +kubebuilder:validation:Enum=amd64;arm64;s390x;ppc64le
214
223
Architecture Architecture ` json:"architecture,omitempty"`
224
+ // OperatingSystem is a string representing the operating system of the node.
225
+ // +optional
215
226
OperatingSystem string ` json:"operatingSystem,omitempty"`
216
227
}
217
228
```
0 commit comments