Skip to content

Commit 0b19770

Browse files
committed
Updates from review
1 parent 85da18e commit 0b19770

File tree

1 file changed

+13
-2
lines changed

1 file changed

+13
-2
lines changed

docs/proposals/20210310-opt-in-autoscaling-from-zero.md

+13-2
Original file line numberDiff line numberDiff line change
@@ -179,7 +179,9 @@ const (
179179
// DockerMachineTemplateStatus defines the observed state of a DockerMachineTemplate
180180
type DockerMachineTemplateStatus struct {
181181
Capacity corev1.ResourceList `json:"capacity,omitempty"`
182-
NodeInfo *platform.NodeSystemInfo `json:"nodeInfo,omitempty"`
182+
183+
// +optional
184+
NodeInfo *platform.NodeInfo `json:"nodeInfo,omitempty"`
183185
}
184186
185187
// DockerMachineTemplate is the Schema for the dockermachinetemplates API.
@@ -201,17 +203,26 @@ Its definition would look like this:
201203
```go
202204
package platform
203205

206+
// Architecture represents the architecture of the node. Its underlying type is a string.
207+
// +enum
204208
type Architecture string
205209

210+
// Architecture constants defined for clarity and to be used by the cluster-api providers.
206211
const (
207212
ArchitectureAmd64 Architecture = "amd64"
208213
ArchitectureArm64 Architecture = "arm64"
209214
ArchitectureS390x Architecture = "s390x"
210215
ArchitecturePpc64le Architecture = "ppc64le"
211216
)
212217

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
214223
Architecture Architecture `json:"architecture,omitempty"`
224+
// OperatingSystem is a string representing the operating system of the node.
225+
// +optional
215226
OperatingSystem string `json:"operatingSystem,omitempty"`
216227
}
217228
```

0 commit comments

Comments
 (0)