Skip to content

Commit 5e5b506

Browse files
authored
Merge pull request #12420 from sbueringer/pr-template-required
⚠️ Make Template in MachineSet & Spec in MachineTemplateSpec required
2 parents 07db0a3 + 19f51c9 commit 5e5b506

File tree

5 files changed

+13
-5
lines changed

5 files changed

+13
-5
lines changed

api/core/v1beta2/machineset_types.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -80,8 +80,8 @@ type MachineSetSpec struct {
8080
// template is the object that describes the machine that will be created if
8181
// insufficient replicas are detected.
8282
// Object references to custom resources are treated as templates.
83-
// +optional
84-
Template MachineTemplateSpec `json:"template,omitempty"`
83+
// +required
84+
Template MachineTemplateSpec `json:"template"`
8585

8686
// machineNamingStrategy allows changing the naming pattern used when creating Machines.
8787
// Note: InfraMachines & BootstrapConfigs will use the same name as the corresponding Machines.
@@ -240,8 +240,8 @@ type MachineTemplateSpec struct {
240240

241241
// spec is the specification of the desired behavior of the machine.
242242
// More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status
243-
// +optional
244-
Spec MachineSpec `json:"spec,omitempty"`
243+
// +required
244+
Spec MachineSpec `json:"spec"`
245245
}
246246

247247
// ANCHOR_END: MachineTemplateSpec

api/core/v1beta2/zz_generated.openapi.go

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

config/crd/bases/cluster.x-k8s.io_machinedeployments.yaml

Lines changed: 2 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

config/crd/bases/cluster.x-k8s.io_machinepools.yaml

Lines changed: 2 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

config/crd/bases/cluster.x-k8s.io_machinesets.yaml

Lines changed: 3 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)