From 80df642126fa746e19991693e297505434a6271e Mon Sep 17 00:00:00 2001 From: Dan Mace Date: Wed, 7 Aug 2019 14:33:11 -0400 Subject: [PATCH 1/2] Bug 1738401: config/ingress: clean up docs --- config/v1/types_ingress.go | 6 ++++-- config/v1/zz_generated.swagger_doc_generated.go | 4 ++-- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/config/v1/types_ingress.go b/config/v1/types_ingress.go index 484a1af0bc2..eb5c70578fa 100644 --- a/config/v1/types_ingress.go +++ b/config/v1/types_ingress.go @@ -6,8 +6,8 @@ import metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" // +genclient:nonNamespaced // +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object -// Ingress holds cluster-wide information about Ingress. The canonical name is `cluster` -// TODO this object is an example of a possible grouping and is subject to change or removal +// Ingress holds cluster-wide information about ingress, including the default ingress domain +// used for routes. The canonical name is `cluster`. type Ingress struct { metav1.TypeMeta `json:",inline"` // Standard object's metadata. @@ -26,6 +26,8 @@ type IngressSpec struct { // domain is used to generate a default host name for a route when the // route's host name is empty. The generated host name will follow this // pattern: "..". + // + // Once set, domain cannot be updated. Domain string `json:"domain"` } diff --git a/config/v1/zz_generated.swagger_doc_generated.go b/config/v1/zz_generated.swagger_doc_generated.go index d93945fb9fd..25f7a21dc31 100644 --- a/config/v1/zz_generated.swagger_doc_generated.go +++ b/config/v1/zz_generated.swagger_doc_generated.go @@ -828,7 +828,7 @@ func (PlatformStatus) SwaggerDoc() map[string]string { } var map_Ingress = map[string]string{ - "": "Ingress holds cluster-wide information about Ingress. The canonical name is `cluster`", + "": "Ingress holds cluster-wide information about ingress, including the default ingress domain used for routes. The canonical name is `cluster`.", "metadata": "Standard object's metadata.", "spec": "spec holds user settable values for configuration", "status": "status holds observed values from the cluster. They may not be overridden.", @@ -847,7 +847,7 @@ func (IngressList) SwaggerDoc() map[string]string { } var map_IngressSpec = map[string]string{ - "domain": "domain is used to generate a default host name for a route when the route's host name is empty. The generated host name will follow this pattern: \"..\".", + "domain": "domain is used to generate a default host name for a route when the route's host name is empty. The generated host name will follow this pattern: \"..\".\n\nOnce set, domain cannot be updated.", } func (IngressSpec) SwaggerDoc() map[string]string { From 60bc774d6ad13af39dedd49d69d1dd6b8f330e66 Mon Sep 17 00:00:00 2001 From: Dan Mace Date: Thu, 8 Aug 2019 10:21:42 -0400 Subject: [PATCH 2/2] config/ingress: clarify domain use and immutability --- config/v1/types_ingress.go | 7 +++++-- config/v1/zz_generated.swagger_doc_generated.go | 2 +- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/config/v1/types_ingress.go b/config/v1/types_ingress.go index eb5c70578fa..d161eb8476c 100644 --- a/config/v1/types_ingress.go +++ b/config/v1/types_ingress.go @@ -24,10 +24,13 @@ type Ingress struct { type IngressSpec struct { // domain is used to generate a default host name for a route when the - // route's host name is empty. The generated host name will follow this + // route's host name is empty. The generated host name will follow this // pattern: "..". // - // Once set, domain cannot be updated. + // It is also used as the default wildcard domain suffix for ingress. The + // default ingresscontroller domain will follow this pattern: "*.". + // + // Once set, changing domain is not currently supported. Domain string `json:"domain"` } diff --git a/config/v1/zz_generated.swagger_doc_generated.go b/config/v1/zz_generated.swagger_doc_generated.go index 25f7a21dc31..8415bd5570c 100644 --- a/config/v1/zz_generated.swagger_doc_generated.go +++ b/config/v1/zz_generated.swagger_doc_generated.go @@ -847,7 +847,7 @@ func (IngressList) SwaggerDoc() map[string]string { } var map_IngressSpec = map[string]string{ - "domain": "domain is used to generate a default host name for a route when the route's host name is empty. The generated host name will follow this pattern: \"..\".\n\nOnce set, domain cannot be updated.", + "domain": "domain is used to generate a default host name for a route when the route's host name is empty. The generated host name will follow this pattern: \"..\".\n\nIt is also used as the default wildcard domain suffix for ingress. The default ingresscontroller domain will follow this pattern: \"*.\".\n\nOnce set, changing domain is not currently supported.", } func (IngressSpec) SwaggerDoc() map[string]string {