Skip to content

Commit cb6b1a9

Browse files
authored
Merge pull request #11870 from tsuzu/fix-spec-status-items-comments
🌱 Add comments for spec/status/items
2 parents b7014e3 + f619679 commit cb6b1a9

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
@@ -1080,7 +1080,9 @@ type Cluster struct {
10801080
metav1.TypeMeta `json:",inline"`
10811081
metav1.ObjectMeta `json:"metadata,omitempty"`
10821082

1083-
Spec ClusterSpec `json:"spec,omitempty"`
1083+
// spec is the desired state of Cluster.
1084+
Spec ClusterSpec `json:"spec,omitempty"`
1085+
// status is the observed state of Cluster.
10841086
Status ClusterStatus `json:"status,omitempty"`
10851087
}
10861088

@@ -1213,7 +1215,8 @@ func (f ClusterIPFamily) String() string {
12131215
type ClusterList struct {
12141216
metav1.TypeMeta `json:",inline"`
12151217
metav1.ListMeta `json:"metadata,omitempty"`
1216-
Items []Cluster `json:"items"`
1218+
// items is the list of Clusters.
1219+
Items []Cluster `json:"items"`
12171220
}
12181221

12191222
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

@@ -1114,7 +1116,8 @@ func (c *ClusterClass) SetV1Beta2Conditions(conditions []metav1.Condition) {
11141116
type ClusterClassList struct {
11151117
metav1.TypeMeta `json:",inline"`
11161118
metav1.ListMeta `json:"metadata,omitempty"`
1117-
Items []ClusterClass `json:"items"`
1119+
// items is the list of ClusterClasses.
1120+
Items []ClusterClass `json:"items"`
11181121
}
11191122

11201123
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)