From fb4b86bb98a4e671bdba3a93e26cf5ac7f6b8ff1 Mon Sep 17 00:00:00 2001 From: wangyysde Date: Tue, 11 May 2021 17:07:43 +0800 Subject: [PATCH] Add descriptions to api/extensions/v1beta1/types.go Signed-off-by: wangyysde --- api/openapi-spec/swagger.json | 3 ++- hack/.descriptions_failures | 1 - .../src/k8s.io/api/extensions/v1beta1/generated.proto | 10 +++++++++- staging/src/k8s.io/api/extensions/v1beta1/types.go | 10 +++++++++- .../extensions/v1beta1/types_swagger_doc_generated.go | 4 +++- 5 files changed, 23 insertions(+), 5 deletions(-) diff --git a/api/openapi-spec/swagger.json b/api/openapi-spec/swagger.json index 9e94d139a83..10db33f4081 100644 --- a/api/openapi-spec/swagger.json +++ b/api/openapi-spec/swagger.json @@ -11802,7 +11802,8 @@ "type": "string" }, "http": { - "$ref": "#/definitions/io.k8s.api.extensions.v1beta1.HTTPIngressRuleValue" + "$ref": "#/definitions/io.k8s.api.extensions.v1beta1.HTTPIngressRuleValue", + "description": "http is a list of http selectors pointing to backends. A path is matched against the path of an incoming request. Currently it can contain characters disallowed from the conventional \"path\" part of a URL as defined by RFC 3986. Paths must begin with a '/'. A backend defines the referenced service endpoint to which the traffic will be forwarded to." } }, "type": "object" diff --git a/hack/.descriptions_failures b/hack/.descriptions_failures index 8089661a09a..3caee35aa44 100644 --- a/hack/.descriptions_failures +++ b/hack/.descriptions_failures @@ -5,7 +5,6 @@ ./staging/src/k8s.io/api/certificates/v1/types.go ./staging/src/k8s.io/api/certificates/v1beta1/types.go ./staging/src/k8s.io/api/core/v1/types.go -./staging/src/k8s.io/api/extensions/v1beta1/types.go ./staging/src/k8s.io/api/flowcontrol/v1alpha1/types.go ./staging/src/k8s.io/api/flowcontrol/v1beta1/types.go ./staging/src/k8s.io/api/networking/v1/types.go diff --git a/staging/src/k8s.io/api/extensions/v1beta1/generated.proto b/staging/src/k8s.io/api/extensions/v1beta1/generated.proto index a3e54810d62..427886414a0 100644 --- a/staging/src/k8s.io/api/extensions/v1beta1/generated.proto +++ b/staging/src/k8s.io/api/extensions/v1beta1/generated.proto @@ -210,6 +210,9 @@ message DaemonSetStatus { repeated DaemonSetCondition conditions = 10; } +// DaemonSetUpdateStrategy indicates the strategy that the DaemonSet +// controller will use to perform updates. It includes any additional parameters +// necessary to perform the update for the indicated strategy. message DaemonSetUpdateStrategy { // Type of daemon set update. Can be "RollingUpdate" or "OnDelete". // Default is OnDelete. @@ -580,7 +583,12 @@ message IngressRule { // mixing different types of rules in a single Ingress is disallowed, so exactly // one of the following must be set. message IngressRuleValue { - // +optional + // http is a list of http selectors pointing to backends. + // A path is matched against the path of an incoming request. Currently it can + // contain characters disallowed from the conventional "path" part of a URL + // as defined by RFC 3986. Paths must begin with a '/'. + // A backend defines the referenced service endpoint to which the traffic + // will be forwarded to. optional HTTPIngressRuleValue http = 1; } diff --git a/staging/src/k8s.io/api/extensions/v1beta1/types.go b/staging/src/k8s.io/api/extensions/v1beta1/types.go index f9e7012ebe2..1ef23545cee 100644 --- a/staging/src/k8s.io/api/extensions/v1beta1/types.go +++ b/staging/src/k8s.io/api/extensions/v1beta1/types.go @@ -329,6 +329,9 @@ type DeploymentList struct { Items []Deployment `json:"items" protobuf:"bytes,2,rep,name=items"` } +// DaemonSetUpdateStrategy indicates the strategy that the DaemonSet +// controller will use to perform updates. It includes any additional parameters +// necessary to perform the update for the indicated strategy. type DaemonSetUpdateStrategy struct { // Type of daemon set update. Can be "RollingUpdate" or "OnDelete". // Default is OnDelete. @@ -731,7 +734,12 @@ type IngressRuleValue struct { // 2. Consider adding fields for ingress-type specific global options // usable by a loadbalancer, like http keep-alive. - // +optional + // http is a list of http selectors pointing to backends. + // A path is matched against the path of an incoming request. Currently it can + // contain characters disallowed from the conventional "path" part of a URL + // as defined by RFC 3986. Paths must begin with a '/'. + // A backend defines the referenced service endpoint to which the traffic + // will be forwarded to. HTTP *HTTPIngressRuleValue `json:"http,omitempty" protobuf:"bytes,1,opt,name=http"` } diff --git a/staging/src/k8s.io/api/extensions/v1beta1/types_swagger_doc_generated.go b/staging/src/k8s.io/api/extensions/v1beta1/types_swagger_doc_generated.go index 870b607a72b..8f40402c64c 100644 --- a/staging/src/k8s.io/api/extensions/v1beta1/types_swagger_doc_generated.go +++ b/staging/src/k8s.io/api/extensions/v1beta1/types_swagger_doc_generated.go @@ -122,6 +122,7 @@ func (DaemonSetStatus) SwaggerDoc() map[string]string { } var map_DaemonSetUpdateStrategy = map[string]string{ + "": "DaemonSetUpdateStrategy indicates the strategy that the DaemonSet controller will use to perform updates. It includes any additional parameters necessary to perform the update for the indicated strategy.", "type": "Type of daemon set update. Can be \"RollingUpdate\" or \"OnDelete\". Default is OnDelete.", "rollingUpdate": "Rolling update config params. Present only if type = \"RollingUpdate\".", } @@ -321,7 +322,8 @@ func (IngressRule) SwaggerDoc() map[string]string { } var map_IngressRuleValue = map[string]string{ - "": "IngressRuleValue represents a rule to apply against incoming requests. If the rule is satisfied, the request is routed to the specified backend. Currently mixing different types of rules in a single Ingress is disallowed, so exactly one of the following must be set.", + "": "IngressRuleValue represents a rule to apply against incoming requests. If the rule is satisfied, the request is routed to the specified backend. Currently mixing different types of rules in a single Ingress is disallowed, so exactly one of the following must be set.", + "http": "http is a list of http selectors pointing to backends. A path is matched against the path of an incoming request. Currently it can contain characters disallowed from the conventional \"path\" part of a URL as defined by RFC 3986. Paths must begin with a '/'. A backend defines the referenced service endpoint to which the traffic will be forwarded to.", } func (IngressRuleValue) SwaggerDoc() map[string]string {