Skip to content

Commit

Permalink
Add comments for spec/status/items
Browse files Browse the repository at this point in the history
  • Loading branch information
tsuzu committed Feb 18, 2025
1 parent 047bf1a commit 1f4d683
Show file tree
Hide file tree
Showing 58 changed files with 298 additions and 192 deletions.
7 changes: 5 additions & 2 deletions api/v1beta1/cluster_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -1047,7 +1047,9 @@ type Cluster struct {
metav1.TypeMeta `json:",inline"`
metav1.ObjectMeta `json:"metadata,omitempty"`

Spec ClusterSpec `json:"spec,omitempty"`
// spec is the desired state of Cluster
Spec ClusterSpec `json:"spec,omitempty"`
// status is the observed state of Cluster
Status ClusterStatus `json:"status,omitempty"`
}

Expand Down Expand Up @@ -1180,7 +1182,8 @@ func (f ClusterIPFamily) String() string {
type ClusterList struct {
metav1.TypeMeta `json:",inline"`
metav1.ListMeta `json:"metadata,omitempty"`
Items []Cluster `json:"items"`
// items is the list of Cluster
Items []Cluster `json:"items"`
}

func init() {
Expand Down
7 changes: 5 additions & 2 deletions api/v1beta1/clusterclass_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,9 @@ type ClusterClass struct {
metav1.TypeMeta `json:",inline"`
metav1.ObjectMeta `json:"metadata,omitempty"`

Spec ClusterClassSpec `json:"spec,omitempty"`
// spec is the desired state of ClusterClass
Spec ClusterClassSpec `json:"spec,omitempty"`
// status is the observed state of ClusterClass
Status ClusterClassStatus `json:"status,omitempty"`
}

Expand Down Expand Up @@ -1073,7 +1075,8 @@ func (c *ClusterClass) SetV1Beta2Conditions(conditions []metav1.Condition) {
type ClusterClassList struct {
metav1.TypeMeta `json:",inline"`
metav1.ListMeta `json:"metadata,omitempty"`
Items []ClusterClass `json:"items"`
// items is the list of ClusterClass
Items []ClusterClass `json:"items"`
}

func init() {
Expand Down
7 changes: 5 additions & 2 deletions api/v1beta1/machine_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -666,7 +666,9 @@ type Machine struct {
metav1.TypeMeta `json:",inline"`
metav1.ObjectMeta `json:"metadata,omitempty"`

Spec MachineSpec `json:"spec,omitempty"`
// spec is the desired state of Machine
Spec MachineSpec `json:"spec,omitempty"`
// status is the observed state of Machine
Status MachineStatus `json:"status,omitempty"`
}

Expand Down Expand Up @@ -702,7 +704,8 @@ func (m *Machine) SetV1Beta2Conditions(conditions []metav1.Condition) {
type MachineList struct {
metav1.TypeMeta `json:",inline"`
metav1.ListMeta `json:"metadata,omitempty"`
Items []Machine `json:"items"`
// items is the list of Machine
Items []Machine `json:"items"`
}

func init() {
Expand Down
7 changes: 5 additions & 2 deletions api/v1beta1/machinedeployment_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -585,7 +585,9 @@ type MachineDeployment struct {
metav1.TypeMeta `json:",inline"`
metav1.ObjectMeta `json:"metadata,omitempty"`

Spec MachineDeploymentSpec `json:"spec,omitempty"`
// spec is the desired state of MachineDeployment
Spec MachineDeploymentSpec `json:"spec,omitempty"`
// status is the observed state of MachineDeployment
Status MachineDeploymentStatus `json:"status,omitempty"`
}

Expand All @@ -595,7 +597,8 @@ type MachineDeployment struct {
type MachineDeploymentList struct {
metav1.TypeMeta `json:",inline"`
metav1.ListMeta `json:"metadata,omitempty"`
Items []MachineDeployment `json:"items"`
// items is the list of MachineDeployment
Items []MachineDeployment `json:"items"`
}

func init() {
Expand Down
3 changes: 2 additions & 1 deletion api/v1beta1/machinehealthcheck_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -244,7 +244,8 @@ func (m *MachineHealthCheck) SetV1Beta2Conditions(conditions []metav1.Condition)
type MachineHealthCheckList struct {
metav1.TypeMeta `json:",inline"`
metav1.ListMeta `json:"metadata,omitempty"`
Items []MachineHealthCheck `json:"items"`
// items is the list of MachineHealthCheck
Items []MachineHealthCheck `json:"items"`
}

func init() {
Expand Down
7 changes: 5 additions & 2 deletions api/v1beta1/machineset_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -422,7 +422,9 @@ type MachineSet struct {
metav1.TypeMeta `json:",inline"`
metav1.ObjectMeta `json:"metadata,omitempty"`

Spec MachineSetSpec `json:"spec,omitempty"`
// spec is the desired state of MachineSet
Spec MachineSetSpec `json:"spec,omitempty"`
// status is the observed state of MachineSet
Status MachineSetStatus `json:"status,omitempty"`
}

Expand Down Expand Up @@ -458,7 +460,8 @@ func (m *MachineSet) SetV1Beta2Conditions(conditions []metav1.Condition) {
type MachineSetList struct {
metav1.TypeMeta `json:",inline"`
metav1.ListMeta `json:"metadata,omitempty"`
Items []MachineSet `json:"items"`
// items is the list of MachineSet
Items []MachineSet `json:"items"`
}

func init() {
Expand Down
68 changes: 42 additions & 26 deletions api/v1beta1/zz_generated.openapi.go

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

7 changes: 5 additions & 2 deletions bootstrap/kubeadm/api/v1beta1/kubeadmconfig_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -477,7 +477,9 @@ type KubeadmConfig struct {
metav1.TypeMeta `json:",inline"`
metav1.ObjectMeta `json:"metadata,omitempty"`

Spec KubeadmConfigSpec `json:"spec,omitempty"`
// spec is the desired state of KubeadmConfig
Spec KubeadmConfigSpec `json:"spec,omitempty"`
// status is the observed state of KubeadmConfig
Status KubeadmConfigStatus `json:"status,omitempty"`
}

Expand Down Expand Up @@ -513,7 +515,8 @@ func (c *KubeadmConfig) SetV1Beta2Conditions(conditions []metav1.Condition) {
type KubeadmConfigList struct {
metav1.TypeMeta `json:",inline"`
metav1.ListMeta `json:"metadata,omitempty"`
Items []KubeadmConfig `json:"items"`
// items is the list of KubeadmConfig
Items []KubeadmConfig `json:"items"`
}

func init() {
Expand Down
5 changes: 4 additions & 1 deletion bootstrap/kubeadm/api/v1beta1/kubeadmconfigtemplate_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ type KubeadmConfigTemplateResource struct {
// +optional
ObjectMeta clusterv1.ObjectMeta `json:"metadata,omitempty"`

// spec is the desired state of KubeadmConfig
Spec KubeadmConfigSpec `json:"spec,omitempty"`
}

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

// spec is the desired state of KubeadmConfigTemplate
Spec KubeadmConfigTemplateSpec `json:"spec,omitempty"`
}

Expand All @@ -57,7 +59,8 @@ type KubeadmConfigTemplate struct {
type KubeadmConfigTemplateList struct {
metav1.TypeMeta `json:",inline"`
metav1.ListMeta `json:"metadata,omitempty"`
Items []KubeadmConfigTemplate `json:"items"`
// items is the list of KubeadmConfigTemplate
Items []KubeadmConfigTemplate `json:"items"`
}

func init() {
Expand Down

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

Loading

0 comments on commit 1f4d683

Please sign in to comment.