Unverified Commit f091073b authored by Kubernetes Submit Queue's avatar Kubernetes Submit Queue Committed by GitHub

Merge pull request #61963 from roycaihw/optional-saddress-ccidr

Automatic merge from submit-queue (batch tested with PRs 61963, 64279, 64130, 64125, 64049). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>. Make serverAddressByClientCIDRs in discovery API optional **What this PR does / why we need it**: See https://github.com/kubernetes/kubernetes/issues/61868 **Which issue(s) this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close the issue(s) when PR gets merged)*: Fixes #61868 **Special notes for your reviewer**: WIP: I'm having trouble updating swagger-spec using our update scripts. Thinking about removing swagger-spec from our code base as it has long passed deprecation. Sending this PR now to see the test results. **Release note**: ```release-note Property `serverAddressByClientCIDRs` in `metav1.APIGroup` (discovery API) now become optional instead of required ``` /sig api-machinery
parents d7c40cf6 a14f423e
......@@ -85565,8 +85565,7 @@
"description": "APIGroup contains the name, the supported versions, and the preferred version of a group.",
"required": [
"name",
"versions",
"serverAddressByClientCIDRs"
"versions"
],
"properties": {
"apiVersion": {
......@@ -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": {
......
......@@ -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": {
......
......@@ -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": {
......
......@@ -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": {
......
......@@ -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": {
......
......@@ -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": {
......
......@@ -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": {
......
......@@ -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": {
......
......@@ -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": {
......
......@@ -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": {
......
......@@ -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": {
......
......@@ -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": {
......
......@@ -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": {
......
......@@ -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": {
......
......@@ -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": {
......
......@@ -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": {
......
......@@ -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;
}
......
......@@ -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.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment