diff --git a/docs/documents/apis.md b/docs/documents/apis.md
index 401062f35..ef27e7b47 100644
--- a/docs/documents/apis.md
+++ b/docs/documents/apis.md
@@ -1,7 +1,7 @@
## Specification
### ProviderSpec Schema
-
@@ -25,7 +25,7 @@ string
-machine.sapcloud.io.v1alpha1
+machine.sapcloud.io/v1alpha1
@@ -184,7 +184,7 @@ string
-machine.sapcloud.io.v1alpha1
+machine.sapcloud.io/v1alpha1
@@ -318,7 +318,7 @@ string
-machine.sapcloud.io.v1alpha1
+machine.sapcloud.io/v1alpha1
@@ -559,7 +559,7 @@ string
-machine.sapcloud.io.v1alpha1
+machine.sapcloud.io/v1alpha1
(Appears on: -MachineSetSpec, -MachineSpec) +MachineSetSpec, +MachineSpec)
ClassSpec is the class specification of machine
@@ -761,23 +761,23 @@ stringstring
alias)(Appears on: -MachineDeploymentCondition, -MachineSetCondition) +MachineDeploymentCondition, +MachineSetCondition)
(Appears on: -MachineStatus) +MachineStatus)
CurrentStatus contains information about the current status of Machine.
@@ -797,7 +797,7 @@ string(Appears on: -MachineSetStatus, -MachineStatus, -MachineSummary) +MachineSetStatus, +MachineStatus, +MachineSummary)
LastOperation suggests the last operation performed on the object
@@ -904,7 +904,7 @@ Kubernetes meta/v1.Time(Appears on: -MachineSpec) +MachineSpec)
MachineConfiguration describes the configurations useful for the machine-controller.
@@ -1029,12 +1029,12 @@ Kubernetes meta/v1.Duration(Appears on: -MachineDeploymentStatus) +MachineDeploymentStatus)
MachineDeploymentCondition describes the state of a MachineDeployment at a certain point.
@@ -1054,7 +1054,7 @@ Kubernetes meta/v1.Durationstring
alias)(Appears on: -MachineDeploymentCondition) +MachineDeploymentCondition)
(Appears on: -MachineDeployment) +MachineDeployment)
MachineDeploymentSpec is the specification of the desired behavior of the MachineDeployment.
@@ -1204,7 +1204,7 @@ selected by this will be the ones affected by this MachineDeployment.(Appears on: -MachineDeployment) +MachineDeployment)
MachineDeploymentStatus is the most recently observed status of the MachineDeployment.
@@ -1425,7 +1425,7 @@ either be machines that are running but not yet available or machines that still(Appears on: -MachineDeploymentSpec) +MachineDeploymentSpec)
MachineDeploymentStrategy describes how to replace existing machines with new ones.
@@ -1494,7 +1494,7 @@ newest MachineSet.string
alias)(Appears on: -MachineDeploymentStrategy) +MachineDeploymentStrategy)
string
alias)(Appears on: -LastOperation) +LastOperation)
MachineOperationType is a label for the operation performed on a machine object.
string
alias)(Appears on: -CurrentStatus) +CurrentStatus)
MachinePhase is a label for the condition of a machine at the current time.
(Appears on: -MachineSetStatus) +MachineSetStatus)
MachineSetCondition describes the state of a machine set at a certain point.
@@ -1583,7 +1583,7 @@ to be.string
alias)(Appears on: -MachineSetCondition) +MachineSetCondition)
MachineSetConditionType is the condition on machineset object
(Appears on: -MachineSet) +MachineSet)
MachineSetSpec is the specification of a MachineSet.
@@ -1718,7 +1718,7 @@ Kubernetes meta/v1.LabelSelector(Appears on: -MachineSet) +MachineSet)
MachineSetStatus holds the most recently observed status of MachineSet.
@@ -1852,7 +1852,7 @@ int64(Appears on: -Machine, -MachineTemplateSpec) +Machine, +MachineTemplateSpec)
MachineSpec is the specification of a Machine.
@@ -1922,7 +1922,7 @@ LastOperationstring
alias)(Appears on: -LastOperation) +LastOperation)
MachineState is a current state of the operation.
(Appears on: -Machine) +Machine)
MachineStatus holds the most recently observed status of Machine.
@@ -2035,7 +2035,7 @@ MachineConfiguration@@ -2124,7 +2124,7 @@ string
(Appears on: -MachineDeploymentSpec, -MachineSetSpec) +MachineDeploymentSpec, +MachineSetSpec)
MachineTemplateSpec describes the data a machine should have when created from a template
@@ -2194,7 +2194,7 @@ Refer to the Kubernetes API documentation for the fields of the(Appears on: -MachineClass) +MachineClass)
NodeTemplate contains subfields to track all node resources and other node info required to scale nodegroup from zero
@@ -2350,15 +2350,29 @@ stringZone of the expected node belonging to nodeGroup
architecture
+CPU Architecture of the node belonging to nodeGroup
+(Appears on: -MachineSpec) +MachineSpec)
NodeTemplateSpec describes the data a node should have when created from a template
@@ -2518,12 +2532,12 @@ see: https://issues.k8s.io/61966(Appears on: -MachineDeploymentSpec) +MachineDeploymentSpec)
@@ -2553,12 +2567,12 @@ int64
(Appears on: -MachineDeploymentStrategy) +MachineDeploymentStrategy)
Spec to control the desired behavior of rolling update.
diff --git a/kubernetes/crds/machine.sapcloud.io_machineclasses.yaml b/kubernetes/crds/machine.sapcloud.io_machineclasses.yaml index 631e3a369..653a65541 100644 --- a/kubernetes/crds/machine.sapcloud.io_machineclasses.yaml +++ b/kubernetes/crds/machine.sapcloud.io_machineclasses.yaml @@ -55,6 +55,9 @@ spec: description: NodeTemplate contains subfields to track all node resources and other node info required to scale nodegroup from zero properties: + architecture: + description: CPU Architecture of the node belonging to nodeGroup + type: string capacity: additionalProperties: anyOf: diff --git a/pkg/apis/machine/types.go b/pkg/apis/machine/types.go index ab83b4226..82172fc49 100644 --- a/pkg/apis/machine/types.go +++ b/pkg/apis/machine/types.go @@ -679,4 +679,8 @@ type NodeTemplate struct { // Zone of the node belonging to nodeGroup Zone string + + // +optional + // CPU Architecture of the node belonging to nodeGroup + Architecture *string } diff --git a/pkg/apis/machine/v1alpha1/machineclass_types.go b/pkg/apis/machine/v1alpha1/machineclass_types.go index 6d525c338..85c2b426f 100644 --- a/pkg/apis/machine/v1alpha1/machineclass_types.go +++ b/pkg/apis/machine/v1alpha1/machineclass_types.go @@ -84,4 +84,8 @@ type NodeTemplate struct { // Zone of the expected node belonging to nodeGroup Zone string `json:"zone"` + + // +optional + // CPU Architecture of the node belonging to nodeGroup + Architecture *string `json:"architecture,omitempty"` } diff --git a/pkg/apis/machine/v1alpha1/zz_generated.conversion.go b/pkg/apis/machine/v1alpha1/zz_generated.conversion.go index d912fa928..d2fdb8a02 100644 --- a/pkg/apis/machine/v1alpha1/zz_generated.conversion.go +++ b/pkg/apis/machine/v1alpha1/zz_generated.conversion.go @@ -1013,6 +1013,7 @@ func autoConvert_v1alpha1_NodeTemplate_To_machine_NodeTemplate(in *NodeTemplate, out.InstanceType = in.InstanceType out.Region = in.Region out.Zone = in.Zone + out.Architecture = (*string)(unsafe.Pointer(in.Architecture)) return nil } @@ -1026,6 +1027,7 @@ func autoConvert_machine_NodeTemplate_To_v1alpha1_NodeTemplate(in *machine.NodeT out.InstanceType = in.InstanceType out.Region = in.Region out.Zone = in.Zone + out.Architecture = (*string)(unsafe.Pointer(in.Architecture)) return nil } diff --git a/pkg/apis/machine/v1alpha1/zz_generated.deepcopy.go b/pkg/apis/machine/v1alpha1/zz_generated.deepcopy.go index 35b368e1a..d6096e635 100644 --- a/pkg/apis/machine/v1alpha1/zz_generated.deepcopy.go +++ b/pkg/apis/machine/v1alpha1/zz_generated.deepcopy.go @@ -661,6 +661,11 @@ func (in *NodeTemplate) DeepCopyInto(out *NodeTemplate) { (*out)[key] = val.DeepCopy() } } + if in.Architecture != nil { + in, out := &in.Architecture, &out.Architecture + *out = new(string) + **out = **in + } return } diff --git a/pkg/apis/machine/zz_generated.deepcopy.go b/pkg/apis/machine/zz_generated.deepcopy.go index e9bb94643..b0fa28c8f 100644 --- a/pkg/apis/machine/zz_generated.deepcopy.go +++ b/pkg/apis/machine/zz_generated.deepcopy.go @@ -754,6 +754,11 @@ func (in *NodeTemplate) DeepCopyInto(out *NodeTemplate) { (*out)[key] = val.DeepCopy() } } + if in.Architecture != nil { + in, out := &in.Architecture, &out.Architecture + *out = new(string) + **out = **in + } return } diff --git a/pkg/openapi/openapi_generated.go b/pkg/openapi/openapi_generated.go index e7f8c74fb..50bfee76d 100644 --- a/pkg/openapi/openapi_generated.go +++ b/pkg/openapi/openapi_generated.go @@ -1597,6 +1597,13 @@ func schema_pkg_apis_machine_v1alpha1_NodeTemplate(ref common.ReferenceCallback) Format: "", }, }, + "architecture": { + SchemaProps: spec.SchemaProps{ + Description: "CPU Architecture of the node belonging to nodeGroup", + Type: []string{"string"}, + Format: "", + }, + }, }, Required: []string{"capacity", "instanceType", "region", "zone"}, },