bug(staging_api_apps_v1): add descriptions to apps/v1/types.go files

#### What type of PR is this?
/kind bug

#### What this PR does / why we need it:

This PR adds descriptions for the following:
1. Metadata and List of Struct `StatefulSetLists`
2. Metadata of Struct `StatefulSet`

#### Which issue(s) this PR fixes:
Ref #99675
This commit is contained in:
AbdulBasitAlvi 2021-05-16 07:09:40 +05:00
parent a45aeb626c
commit 29cfc68911
5 changed files with 34 additions and 14 deletions

View File

@ -805,7 +805,7 @@
}, },
"metadata": { "metadata": {
"$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta", "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta",
"description": "Standard object metadata." "description": "Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata"
}, },
"spec": { "spec": {
"$ref": "#/definitions/io.k8s.api.apps.v1.DeploymentSpec", "$ref": "#/definitions/io.k8s.api.apps.v1.DeploymentSpec",
@ -1224,7 +1224,8 @@
"type": "string" "type": "string"
}, },
"metadata": { "metadata": {
"$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta" "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta",
"description": "Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata"
}, },
"spec": { "spec": {
"$ref": "#/definitions/io.k8s.api.apps.v1.StatefulSetSpec", "$ref": "#/definitions/io.k8s.api.apps.v1.StatefulSetSpec",
@ -1282,6 +1283,7 @@
"type": "string" "type": "string"
}, },
"items": { "items": {
"description": "Items is the list of stateful sets.",
"items": { "items": {
"$ref": "#/definitions/io.k8s.api.apps.v1.StatefulSet" "$ref": "#/definitions/io.k8s.api.apps.v1.StatefulSet"
}, },
@ -1292,7 +1294,8 @@
"type": "string" "type": "string"
}, },
"metadata": { "metadata": {
"$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.ListMeta" "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.ListMeta",
"description": "Standard list's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata"
} }
}, },
"required": [ "required": [

View File

@ -1,4 +1,3 @@
./staging/src/k8s.io/api/apps/v1/types.go
./staging/src/k8s.io/api/apps/v1beta1/types.go ./staging/src/k8s.io/api/apps/v1beta1/types.go
./staging/src/k8s.io/api/apps/v1beta2/types.go ./staging/src/k8s.io/api/apps/v1beta2/types.go
./staging/src/k8s.io/api/autoscaling/v2beta2/types.go ./staging/src/k8s.io/api/autoscaling/v2beta2/types.go

View File

@ -219,7 +219,8 @@ message DaemonSetUpdateStrategy {
// Deployment enables declarative updates for Pods and ReplicaSets. // Deployment enables declarative updates for Pods and ReplicaSets.
message Deployment { message Deployment {
// Standard object metadata. // Standard object's metadata.
// More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
// +optional // +optional
optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1; optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1;
@ -366,7 +367,8 @@ message DeploymentStrategy {
message ReplicaSet { message ReplicaSet {
// If the Labels of a ReplicaSet are empty, they are defaulted to // If the Labels of a ReplicaSet are empty, they are defaulted to
// be the same as the Pod(s) that the ReplicaSet manages. // be the same as the Pod(s) that the ReplicaSet manages.
// Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata // Standard object's metadata.
// More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
// +optional // +optional
optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1; optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1;
@ -562,6 +564,8 @@ message RollingUpdateStatefulSetStrategy {
// The StatefulSet guarantees that a given network identity will always // The StatefulSet guarantees that a given network identity will always
// map to the same storage identity. // map to the same storage identity.
message StatefulSet { message StatefulSet {
// Standard object's metadata.
// More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
// +optional // +optional
optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1; optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1;
@ -598,9 +602,12 @@ message StatefulSetCondition {
// StatefulSetList is a collection of StatefulSets. // StatefulSetList is a collection of StatefulSets.
message StatefulSetList { message StatefulSetList {
// Standard list's metadata.
// More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
// +optional // +optional
optional k8s.io.apimachinery.pkg.apis.meta.v1.ListMeta metadata = 1; optional k8s.io.apimachinery.pkg.apis.meta.v1.ListMeta metadata = 1;
// Items is the list of stateful sets.
repeated StatefulSet items = 2; repeated StatefulSet items = 2;
} }

View File

@ -45,6 +45,8 @@ const (
// map to the same storage identity. // map to the same storage identity.
type StatefulSet struct { type StatefulSet struct {
metav1.TypeMeta `json:",inline"` metav1.TypeMeta `json:",inline"`
// Standard object's metadata.
// More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
// +optional // +optional
metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
@ -241,8 +243,12 @@ type StatefulSetCondition struct {
// StatefulSetList is a collection of StatefulSets. // StatefulSetList is a collection of StatefulSets.
type StatefulSetList struct { type StatefulSetList struct {
metav1.TypeMeta `json:",inline"` metav1.TypeMeta `json:",inline"`
// Standard list's metadata.
// More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
// +optional // +optional
metav1.ListMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` metav1.ListMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
// Items is the list of stateful sets.
Items []StatefulSet `json:"items" protobuf:"bytes,2,rep,name=items"` Items []StatefulSet `json:"items" protobuf:"bytes,2,rep,name=items"`
} }
@ -255,7 +261,8 @@ type StatefulSetList struct {
// Deployment enables declarative updates for Pods and ReplicaSets. // Deployment enables declarative updates for Pods and ReplicaSets.
type Deployment struct { type Deployment struct {
metav1.TypeMeta `json:",inline"` metav1.TypeMeta `json:",inline"`
// Standard object metadata. // Standard object's metadata.
// More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
// +optional // +optional
metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
@ -693,7 +700,8 @@ type ReplicaSet struct {
// If the Labels of a ReplicaSet are empty, they are defaulted to // If the Labels of a ReplicaSet are empty, they are defaulted to
// be the same as the Pod(s) that the ReplicaSet manages. // be the same as the Pod(s) that the ReplicaSet manages.
// Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata // Standard object's metadata.
// More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
// +optional // +optional
metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`

View File

@ -125,7 +125,7 @@ func (DaemonSetUpdateStrategy) SwaggerDoc() map[string]string {
var map_Deployment = map[string]string{ var map_Deployment = map[string]string{
"": "Deployment enables declarative updates for Pods and ReplicaSets.", "": "Deployment enables declarative updates for Pods and ReplicaSets.",
"metadata": "Standard object metadata.", "metadata": "Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata",
"spec": "Specification of the desired behavior of the Deployment.", "spec": "Specification of the desired behavior of the Deployment.",
"status": "Most recently observed status of the Deployment.", "status": "Most recently observed status of the Deployment.",
} }
@ -291,6 +291,7 @@ func (RollingUpdateStatefulSetStrategy) SwaggerDoc() map[string]string {
var map_StatefulSet = map[string]string{ var map_StatefulSet = map[string]string{
"": "StatefulSet represents a set of pods with consistent identities. Identities are defined as:\n - Network: A single stable DNS and hostname.\n - Storage: As many VolumeClaims as requested.\nThe StatefulSet guarantees that a given network identity will always map to the same storage identity.", "": "StatefulSet represents a set of pods with consistent identities. Identities are defined as:\n - Network: A single stable DNS and hostname.\n - Storage: As many VolumeClaims as requested.\nThe StatefulSet guarantees that a given network identity will always map to the same storage identity.",
"metadata": "Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata",
"spec": "Spec defines the desired identities of pods in this set.", "spec": "Spec defines the desired identities of pods in this set.",
"status": "Status is the current status of Pods in this StatefulSet. This data may be out of date by some window of time.", "status": "Status is the current status of Pods in this StatefulSet. This data may be out of date by some window of time.",
} }
@ -314,6 +315,8 @@ func (StatefulSetCondition) SwaggerDoc() map[string]string {
var map_StatefulSetList = map[string]string{ var map_StatefulSetList = map[string]string{
"": "StatefulSetList is a collection of StatefulSets.", "": "StatefulSetList is a collection of StatefulSets.",
"metadata": "Standard list's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata",
"items": "Items is the list of stateful sets.",
} }
func (StatefulSetList) SwaggerDoc() map[string]string { func (StatefulSetList) SwaggerDoc() map[string]string {