From a68d712f129c7e359a26378a7165bd144f7c54c7 Mon Sep 17 00:00:00 2001 From: Rob Scott Date: Thu, 12 Mar 2020 11:15:34 -0700 Subject: [PATCH] Removing ConfigMap as suggestion for IngressClass parameters As this is a a local object reference from a global object, referencing a ConfigMap would not be possible. Controller specific custom resources are a much better fit here, allowing for better validation. --- api/openapi-spec/swagger.json | 2 +- pkg/apis/networking/types.go | 7 +++---- staging/src/k8s.io/api/networking/v1beta1/generated.proto | 7 +++---- staging/src/k8s.io/api/networking/v1beta1/types.go | 7 +++---- .../api/networking/v1beta1/types_swagger_doc_generated.go | 2 +- 5 files changed, 11 insertions(+), 14 deletions(-) diff --git a/api/openapi-spec/swagger.json b/api/openapi-spec/swagger.json index f1f617e6d69..51f97f8090f 100644 --- a/api/openapi-spec/swagger.json +++ b/api/openapi-spec/swagger.json @@ -11883,7 +11883,7 @@ }, "parameters": { "$ref": "#/definitions/io.k8s.api.core.v1.TypedLocalObjectReference", - "description": "Parameters is a link to a resource containing additional configuration for the controller. This is optional if the controller does not require extra parameters. Example configuration resources include `core.ConfigMap` or a controller specific Custom Resource." + "description": "Parameters is a link to a custom resource containing additional configuration for the controller. This is optional if the controller does not require extra parameters." } }, "type": "object" diff --git a/pkg/apis/networking/types.go b/pkg/apis/networking/types.go index 4177eab95d6..0eaaa470fa5 100644 --- a/pkg/apis/networking/types.go +++ b/pkg/apis/networking/types.go @@ -297,10 +297,9 @@ type IngressClassSpec struct { // "acme.io/ingress-controller". This field is immutable. Controller string - // Parameters is a link to a resource containing additional configuration - // for the controller. This is optional if the controller does not require - // extra parameters. Example configuration resources include - // `core.ConfigMap` or a controller specific Custom Resource. + // Parameters is a link to a custom resource containing additional + // configuration for the controller. This is optional if the controller does + // not require extra parameters. // +optional Parameters *api.TypedLocalObjectReference } diff --git a/staging/src/k8s.io/api/networking/v1beta1/generated.proto b/staging/src/k8s.io/api/networking/v1beta1/generated.proto index fc09fd8abdd..68bede81fbb 100644 --- a/staging/src/k8s.io/api/networking/v1beta1/generated.proto +++ b/staging/src/k8s.io/api/networking/v1beta1/generated.proto @@ -148,10 +148,9 @@ message IngressClassSpec { // "acme.io/ingress-controller". This field is immutable. optional string controller = 1; - // Parameters is a link to a resource containing additional configuration - // for the controller. This is optional if the controller does not require - // extra parameters. Example configuration resources include - // `core.ConfigMap` or a controller specific Custom Resource. + // Parameters is a link to a custom resource containing additional + // configuration for the controller. This is optional if the controller does + // not require extra parameters. // +optional optional k8s.io.api.core.v1.TypedLocalObjectReference parameters = 2; } diff --git a/staging/src/k8s.io/api/networking/v1beta1/types.go b/staging/src/k8s.io/api/networking/v1beta1/types.go index 11b8dacb9ff..46f530bfae7 100644 --- a/staging/src/k8s.io/api/networking/v1beta1/types.go +++ b/staging/src/k8s.io/api/networking/v1beta1/types.go @@ -298,10 +298,9 @@ type IngressClassSpec struct { // "acme.io/ingress-controller". This field is immutable. Controller string `json:"controller,omitempty" protobuf:"bytes,1,opt,name=controller"` - // Parameters is a link to a resource containing additional configuration - // for the controller. This is optional if the controller does not require - // extra parameters. Example configuration resources include - // `core.ConfigMap` or a controller specific Custom Resource. + // Parameters is a link to a custom resource containing additional + // configuration for the controller. This is optional if the controller does + // not require extra parameters. // +optional Parameters *v1.TypedLocalObjectReference `json:"parameters,omitempty" protobuf:"bytes,2,opt,name=parameters"` } diff --git a/staging/src/k8s.io/api/networking/v1beta1/types_swagger_doc_generated.go b/staging/src/k8s.io/api/networking/v1beta1/types_swagger_doc_generated.go index 3e24b198640..c774249d8ec 100644 --- a/staging/src/k8s.io/api/networking/v1beta1/types_swagger_doc_generated.go +++ b/staging/src/k8s.io/api/networking/v1beta1/types_swagger_doc_generated.go @@ -92,7 +92,7 @@ func (IngressClassList) SwaggerDoc() map[string]string { var map_IngressClassSpec = map[string]string{ "": "IngressClassSpec provides information about the class of an Ingress.", "controller": "Controller refers to the name of the controller that should handle this class. This allows for different \"flavors\" that are controlled by the same controller. For example, you may have different Parameters for the same implementing controller. This should be specified as a domain-prefixed path no more than 250 characters in length, e.g. \"acme.io/ingress-controller\". This field is immutable.", - "parameters": "Parameters is a link to a resource containing additional configuration for the controller. This is optional if the controller does not require extra parameters. Example configuration resources include `core.ConfigMap` or a controller specific Custom Resource.", + "parameters": "Parameters is a link to a custom resource containing additional configuration for the controller. This is optional if the controller does not require extra parameters.", } func (IngressClassSpec) SwaggerDoc() map[string]string {