From 2acbe87156d3fcd7c18a853ee694732b8ba31cda Mon Sep 17 00:00:00 2001 From: Haowei Cai Date: Thu, 29 Mar 2018 12:57:20 -0700 Subject: [PATCH 1/2] mark ServerAddressByClientCIDRs as optional --- staging/src/k8s.io/apimachinery/pkg/apis/meta/v1/types.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/staging/src/k8s.io/apimachinery/pkg/apis/meta/v1/types.go b/staging/src/k8s.io/apimachinery/pkg/apis/meta/v1/types.go index 917efb37f7..e93df18461 100644 --- a/staging/src/k8s.io/apimachinery/pkg/apis/meta/v1/types.go +++ b/staging/src/k8s.io/apimachinery/pkg/apis/meta/v1/types.go @@ -799,7 +799,8 @@ type APIGroup struct { // The server returns only those CIDRs that it thinks that the client can match. // For example: the master will return an internal IP CIDR only, if the client reaches the server using an internal IP. // Server looks at X-Forwarded-For header or X-Real-Ip header or request.RemoteAddr (in that order) to get the client IP. - ServerAddressByClientCIDRs []ServerAddressByClientCIDR `json:"serverAddressByClientCIDRs" protobuf:"bytes,4,rep,name=serverAddressByClientCIDRs"` + // +optional + ServerAddressByClientCIDRs []ServerAddressByClientCIDR `json:"serverAddressByClientCIDRs,omitempty" protobuf:"bytes,4,rep,name=serverAddressByClientCIDRs"` } // ServerAddressByClientCIDR helps the client to determine the server address that they should use, depending on the clientCIDR that they match. From a14f423ebbd122f81dcb447a3a622ce5200e12c5 Mon Sep 17 00:00:00 2001 From: Haowei Cai Date: Mon, 21 May 2018 18:04:54 -0700 Subject: [PATCH 2/2] generated --- api/openapi-spec/swagger.json | 3 +-- api/swagger-spec/admissionregistration.k8s.io.json | 3 +-- api/swagger-spec/apis.json | 3 +-- api/swagger-spec/apps.json | 3 +-- api/swagger-spec/authentication.k8s.io.json | 3 +-- api/swagger-spec/authorization.k8s.io.json | 3 +-- api/swagger-spec/autoscaling.json | 3 +-- api/swagger-spec/batch.json | 3 +-- api/swagger-spec/certificates.k8s.io.json | 3 +-- api/swagger-spec/events.k8s.io.json | 3 +-- api/swagger-spec/extensions.json | 3 +-- api/swagger-spec/networking.k8s.io.json | 3 +-- api/swagger-spec/policy.json | 3 +-- api/swagger-spec/rbac.authorization.k8s.io.json | 3 +-- api/swagger-spec/scheduling.k8s.io.json | 3 +-- api/swagger-spec/settings.k8s.io.json | 3 +-- api/swagger-spec/storage.k8s.io.json | 3 +-- .../src/k8s.io/apimachinery/pkg/apis/meta/v1/generated.proto | 1 + 18 files changed, 18 insertions(+), 34 deletions(-) diff --git a/api/openapi-spec/swagger.json b/api/openapi-spec/swagger.json index 66c8520117..afb9d5709d 100644 --- a/api/openapi-spec/swagger.json +++ b/api/openapi-spec/swagger.json @@ -84336,8 +84336,7 @@ "description": "APIGroup contains the name, the supported versions, and the preferred version of a group.", "required": [ "name", - "versions", - "serverAddressByClientCIDRs" + "versions" ], "properties": { "apiVersion": { diff --git a/api/swagger-spec/admissionregistration.k8s.io.json b/api/swagger-spec/admissionregistration.k8s.io.json index 8a93d2b976..4b5bba0b60 100644 --- a/api/swagger-spec/admissionregistration.k8s.io.json +++ b/api/swagger-spec/admissionregistration.k8s.io.json @@ -38,8 +38,7 @@ "description": "APIGroup contains the name, the supported versions, and the preferred version of a group.", "required": [ "name", - "versions", - "serverAddressByClientCIDRs" + "versions" ], "properties": { "kind": { diff --git a/api/swagger-spec/apis.json b/api/swagger-spec/apis.json index 18d960ca59..9070fc9096 100644 --- a/api/swagger-spec/apis.json +++ b/api/swagger-spec/apis.json @@ -62,8 +62,7 @@ "description": "APIGroup contains the name, the supported versions, and the preferred version of a group.", "required": [ "name", - "versions", - "serverAddressByClientCIDRs" + "versions" ], "properties": { "kind": { diff --git a/api/swagger-spec/apps.json b/api/swagger-spec/apps.json index ecfaa626a6..603237ab4b 100644 --- a/api/swagger-spec/apps.json +++ b/api/swagger-spec/apps.json @@ -38,8 +38,7 @@ "description": "APIGroup contains the name, the supported versions, and the preferred version of a group.", "required": [ "name", - "versions", - "serverAddressByClientCIDRs" + "versions" ], "properties": { "kind": { diff --git a/api/swagger-spec/authentication.k8s.io.json b/api/swagger-spec/authentication.k8s.io.json index d0ef25599e..175735dba8 100644 --- a/api/swagger-spec/authentication.k8s.io.json +++ b/api/swagger-spec/authentication.k8s.io.json @@ -38,8 +38,7 @@ "description": "APIGroup contains the name, the supported versions, and the preferred version of a group.", "required": [ "name", - "versions", - "serverAddressByClientCIDRs" + "versions" ], "properties": { "kind": { diff --git a/api/swagger-spec/authorization.k8s.io.json b/api/swagger-spec/authorization.k8s.io.json index 9bd028308d..98200f7583 100644 --- a/api/swagger-spec/authorization.k8s.io.json +++ b/api/swagger-spec/authorization.k8s.io.json @@ -38,8 +38,7 @@ "description": "APIGroup contains the name, the supported versions, and the preferred version of a group.", "required": [ "name", - "versions", - "serverAddressByClientCIDRs" + "versions" ], "properties": { "kind": { diff --git a/api/swagger-spec/autoscaling.json b/api/swagger-spec/autoscaling.json index fbb9329e3a..39bdb8664f 100644 --- a/api/swagger-spec/autoscaling.json +++ b/api/swagger-spec/autoscaling.json @@ -38,8 +38,7 @@ "description": "APIGroup contains the name, the supported versions, and the preferred version of a group.", "required": [ "name", - "versions", - "serverAddressByClientCIDRs" + "versions" ], "properties": { "kind": { diff --git a/api/swagger-spec/batch.json b/api/swagger-spec/batch.json index c8604aed95..ad5fcc2c27 100644 --- a/api/swagger-spec/batch.json +++ b/api/swagger-spec/batch.json @@ -38,8 +38,7 @@ "description": "APIGroup contains the name, the supported versions, and the preferred version of a group.", "required": [ "name", - "versions", - "serverAddressByClientCIDRs" + "versions" ], "properties": { "kind": { diff --git a/api/swagger-spec/certificates.k8s.io.json b/api/swagger-spec/certificates.k8s.io.json index bdd12bab60..6479970532 100644 --- a/api/swagger-spec/certificates.k8s.io.json +++ b/api/swagger-spec/certificates.k8s.io.json @@ -38,8 +38,7 @@ "description": "APIGroup contains the name, the supported versions, and the preferred version of a group.", "required": [ "name", - "versions", - "serverAddressByClientCIDRs" + "versions" ], "properties": { "kind": { diff --git a/api/swagger-spec/events.k8s.io.json b/api/swagger-spec/events.k8s.io.json index 423933664f..b651382837 100644 --- a/api/swagger-spec/events.k8s.io.json +++ b/api/swagger-spec/events.k8s.io.json @@ -38,8 +38,7 @@ "description": "APIGroup contains the name, the supported versions, and the preferred version of a group.", "required": [ "name", - "versions", - "serverAddressByClientCIDRs" + "versions" ], "properties": { "kind": { diff --git a/api/swagger-spec/extensions.json b/api/swagger-spec/extensions.json index 2e2fc1afd9..bc161e4ef4 100644 --- a/api/swagger-spec/extensions.json +++ b/api/swagger-spec/extensions.json @@ -38,8 +38,7 @@ "description": "APIGroup contains the name, the supported versions, and the preferred version of a group.", "required": [ "name", - "versions", - "serverAddressByClientCIDRs" + "versions" ], "properties": { "kind": { diff --git a/api/swagger-spec/networking.k8s.io.json b/api/swagger-spec/networking.k8s.io.json index debc58cd79..9a67396ddd 100644 --- a/api/swagger-spec/networking.k8s.io.json +++ b/api/swagger-spec/networking.k8s.io.json @@ -38,8 +38,7 @@ "description": "APIGroup contains the name, the supported versions, and the preferred version of a group.", "required": [ "name", - "versions", - "serverAddressByClientCIDRs" + "versions" ], "properties": { "kind": { diff --git a/api/swagger-spec/policy.json b/api/swagger-spec/policy.json index 51c62c2217..12ee477ccd 100644 --- a/api/swagger-spec/policy.json +++ b/api/swagger-spec/policy.json @@ -38,8 +38,7 @@ "description": "APIGroup contains the name, the supported versions, and the preferred version of a group.", "required": [ "name", - "versions", - "serverAddressByClientCIDRs" + "versions" ], "properties": { "kind": { diff --git a/api/swagger-spec/rbac.authorization.k8s.io.json b/api/swagger-spec/rbac.authorization.k8s.io.json index d162e47b9f..7752ae8a68 100644 --- a/api/swagger-spec/rbac.authorization.k8s.io.json +++ b/api/swagger-spec/rbac.authorization.k8s.io.json @@ -38,8 +38,7 @@ "description": "APIGroup contains the name, the supported versions, and the preferred version of a group.", "required": [ "name", - "versions", - "serverAddressByClientCIDRs" + "versions" ], "properties": { "kind": { diff --git a/api/swagger-spec/scheduling.k8s.io.json b/api/swagger-spec/scheduling.k8s.io.json index ca8030cbd4..639e581b07 100644 --- a/api/swagger-spec/scheduling.k8s.io.json +++ b/api/swagger-spec/scheduling.k8s.io.json @@ -38,8 +38,7 @@ "description": "APIGroup contains the name, the supported versions, and the preferred version of a group.", "required": [ "name", - "versions", - "serverAddressByClientCIDRs" + "versions" ], "properties": { "kind": { diff --git a/api/swagger-spec/settings.k8s.io.json b/api/swagger-spec/settings.k8s.io.json index b82334cab5..f146229070 100644 --- a/api/swagger-spec/settings.k8s.io.json +++ b/api/swagger-spec/settings.k8s.io.json @@ -38,8 +38,7 @@ "description": "APIGroup contains the name, the supported versions, and the preferred version of a group.", "required": [ "name", - "versions", - "serverAddressByClientCIDRs" + "versions" ], "properties": { "kind": { diff --git a/api/swagger-spec/storage.k8s.io.json b/api/swagger-spec/storage.k8s.io.json index 733f4ecef6..956159c8c1 100644 --- a/api/swagger-spec/storage.k8s.io.json +++ b/api/swagger-spec/storage.k8s.io.json @@ -38,8 +38,7 @@ "description": "APIGroup contains the name, the supported versions, and the preferred version of a group.", "required": [ "name", - "versions", - "serverAddressByClientCIDRs" + "versions" ], "properties": { "kind": { diff --git a/staging/src/k8s.io/apimachinery/pkg/apis/meta/v1/generated.proto b/staging/src/k8s.io/apimachinery/pkg/apis/meta/v1/generated.proto index e78380ab6d..4baf44f3de 100644 --- a/staging/src/k8s.io/apimachinery/pkg/apis/meta/v1/generated.proto +++ b/staging/src/k8s.io/apimachinery/pkg/apis/meta/v1/generated.proto @@ -49,6 +49,7 @@ message APIGroup { // The server returns only those CIDRs that it thinks that the client can match. // For example: the master will return an internal IP CIDR only, if the client reaches the server using an internal IP. // Server looks at X-Forwarded-For header or X-Real-Ip header or request.RemoteAddr (in that order) to get the client IP. + // +optional repeated ServerAddressByClientCIDR serverAddressByClientCIDRs = 4; }