Skip to content

Commit a0107cf

Browse files
committed
Add comments for spec/status/items
1 parent 047bf1a commit a0107cf

File tree

63 files changed

+318
-201
lines changed

Some content is hidden

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

63 files changed

+318
-201
lines changed

api/v1beta1/cluster_types.go

+5-2
Original file line numberDiff line numberDiff line change
@@ -1047,7 +1047,9 @@ type Cluster struct {
10471047
metav1.TypeMeta `json:",inline"`
10481048
metav1.ObjectMeta `json:"metadata,omitempty"`
10491049

1050-
Spec ClusterSpec `json:"spec,omitempty"`
1050+
// spec is the desired state of Cluster.
1051+
Spec ClusterSpec `json:"spec,omitempty"`
1052+
// status is the observed state of Cluster.
10511053
Status ClusterStatus `json:"status,omitempty"`
10521054
}
10531055

@@ -1180,7 +1182,8 @@ func (f ClusterIPFamily) String() string {
11801182
type ClusterList struct {
11811183
metav1.TypeMeta `json:",inline"`
11821184
metav1.ListMeta `json:"metadata,omitempty"`
1183-
Items []Cluster `json:"items"`
1185+
// items is the list of Clusters.
1186+
Items []Cluster `json:"items"`
11841187
}
11851188

11861189
func init() {

api/v1beta1/clusterclass_types.go

+5-2
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,9 @@ type ClusterClass struct {
7575
metav1.TypeMeta `json:",inline"`
7676
metav1.ObjectMeta `json:"metadata,omitempty"`
7777

78-
Spec ClusterClassSpec `json:"spec,omitempty"`
78+
// spec is the desired state of ClusterClass.
79+
Spec ClusterClassSpec `json:"spec,omitempty"`
80+
// status is the observed state of ClusterClass.
7981
Status ClusterClassStatus `json:"status,omitempty"`
8082
}
8183

@@ -1073,7 +1075,8 @@ func (c *ClusterClass) SetV1Beta2Conditions(conditions []metav1.Condition) {
10731075
type ClusterClassList struct {
10741076
metav1.TypeMeta `json:",inline"`
10751077
metav1.ListMeta `json:"metadata,omitempty"`
1076-
Items []ClusterClass `json:"items"`
1078+
// items is the list of ClusterClasses.
1079+
Items []ClusterClass `json:"items"`
10771080
}
10781081

10791082
func init() {

api/v1beta1/machine_types.go

+5-2
Original file line numberDiff line numberDiff line change
@@ -666,7 +666,9 @@ type Machine struct {
666666
metav1.TypeMeta `json:",inline"`
667667
metav1.ObjectMeta `json:"metadata,omitempty"`
668668

669-
Spec MachineSpec `json:"spec,omitempty"`
669+
// spec is the desired state of Machine.
670+
Spec MachineSpec `json:"spec,omitempty"`
671+
// status is the observed state of Machine.
670672
Status MachineStatus `json:"status,omitempty"`
671673
}
672674

@@ -702,7 +704,8 @@ func (m *Machine) SetV1Beta2Conditions(conditions []metav1.Condition) {
702704
type MachineList struct {
703705
metav1.TypeMeta `json:",inline"`
704706
metav1.ListMeta `json:"metadata,omitempty"`
705-
Items []Machine `json:"items"`
707+
// items is the list of Machines.
708+
Items []Machine `json:"items"`
706709
}
707710

708711
func init() {

api/v1beta1/machinedeployment_types.go

+5-2
Original file line numberDiff line numberDiff line change
@@ -585,7 +585,9 @@ type MachineDeployment struct {
585585
metav1.TypeMeta `json:",inline"`
586586
metav1.ObjectMeta `json:"metadata,omitempty"`
587587

588-
Spec MachineDeploymentSpec `json:"spec,omitempty"`
588+
// spec is the desired state of MachineDeployment.
589+
Spec MachineDeploymentSpec `json:"spec,omitempty"`
590+
// status is the observed state of MachineDeployment.
589591
Status MachineDeploymentStatus `json:"status,omitempty"`
590592
}
591593

@@ -595,7 +597,8 @@ type MachineDeployment struct {
595597
type MachineDeploymentList struct {
596598
metav1.TypeMeta `json:",inline"`
597599
metav1.ListMeta `json:"metadata,omitempty"`
598-
Items []MachineDeployment `json:"items"`
600+
// items is the list of MachineDeployments.
601+
Items []MachineDeployment `json:"items"`
599602
}
600603

601604
func init() {

api/v1beta1/machinehealthcheck_types.go

+2-1
Original file line numberDiff line numberDiff line change
@@ -244,7 +244,8 @@ func (m *MachineHealthCheck) SetV1Beta2Conditions(conditions []metav1.Condition)
244244
type MachineHealthCheckList struct {
245245
metav1.TypeMeta `json:",inline"`
246246
metav1.ListMeta `json:"metadata,omitempty"`
247-
Items []MachineHealthCheck `json:"items"`
247+
// items is the list of MachineHealthChecks.
248+
Items []MachineHealthCheck `json:"items"`
248249
}
249250

250251
func init() {

api/v1beta1/machineset_types.go

+5-2
Original file line numberDiff line numberDiff line change
@@ -422,7 +422,9 @@ type MachineSet struct {
422422
metav1.TypeMeta `json:",inline"`
423423
metav1.ObjectMeta `json:"metadata,omitempty"`
424424

425-
Spec MachineSetSpec `json:"spec,omitempty"`
425+
// spec is the desired state of MachineSet.
426+
Spec MachineSetSpec `json:"spec,omitempty"`
427+
// status is the observed state of MachineSet.
426428
Status MachineSetStatus `json:"status,omitempty"`
427429
}
428430

@@ -458,7 +460,8 @@ func (m *MachineSet) SetV1Beta2Conditions(conditions []metav1.Condition) {
458460
type MachineSetList struct {
459461
metav1.TypeMeta `json:",inline"`
460462
metav1.ListMeta `json:"metadata,omitempty"`
461-
Items []MachineSet `json:"items"`
463+
// items is the list of MachineSets.
464+
Items []MachineSet `json:"items"`
462465
}
463466

464467
func init() {

api/v1beta1/zz_generated.openapi.go

+42-26
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

+5-2
Original file line numberDiff line numberDiff line change
@@ -477,7 +477,9 @@ type KubeadmConfig struct {
477477
metav1.TypeMeta `json:",inline"`
478478
metav1.ObjectMeta `json:"metadata,omitempty"`
479479

480-
Spec KubeadmConfigSpec `json:"spec,omitempty"`
480+
// spec is the desired state of KubeadmConfig.
481+
Spec KubeadmConfigSpec `json:"spec,omitempty"`
482+
// status is the observed state of KubeadmConfig.
481483
Status KubeadmConfigStatus `json:"status,omitempty"`
482484
}
483485

@@ -513,7 +515,8 @@ func (c *KubeadmConfig) SetV1Beta2Conditions(conditions []metav1.Condition) {
513515
type KubeadmConfigList struct {
514516
metav1.TypeMeta `json:",inline"`
515517
metav1.ListMeta `json:"metadata,omitempty"`
516-
Items []KubeadmConfig `json:"items"`
518+
// items is the list of KubeadmConfigs.
519+
Items []KubeadmConfig `json:"items"`
517520
}
518521

519522
func init() {

bootstrap/kubeadm/api/v1beta1/kubeadmconfigtemplate_types.go

+4-1
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ type KubeadmConfigTemplateResource struct {
3535
// +optional
3636
ObjectMeta clusterv1.ObjectMeta `json:"metadata,omitempty"`
3737

38+
// spec is the desired state of KubeadmConfig.
3839
Spec KubeadmConfigSpec `json:"spec,omitempty"`
3940
}
4041

@@ -48,6 +49,7 @@ type KubeadmConfigTemplate struct {
4849
metav1.TypeMeta `json:",inline"`
4950
metav1.ObjectMeta `json:"metadata,omitempty"`
5051

52+
// spec is the desired state of KubeadmConfigTemplate.
5153
Spec KubeadmConfigTemplateSpec `json:"spec,omitempty"`
5254
}
5355

@@ -57,7 +59,8 @@ type KubeadmConfigTemplate struct {
5759
type KubeadmConfigTemplateList struct {
5860
metav1.TypeMeta `json:",inline"`
5961
metav1.ListMeta `json:"metadata,omitempty"`
60-
Items []KubeadmConfigTemplate `json:"items"`
62+
// items is the list of KubeadmConfigTemplates.
63+
Items []KubeadmConfigTemplate `json:"items"`
6164
}
6265

6366
func init() {

bootstrap/kubeadm/config/crd/bases/bootstrap.cluster.x-k8s.io_kubeadmconfigs.yaml

+6-12
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)