Skip to content

Commit 99c6d21

Browse files
committed
Fix CRD manifests
1 parent e096125 commit 99c6d21

File tree

8 files changed

+12
-3
lines changed

8 files changed

+12
-3
lines changed

kubernetes/crds/machine.sapcloud.io_machineclasses.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,7 @@ spec:
5656
providerSpec:
5757
description: Provider-specific configuration to use during node creation.
5858
type: object
59+
x-kubernetes-preserve-unknown-fields: true
5960
secretRef:
6061
description: SecretRef stores the necessary secrets such as credentials
6162
or userdata.

kubernetes/crds/machine.sapcloud.io_machinedeployments.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -204,6 +204,7 @@ spec:
204204
metadata:
205205
description: 'Standard object''s metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata'
206206
type: object
207+
x-kubernetes-preserve-unknown-fields: true
207208
spec:
208209
description: 'Specification of the desired behavior of the machine.
209210
More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status'
@@ -250,6 +251,7 @@ spec:
250251
properties:
251252
metadata:
252253
type: object
254+
x-kubernetes-preserve-unknown-fields: true
253255
spec:
254256
description: NodeSpec describes the attributes that a
255257
node is created with.

kubernetes/crds/machine.sapcloud.io_machines.yaml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ spec:
1919
- name: v1alpha1
2020
schema:
2121
openAPIV3Schema:
22-
description: Machine TODO
22+
description: Machine is the representation of a physical or virtual machine.
2323
properties:
2424
apiVersion:
2525
description: 'APIVersion defines the versioned schema of this representation
@@ -76,6 +76,7 @@ spec:
7676
properties:
7777
metadata:
7878
type: object
79+
x-kubernetes-preserve-unknown-fields: true
7980
spec:
8081
description: NodeSpec describes the attributes that a node is
8182
created with.

kubernetes/crds/machine.sapcloud.io_machinesets.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -128,6 +128,7 @@ spec:
128128
metadata:
129129
description: 'Standard object''s metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata'
130130
type: object
131+
x-kubernetes-preserve-unknown-fields: true
131132
spec:
132133
description: 'Specification of the desired behavior of the machine.
133134
More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status'
@@ -174,6 +175,7 @@ spec:
174175
properties:
175176
metadata:
176177
type: object
178+
x-kubernetes-preserve-unknown-fields: true
177179
spec:
178180
description: NodeSpec describes the attributes that a
179181
node is created with.

pkg/apis/machine/v1alpha1/machine_types.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ import (
3232
// +kubebuilder:object:root=true
3333
// +kubebuilder:subresource:status
3434

35-
// Machine TODO
35+
// Machine is the representation of a physical or virtual machine.
3636
type Machine struct {
3737
// ObjectMeta for machine object
3838
metav1.ObjectMeta `json:"metadata,omitempty"`
@@ -81,6 +81,7 @@ type ClassSpec struct {
8181

8282
// NodeTemplateSpec describes the data a node should have when created from a template
8383
type NodeTemplateSpec struct {
84+
// +kubebuilder:validation:XPreserveUnknownFields
8485
// +optional
8586
metav1.ObjectMeta `json:"metadata,omitempty"`
8687

pkg/apis/machine/v1alpha1/machineclass_types.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@ type MachineClass struct {
3737
metav1.TypeMeta `json:",inline"`
3838
// +optional
3939
metav1.ObjectMeta `json:"metadata,omitempty"`
40+
// +kubebuilder:validation:XPreserveUnknownFields
4041
// Provider-specific configuration to use during node creation.
4142
ProviderSpec runtime.RawExtension `json:"providerSpec"`
4243
// SecretRef stores the necessary secrets such as credentials or userdata.

pkg/apis/machine/v1alpha1/shared_types.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ import (
2424

2525
// MachineTemplateSpec describes the data a machine should have when created from a template
2626
type MachineTemplateSpec struct {
27+
// +kubebuilder:validation:XPreserveUnknownFields
2728
// Standard object's metadata.
2829
// More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata
2930
// +optional

pkg/openapi/openapi_generated.go

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

0 commit comments

Comments
 (0)