Skip to content

Commit 72e156c

Browse files
committed
Add comments for metadata
1 parent cb6b1a9 commit 72e156c

File tree

49 files changed

+277
-85
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

49 files changed

+277
-85
lines changed

api/v1beta1/cluster_types.go

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1077,7 +1077,9 @@ func (v APIEndpoint) String() string {
10771077

10781078
// Cluster is the Schema for the clusters API.
10791079
type Cluster struct {
1080-
metav1.TypeMeta `json:",inline"`
1080+
metav1.TypeMeta `json:",inline"`
1081+
// metadata is the standard object's metadata.
1082+
// More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
10811083
metav1.ObjectMeta `json:"metadata,omitempty"`
10821084

10831085
// spec is the desired state of Cluster.
@@ -1214,6 +1216,8 @@ func (f ClusterIPFamily) String() string {
12141216
// ClusterList contains a list of Cluster.
12151217
type ClusterList struct {
12161218
metav1.TypeMeta `json:",inline"`
1219+
// metadata is the standard list's metadata.
1220+
// More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#lists-and-simple-kinds
12171221
metav1.ListMeta `json:"metadata,omitempty"`
12181222
// items is the list of Clusters.
12191223
Items []Cluster `json:"items"`

api/v1beta1/clusterclass_types.go

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,9 @@ const (
7272

7373
// ClusterClass is a template which can be used to create managed topologies.
7474
type ClusterClass struct {
75-
metav1.TypeMeta `json:",inline"`
75+
metav1.TypeMeta `json:",inline"`
76+
// metadata is the standard object's metadata.
77+
// More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
7678
metav1.ObjectMeta `json:"metadata,omitempty"`
7779

7880
// spec is the desired state of ClusterClass.
@@ -1115,6 +1117,8 @@ func (c *ClusterClass) SetV1Beta2Conditions(conditions []metav1.Condition) {
11151117
// ClusterClassList contains a list of Cluster.
11161118
type ClusterClassList struct {
11171119
metav1.TypeMeta `json:",inline"`
1120+
// metadata is the standard list's metadata.
1121+
// More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#lists-and-simple-kinds
11181122
metav1.ListMeta `json:"metadata,omitempty"`
11191123
// items is the list of ClusterClasses.
11201124
Items []ClusterClass `json:"items"`

api/v1beta1/machine_types.go

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -663,7 +663,9 @@ type Bootstrap struct {
663663

664664
// Machine is the Schema for the machines API.
665665
type Machine struct {
666-
metav1.TypeMeta `json:",inline"`
666+
metav1.TypeMeta `json:",inline"`
667+
// metadata is the standard object's metadata.
668+
// More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
667669
metav1.ObjectMeta `json:"metadata,omitempty"`
668670

669671
// spec is the desired state of Machine.
@@ -703,6 +705,8 @@ func (m *Machine) SetV1Beta2Conditions(conditions []metav1.Condition) {
703705
// MachineList contains a list of Machine.
704706
type MachineList struct {
705707
metav1.TypeMeta `json:",inline"`
708+
// metadata is the standard list's metadata.
709+
// More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#lists-and-simple-kinds
706710
metav1.ListMeta `json:"metadata,omitempty"`
707711
// items is the list of Machines.
708712
Items []Machine `json:"items"`

api/v1beta1/machinedeployment_types.go

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -582,7 +582,9 @@ func (md *MachineDeploymentStatus) GetTypedPhase() MachineDeploymentPhase {
582582

583583
// MachineDeployment is the Schema for the machinedeployments API.
584584
type MachineDeployment struct {
585-
metav1.TypeMeta `json:",inline"`
585+
metav1.TypeMeta `json:",inline"`
586+
// metadata is the standard object's metadata.
587+
// More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
586588
metav1.ObjectMeta `json:"metadata,omitempty"`
587589

588590
// spec is the desired state of MachineDeployment.
@@ -596,6 +598,8 @@ type MachineDeployment struct {
596598
// MachineDeploymentList contains a list of MachineDeployment.
597599
type MachineDeploymentList struct {
598600
metav1.TypeMeta `json:",inline"`
601+
// metadata is the standard list's metadata.
602+
// More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#lists-and-simple-kinds
599603
metav1.ListMeta `json:"metadata,omitempty"`
600604
// items is the list of MachineDeployments.
601605
Items []MachineDeployment `json:"items"`

api/v1beta1/machinedrainrules_types.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -205,6 +205,8 @@ type MachineDrainRulePodSelector struct {
205205
type MachineDrainRule struct {
206206
metav1.TypeMeta `json:",inline"`
207207

208+
// metadata is the standard object's metadata.
209+
// More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
208210
// +required
209211
metav1.ObjectMeta `json:"metadata"`
210212

@@ -219,6 +221,8 @@ type MachineDrainRule struct {
219221
type MachineDrainRuleList struct {
220222
metav1.TypeMeta `json:",inline"`
221223

224+
// metadata is the standard list's metadata.
225+
// More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#lists-and-simple-kinds
222226
// +required
223227
metav1.ListMeta `json:"metadata"`
224228

api/v1beta1/machinehealthcheck_types.go

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -202,7 +202,9 @@ type MachineHealthCheckV1Beta2Status struct {
202202

203203
// MachineHealthCheck is the Schema for the machinehealthchecks API.
204204
type MachineHealthCheck struct {
205-
metav1.TypeMeta `json:",inline"`
205+
metav1.TypeMeta `json:",inline"`
206+
// metadata is the standard object's metadata.
207+
// More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
206208
metav1.ObjectMeta `json:"metadata,omitempty"`
207209

208210
// spec is the specification of machine health check policy
@@ -243,6 +245,8 @@ func (m *MachineHealthCheck) SetV1Beta2Conditions(conditions []metav1.Condition)
243245
// MachineHealthCheckList contains a list of MachineHealthCheck.
244246
type MachineHealthCheckList struct {
245247
metav1.TypeMeta `json:",inline"`
248+
// metadata is the standard list's metadata.
249+
// More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#lists-and-simple-kinds
246250
metav1.ListMeta `json:"metadata,omitempty"`
247251
// items is the list of MachineHealthChecks.
248252
Items []MachineHealthCheck `json:"items"`

api/v1beta1/machineset_types.go

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -236,7 +236,7 @@ const (
236236

237237
// MachineTemplateSpec describes the data needed to create a Machine from a template.
238238
type MachineTemplateSpec struct {
239-
// Standard object's metadata.
239+
// metadata is the standard object's metadata.
240240
// More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
241241
// +optional
242242
ObjectMeta `json:"metadata,omitempty"`
@@ -419,7 +419,9 @@ func (m *MachineSet) Validate() field.ErrorList {
419419

420420
// MachineSet is the Schema for the machinesets API.
421421
type MachineSet struct {
422-
metav1.TypeMeta `json:",inline"`
422+
metav1.TypeMeta `json:",inline"`
423+
// metadata is the standard object's metadata.
424+
// More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
423425
metav1.ObjectMeta `json:"metadata,omitempty"`
424426

425427
// spec is the desired state of MachineSet.
@@ -459,6 +461,8 @@ func (m *MachineSet) SetV1Beta2Conditions(conditions []metav1.Condition) {
459461
// MachineSetList contains a list of MachineSet.
460462
type MachineSetList struct {
461463
metav1.TypeMeta `json:",inline"`
464+
// metadata is the standard list's metadata.
465+
// More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#lists-and-simple-kinds
462466
metav1.ListMeta `json:"metadata,omitempty"`
463467
// items is the list of MachineSets.
464468
Items []MachineSet `json:"items"`

api/v1beta1/zz_generated.openapi.go

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

bootstrap/kubeadm/api/v1beta1/kubeadmconfig_types.go

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -474,7 +474,9 @@ type KubeadmConfigV1Beta2Status struct {
474474

475475
// KubeadmConfig is the Schema for the kubeadmconfigs API.
476476
type KubeadmConfig struct {
477-
metav1.TypeMeta `json:",inline"`
477+
metav1.TypeMeta `json:",inline"`
478+
// metadata is the standard object's metadata.
479+
// More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
478480
metav1.ObjectMeta `json:"metadata,omitempty"`
479481

480482
// spec is the desired state of KubeadmConfig.
@@ -514,6 +516,8 @@ func (c *KubeadmConfig) SetV1Beta2Conditions(conditions []metav1.Condition) {
514516
// KubeadmConfigList contains a list of KubeadmConfig.
515517
type KubeadmConfigList struct {
516518
metav1.TypeMeta `json:",inline"`
519+
// metadata is the standard list's metadata.
520+
// More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#lists-and-simple-kinds
517521
metav1.ListMeta `json:"metadata,omitempty"`
518522
// items is the list of KubeadmConfigs.
519523
Items []KubeadmConfig `json:"items"`

bootstrap/kubeadm/api/v1beta1/kubeadmconfigtemplate_types.go

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,9 @@ type KubeadmConfigTemplateResource struct {
4646

4747
// KubeadmConfigTemplate is the Schema for the kubeadmconfigtemplates API.
4848
type KubeadmConfigTemplate struct {
49-
metav1.TypeMeta `json:",inline"`
49+
metav1.TypeMeta `json:",inline"`
50+
// metadata is the standard object's metadata.
51+
// More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
5052
metav1.ObjectMeta `json:"metadata,omitempty"`
5153

5254
// spec is the desired state of KubeadmConfigTemplate.
@@ -58,6 +60,8 @@ type KubeadmConfigTemplate struct {
5860
// KubeadmConfigTemplateList contains a list of KubeadmConfigTemplate.
5961
type KubeadmConfigTemplateList struct {
6062
metav1.TypeMeta `json:",inline"`
63+
// metadata is the standard list's metadata.
64+
// More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#lists-and-simple-kinds
6165
metav1.ListMeta `json:"metadata,omitempty"`
6266
// items is the list of KubeadmConfigTemplates.
6367
Items []KubeadmConfigTemplate `json:"items"`

0 commit comments

Comments
 (0)