Skip to content

Commit 6897a1f

Browse files
Fix review comments
1 parent 86fe072 commit 6897a1f

File tree

2 files changed

+12
-3
lines changed

2 files changed

+12
-3
lines changed

api/v1beta2/awsmachinetemplate_types.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,10 +47,12 @@ const (
4747
type NodeInfo struct {
4848
// Architecture is the CPU architecture of the node.
4949
// Its underlying type is a string and its value can be any of amd64, arm64.
50+
// +kubebuilder:validation:Enum=amd64;arm64
5051
// +optional
5152
Architecture Architecture `json:"architecture,omitempty"`
5253
// OperatingSystem is a string representing the operating system of the node.
5354
// This may be a string like 'linux' or 'windows'.
55+
// +kubebuilder:validation:Enum=linux;windows
5456
// +optional
5557
OperatingSystem string `json:"operatingSystem,omitempty"`
5658
}

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

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1163,17 +1163,24 @@ spec:
11631163
https://github.com/kubernetes-sigs/cluster-api/blob/main/docs/proposals/20210310-opt-in-autoscaling-from-zero.md
11641164
properties:
11651165
architecture:
1166+
allOf:
1167+
- enum:
1168+
- amd64
1169+
- arm64
1170+
- enum:
1171+
- amd64
1172+
- arm64
11661173
description: |-
11671174
Architecture is the CPU architecture of the node.
11681175
Its underlying type is a string and its value can be any of amd64, arm64.
1169-
enum:
1170-
- amd64
1171-
- arm64
11721176
type: string
11731177
operatingSystem:
11741178
description: |-
11751179
OperatingSystem is a string representing the operating system of the node.
11761180
This may be a string like 'linux' or 'windows'.
1181+
enum:
1182+
- linux
1183+
- windows
11771184
type: string
11781185
type: object
11791186
type: object

0 commit comments

Comments
 (0)