mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-29 14:37:00 +00:00
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
This commit is contained in:
commit
f091073b0f
3
api/openapi-spec/swagger.json
generated
3
api/openapi-spec/swagger.json
generated
@ -85565,8 +85565,7 @@
|
|||||||
"description": "APIGroup contains the name, the supported versions, and the preferred version of a group.",
|
"description": "APIGroup contains the name, the supported versions, and the preferred version of a group.",
|
||||||
"required": [
|
"required": [
|
||||||
"name",
|
"name",
|
||||||
"versions",
|
"versions"
|
||||||
"serverAddressByClientCIDRs"
|
|
||||||
],
|
],
|
||||||
"properties": {
|
"properties": {
|
||||||
"apiVersion": {
|
"apiVersion": {
|
||||||
|
@ -38,8 +38,7 @@
|
|||||||
"description": "APIGroup contains the name, the supported versions, and the preferred version of a group.",
|
"description": "APIGroup contains the name, the supported versions, and the preferred version of a group.",
|
||||||
"required": [
|
"required": [
|
||||||
"name",
|
"name",
|
||||||
"versions",
|
"versions"
|
||||||
"serverAddressByClientCIDRs"
|
|
||||||
],
|
],
|
||||||
"properties": {
|
"properties": {
|
||||||
"kind": {
|
"kind": {
|
||||||
|
3
api/swagger-spec/apis.json
generated
3
api/swagger-spec/apis.json
generated
@ -62,8 +62,7 @@
|
|||||||
"description": "APIGroup contains the name, the supported versions, and the preferred version of a group.",
|
"description": "APIGroup contains the name, the supported versions, and the preferred version of a group.",
|
||||||
"required": [
|
"required": [
|
||||||
"name",
|
"name",
|
||||||
"versions",
|
"versions"
|
||||||
"serverAddressByClientCIDRs"
|
|
||||||
],
|
],
|
||||||
"properties": {
|
"properties": {
|
||||||
"kind": {
|
"kind": {
|
||||||
|
3
api/swagger-spec/apps.json
generated
3
api/swagger-spec/apps.json
generated
@ -38,8 +38,7 @@
|
|||||||
"description": "APIGroup contains the name, the supported versions, and the preferred version of a group.",
|
"description": "APIGroup contains the name, the supported versions, and the preferred version of a group.",
|
||||||
"required": [
|
"required": [
|
||||||
"name",
|
"name",
|
||||||
"versions",
|
"versions"
|
||||||
"serverAddressByClientCIDRs"
|
|
||||||
],
|
],
|
||||||
"properties": {
|
"properties": {
|
||||||
"kind": {
|
"kind": {
|
||||||
|
3
api/swagger-spec/authentication.k8s.io.json
generated
3
api/swagger-spec/authentication.k8s.io.json
generated
@ -38,8 +38,7 @@
|
|||||||
"description": "APIGroup contains the name, the supported versions, and the preferred version of a group.",
|
"description": "APIGroup contains the name, the supported versions, and the preferred version of a group.",
|
||||||
"required": [
|
"required": [
|
||||||
"name",
|
"name",
|
||||||
"versions",
|
"versions"
|
||||||
"serverAddressByClientCIDRs"
|
|
||||||
],
|
],
|
||||||
"properties": {
|
"properties": {
|
||||||
"kind": {
|
"kind": {
|
||||||
|
3
api/swagger-spec/authorization.k8s.io.json
generated
3
api/swagger-spec/authorization.k8s.io.json
generated
@ -38,8 +38,7 @@
|
|||||||
"description": "APIGroup contains the name, the supported versions, and the preferred version of a group.",
|
"description": "APIGroup contains the name, the supported versions, and the preferred version of a group.",
|
||||||
"required": [
|
"required": [
|
||||||
"name",
|
"name",
|
||||||
"versions",
|
"versions"
|
||||||
"serverAddressByClientCIDRs"
|
|
||||||
],
|
],
|
||||||
"properties": {
|
"properties": {
|
||||||
"kind": {
|
"kind": {
|
||||||
|
3
api/swagger-spec/autoscaling.json
generated
3
api/swagger-spec/autoscaling.json
generated
@ -38,8 +38,7 @@
|
|||||||
"description": "APIGroup contains the name, the supported versions, and the preferred version of a group.",
|
"description": "APIGroup contains the name, the supported versions, and the preferred version of a group.",
|
||||||
"required": [
|
"required": [
|
||||||
"name",
|
"name",
|
||||||
"versions",
|
"versions"
|
||||||
"serverAddressByClientCIDRs"
|
|
||||||
],
|
],
|
||||||
"properties": {
|
"properties": {
|
||||||
"kind": {
|
"kind": {
|
||||||
|
3
api/swagger-spec/batch.json
generated
3
api/swagger-spec/batch.json
generated
@ -38,8 +38,7 @@
|
|||||||
"description": "APIGroup contains the name, the supported versions, and the preferred version of a group.",
|
"description": "APIGroup contains the name, the supported versions, and the preferred version of a group.",
|
||||||
"required": [
|
"required": [
|
||||||
"name",
|
"name",
|
||||||
"versions",
|
"versions"
|
||||||
"serverAddressByClientCIDRs"
|
|
||||||
],
|
],
|
||||||
"properties": {
|
"properties": {
|
||||||
"kind": {
|
"kind": {
|
||||||
|
3
api/swagger-spec/certificates.k8s.io.json
generated
3
api/swagger-spec/certificates.k8s.io.json
generated
@ -38,8 +38,7 @@
|
|||||||
"description": "APIGroup contains the name, the supported versions, and the preferred version of a group.",
|
"description": "APIGroup contains the name, the supported versions, and the preferred version of a group.",
|
||||||
"required": [
|
"required": [
|
||||||
"name",
|
"name",
|
||||||
"versions",
|
"versions"
|
||||||
"serverAddressByClientCIDRs"
|
|
||||||
],
|
],
|
||||||
"properties": {
|
"properties": {
|
||||||
"kind": {
|
"kind": {
|
||||||
|
3
api/swagger-spec/events.k8s.io.json
generated
3
api/swagger-spec/events.k8s.io.json
generated
@ -38,8 +38,7 @@
|
|||||||
"description": "APIGroup contains the name, the supported versions, and the preferred version of a group.",
|
"description": "APIGroup contains the name, the supported versions, and the preferred version of a group.",
|
||||||
"required": [
|
"required": [
|
||||||
"name",
|
"name",
|
||||||
"versions",
|
"versions"
|
||||||
"serverAddressByClientCIDRs"
|
|
||||||
],
|
],
|
||||||
"properties": {
|
"properties": {
|
||||||
"kind": {
|
"kind": {
|
||||||
|
3
api/swagger-spec/extensions.json
generated
3
api/swagger-spec/extensions.json
generated
@ -38,8 +38,7 @@
|
|||||||
"description": "APIGroup contains the name, the supported versions, and the preferred version of a group.",
|
"description": "APIGroup contains the name, the supported versions, and the preferred version of a group.",
|
||||||
"required": [
|
"required": [
|
||||||
"name",
|
"name",
|
||||||
"versions",
|
"versions"
|
||||||
"serverAddressByClientCIDRs"
|
|
||||||
],
|
],
|
||||||
"properties": {
|
"properties": {
|
||||||
"kind": {
|
"kind": {
|
||||||
|
3
api/swagger-spec/networking.k8s.io.json
generated
3
api/swagger-spec/networking.k8s.io.json
generated
@ -38,8 +38,7 @@
|
|||||||
"description": "APIGroup contains the name, the supported versions, and the preferred version of a group.",
|
"description": "APIGroup contains the name, the supported versions, and the preferred version of a group.",
|
||||||
"required": [
|
"required": [
|
||||||
"name",
|
"name",
|
||||||
"versions",
|
"versions"
|
||||||
"serverAddressByClientCIDRs"
|
|
||||||
],
|
],
|
||||||
"properties": {
|
"properties": {
|
||||||
"kind": {
|
"kind": {
|
||||||
|
3
api/swagger-spec/policy.json
generated
3
api/swagger-spec/policy.json
generated
@ -38,8 +38,7 @@
|
|||||||
"description": "APIGroup contains the name, the supported versions, and the preferred version of a group.",
|
"description": "APIGroup contains the name, the supported versions, and the preferred version of a group.",
|
||||||
"required": [
|
"required": [
|
||||||
"name",
|
"name",
|
||||||
"versions",
|
"versions"
|
||||||
"serverAddressByClientCIDRs"
|
|
||||||
],
|
],
|
||||||
"properties": {
|
"properties": {
|
||||||
"kind": {
|
"kind": {
|
||||||
|
3
api/swagger-spec/rbac.authorization.k8s.io.json
generated
3
api/swagger-spec/rbac.authorization.k8s.io.json
generated
@ -38,8 +38,7 @@
|
|||||||
"description": "APIGroup contains the name, the supported versions, and the preferred version of a group.",
|
"description": "APIGroup contains the name, the supported versions, and the preferred version of a group.",
|
||||||
"required": [
|
"required": [
|
||||||
"name",
|
"name",
|
||||||
"versions",
|
"versions"
|
||||||
"serverAddressByClientCIDRs"
|
|
||||||
],
|
],
|
||||||
"properties": {
|
"properties": {
|
||||||
"kind": {
|
"kind": {
|
||||||
|
3
api/swagger-spec/scheduling.k8s.io.json
generated
3
api/swagger-spec/scheduling.k8s.io.json
generated
@ -38,8 +38,7 @@
|
|||||||
"description": "APIGroup contains the name, the supported versions, and the preferred version of a group.",
|
"description": "APIGroup contains the name, the supported versions, and the preferred version of a group.",
|
||||||
"required": [
|
"required": [
|
||||||
"name",
|
"name",
|
||||||
"versions",
|
"versions"
|
||||||
"serverAddressByClientCIDRs"
|
|
||||||
],
|
],
|
||||||
"properties": {
|
"properties": {
|
||||||
"kind": {
|
"kind": {
|
||||||
|
3
api/swagger-spec/settings.k8s.io.json
generated
3
api/swagger-spec/settings.k8s.io.json
generated
@ -38,8 +38,7 @@
|
|||||||
"description": "APIGroup contains the name, the supported versions, and the preferred version of a group.",
|
"description": "APIGroup contains the name, the supported versions, and the preferred version of a group.",
|
||||||
"required": [
|
"required": [
|
||||||
"name",
|
"name",
|
||||||
"versions",
|
"versions"
|
||||||
"serverAddressByClientCIDRs"
|
|
||||||
],
|
],
|
||||||
"properties": {
|
"properties": {
|
||||||
"kind": {
|
"kind": {
|
||||||
|
3
api/swagger-spec/storage.k8s.io.json
generated
3
api/swagger-spec/storage.k8s.io.json
generated
@ -38,8 +38,7 @@
|
|||||||
"description": "APIGroup contains the name, the supported versions, and the preferred version of a group.",
|
"description": "APIGroup contains the name, the supported versions, and the preferred version of a group.",
|
||||||
"required": [
|
"required": [
|
||||||
"name",
|
"name",
|
||||||
"versions",
|
"versions"
|
||||||
"serverAddressByClientCIDRs"
|
|
||||||
],
|
],
|
||||||
"properties": {
|
"properties": {
|
||||||
"kind": {
|
"kind": {
|
||||||
|
@ -49,6 +49,7 @@ message APIGroup {
|
|||||||
// The server returns only those CIDRs that it thinks that the client can match.
|
// 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.
|
// 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.
|
// 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;
|
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.
|
// 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.
|
// 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.
|
// 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.
|
// ServerAddressByClientCIDR helps the client to determine the server address that they should use, depending on the clientCIDR that they match.
|
||||||
|
Loading…
Reference in New Issue
Block a user