Skip to content

Commit

Permalink
Merge pull request #641 from timuthy/fix/crd
Browse files Browse the repository at this point in the history
Fix CRD manifests
  • Loading branch information
prashanth26 authored Aug 25, 2021
2 parents e096125 + 4bb8db0 commit 611e0a4
Show file tree
Hide file tree
Showing 8 changed files with 26 additions and 4 deletions.
1 change: 1 addition & 0 deletions kubernetes/crds/machine.sapcloud.io_machineclasses.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ spec:
providerSpec:
description: Provider-specific configuration to use during node creation.
type: object
x-kubernetes-preserve-unknown-fields: true
secretRef:
description: SecretRef stores the necessary secrets such as credentials
or userdata.
Expand Down
2 changes: 2 additions & 0 deletions kubernetes/crds/machine.sapcloud.io_machinedeployments.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -204,6 +204,7 @@ spec:
metadata:
description: 'Standard object''s metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata'
type: object
x-kubernetes-preserve-unknown-fields: true
spec:
description: 'Specification of the desired behavior of the machine.
More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status'
Expand Down Expand Up @@ -250,6 +251,7 @@ spec:
properties:
metadata:
type: object
x-kubernetes-preserve-unknown-fields: true
spec:
description: NodeSpec describes the attributes that a
node is created with.
Expand Down
16 changes: 14 additions & 2 deletions kubernetes/crds/machine.sapcloud.io_machines.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,21 @@ spec:
singular: machine
scope: Namespaced
versions:
- name: v1alpha1
- additionalPrinterColumns:
- description: Current status of the machine.
jsonPath: .status.currentStatus.phase
name: Status
type: string
- description: |-
CreationTimestamp is a timestamp representing the server time when this object was created. It is not guaranteed to be set in happens-before order across separate operations. Clients may not set this value. It is represented in RFC3339 form and is in UTC.
Populated by the system. Read-only. Null for lists. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
jsonPath: .metadata.creationTimestamp
name: Age
type: date
name: v1alpha1
schema:
openAPIV3Schema:
description: Machine TODO
description: Machine is the representation of a physical or virtual machine.
properties:
apiVersion:
description: 'APIVersion defines the versioned schema of this representation
Expand Down Expand Up @@ -76,6 +87,7 @@ spec:
properties:
metadata:
type: object
x-kubernetes-preserve-unknown-fields: true
spec:
description: NodeSpec describes the attributes that a node is
created with.
Expand Down
2 changes: 2 additions & 0 deletions kubernetes/crds/machine.sapcloud.io_machinesets.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,7 @@ spec:
metadata:
description: 'Standard object''s metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata'
type: object
x-kubernetes-preserve-unknown-fields: true
spec:
description: 'Specification of the desired behavior of the machine.
More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status'
Expand Down Expand Up @@ -174,6 +175,7 @@ spec:
properties:
metadata:
type: object
x-kubernetes-preserve-unknown-fields: true
spec:
description: NodeSpec describes the attributes that a
node is created with.
Expand Down
5 changes: 4 additions & 1 deletion pkg/apis/machine/v1alpha1/machine_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,10 @@ import (
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
// +kubebuilder:object:root=true
// +kubebuilder:subresource:status
// +kubebuilder:printcolumn:name="Status",type=string,JSONPath=`.status.currentStatus.phase`,description="Current status of the machine."
// +kubebuilder:printcolumn:name="Age",type=date,JSONPath=`.metadata.creationTimestamp`,description="CreationTimestamp is a timestamp representing the server time when this object was created. It is not guaranteed to be set in happens-before order across separate operations. Clients may not set this value. It is represented in RFC3339 form and is in UTC.\nPopulated by the system. Read-only. Null for lists. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata"

// Machine TODO
// Machine is the representation of a physical or virtual machine.
type Machine struct {
// ObjectMeta for machine object
metav1.ObjectMeta `json:"metadata,omitempty"`
Expand Down Expand Up @@ -81,6 +83,7 @@ type ClassSpec struct {

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

Expand Down
1 change: 1 addition & 0 deletions pkg/apis/machine/v1alpha1/machineclass_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ type MachineClass struct {
metav1.TypeMeta `json:",inline"`
// +optional
metav1.ObjectMeta `json:"metadata,omitempty"`
// +kubebuilder:validation:XPreserveUnknownFields
// Provider-specific configuration to use during node creation.
ProviderSpec runtime.RawExtension `json:"providerSpec"`
// SecretRef stores the necessary secrets such as credentials or userdata.
Expand Down
1 change: 1 addition & 0 deletions pkg/apis/machine/v1alpha1/shared_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ import (

// MachineTemplateSpec describes the data a machine should have when created from a template
type MachineTemplateSpec struct {
// +kubebuilder:validation:XPreserveUnknownFields
// Standard object's metadata.
// More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata
// +optional
Expand Down
2 changes: 1 addition & 1 deletion pkg/openapi/openapi_generated.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 611e0a4

Please sign in to comment.