mirror of https://github.com/k3s-io/k3s
Merge pull request #44929 from liggitt/proxy-subresource-patch
Automatic merge from submit-queue (batch tested with PRs 41106, 44346, 44929, 44979, 45027) Add PATCH to supported list of proxy subresource verbs Follow up to #41421 for the proxy subresources ```release-note The proxy subresource APIs for nodes, services, and pods now support the HTTP PATCH method. ```pull/6/head
commit
6251ff47c3
|
@ -4013,6 +4013,33 @@
|
|||
}
|
||||
}
|
||||
},
|
||||
"patch": {
|
||||
"description": "connect PATCH requests to proxy of Pod",
|
||||
"consumes": [
|
||||
"*/*"
|
||||
],
|
||||
"produces": [
|
||||
"*/*"
|
||||
],
|
||||
"schemes": [
|
||||
"https"
|
||||
],
|
||||
"tags": [
|
||||
"core_v1"
|
||||
],
|
||||
"operationId": "connectCoreV1PatchNamespacedPodProxy",
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "OK",
|
||||
"schema": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"401": {
|
||||
"description": "Unauthorized"
|
||||
}
|
||||
}
|
||||
},
|
||||
"parameters": [
|
||||
{
|
||||
"uniqueItems": true,
|
||||
|
@ -4202,6 +4229,33 @@
|
|||
}
|
||||
}
|
||||
},
|
||||
"patch": {
|
||||
"description": "connect PATCH requests to proxy of Pod",
|
||||
"consumes": [
|
||||
"*/*"
|
||||
],
|
||||
"produces": [
|
||||
"*/*"
|
||||
],
|
||||
"schemes": [
|
||||
"https"
|
||||
],
|
||||
"tags": [
|
||||
"core_v1"
|
||||
],
|
||||
"operationId": "connectCoreV1PatchNamespacedPodProxyWithPath",
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "OK",
|
||||
"schema": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"401": {
|
||||
"description": "Unauthorized"
|
||||
}
|
||||
}
|
||||
},
|
||||
"parameters": [
|
||||
{
|
||||
"uniqueItems": true,
|
||||
|
@ -7270,6 +7324,33 @@
|
|||
}
|
||||
}
|
||||
},
|
||||
"patch": {
|
||||
"description": "connect PATCH requests to proxy of Service",
|
||||
"consumes": [
|
||||
"*/*"
|
||||
],
|
||||
"produces": [
|
||||
"*/*"
|
||||
],
|
||||
"schemes": [
|
||||
"https"
|
||||
],
|
||||
"tags": [
|
||||
"core_v1"
|
||||
],
|
||||
"operationId": "connectCoreV1PatchNamespacedServiceProxy",
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "OK",
|
||||
"schema": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"401": {
|
||||
"description": "Unauthorized"
|
||||
}
|
||||
}
|
||||
},
|
||||
"parameters": [
|
||||
{
|
||||
"uniqueItems": true,
|
||||
|
@ -7459,6 +7540,33 @@
|
|||
}
|
||||
}
|
||||
},
|
||||
"patch": {
|
||||
"description": "connect PATCH requests to proxy of Service",
|
||||
"consumes": [
|
||||
"*/*"
|
||||
],
|
||||
"produces": [
|
||||
"*/*"
|
||||
],
|
||||
"schemes": [
|
||||
"https"
|
||||
],
|
||||
"tags": [
|
||||
"core_v1"
|
||||
],
|
||||
"operationId": "connectCoreV1PatchNamespacedServiceProxyWithPath",
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "OK",
|
||||
"schema": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"401": {
|
||||
"description": "Unauthorized"
|
||||
}
|
||||
}
|
||||
},
|
||||
"parameters": [
|
||||
{
|
||||
"uniqueItems": true,
|
||||
|
@ -8570,6 +8678,33 @@
|
|||
}
|
||||
}
|
||||
},
|
||||
"patch": {
|
||||
"description": "connect PATCH requests to proxy of Node",
|
||||
"consumes": [
|
||||
"*/*"
|
||||
],
|
||||
"produces": [
|
||||
"*/*"
|
||||
],
|
||||
"schemes": [
|
||||
"https"
|
||||
],
|
||||
"tags": [
|
||||
"core_v1"
|
||||
],
|
||||
"operationId": "connectCoreV1PatchNodeProxy",
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "OK",
|
||||
"schema": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"401": {
|
||||
"description": "Unauthorized"
|
||||
}
|
||||
}
|
||||
},
|
||||
"parameters": [
|
||||
{
|
||||
"uniqueItems": true,
|
||||
|
@ -8751,6 +8886,33 @@
|
|||
}
|
||||
}
|
||||
},
|
||||
"patch": {
|
||||
"description": "connect PATCH requests to proxy of Node",
|
||||
"consumes": [
|
||||
"*/*"
|
||||
],
|
||||
"produces": [
|
||||
"*/*"
|
||||
],
|
||||
"schemes": [
|
||||
"https"
|
||||
],
|
||||
"tags": [
|
||||
"core_v1"
|
||||
],
|
||||
"operationId": "connectCoreV1PatchNodeProxyWithPath",
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "OK",
|
||||
"schema": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"401": {
|
||||
"description": "Unauthorized"
|
||||
}
|
||||
}
|
||||
},
|
||||
"parameters": [
|
||||
{
|
||||
"uniqueItems": true,
|
||||
|
|
|
@ -5267,6 +5267,36 @@
|
|||
"*/*"
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "string",
|
||||
"method": "PATCH",
|
||||
"summary": "connect PATCH requests to proxy of Node",
|
||||
"nickname": "connectPatchNodeProxy",
|
||||
"parameters": [
|
||||
{
|
||||
"type": "string",
|
||||
"paramType": "query",
|
||||
"name": "path",
|
||||
"description": "Path is the URL path to use for the current proxy request to node.",
|
||||
"required": false,
|
||||
"allowMultiple": false
|
||||
},
|
||||
{
|
||||
"type": "string",
|
||||
"paramType": "path",
|
||||
"name": "name",
|
||||
"description": "name of the Node",
|
||||
"required": true,
|
||||
"allowMultiple": false
|
||||
}
|
||||
],
|
||||
"produces": [
|
||||
"*/*"
|
||||
],
|
||||
"consumes": [
|
||||
"*/*"
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "string",
|
||||
"method": "DELETE",
|
||||
|
@ -5477,6 +5507,44 @@
|
|||
"*/*"
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "string",
|
||||
"method": "PATCH",
|
||||
"summary": "connect PATCH requests to proxy of Node",
|
||||
"nickname": "connectPatchNodeProxyWithPath",
|
||||
"parameters": [
|
||||
{
|
||||
"type": "string",
|
||||
"paramType": "query",
|
||||
"name": "path",
|
||||
"description": "Path is the URL path to use for the current proxy request to node.",
|
||||
"required": false,
|
||||
"allowMultiple": false
|
||||
},
|
||||
{
|
||||
"type": "string",
|
||||
"paramType": "path",
|
||||
"name": "name",
|
||||
"description": "name of the Node",
|
||||
"required": true,
|
||||
"allowMultiple": false
|
||||
},
|
||||
{
|
||||
"type": "string",
|
||||
"paramType": "path",
|
||||
"name": "path",
|
||||
"description": "path to the resource",
|
||||
"required": true,
|
||||
"allowMultiple": false
|
||||
}
|
||||
],
|
||||
"produces": [
|
||||
"*/*"
|
||||
],
|
||||
"consumes": [
|
||||
"*/*"
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "string",
|
||||
"method": "DELETE",
|
||||
|
@ -9477,6 +9545,44 @@
|
|||
"*/*"
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "string",
|
||||
"method": "PATCH",
|
||||
"summary": "connect PATCH requests to proxy of Pod",
|
||||
"nickname": "connectPatchNamespacedPodProxy",
|
||||
"parameters": [
|
||||
{
|
||||
"type": "string",
|
||||
"paramType": "query",
|
||||
"name": "path",
|
||||
"description": "Path is the URL path to use for the current proxy request to pod.",
|
||||
"required": false,
|
||||
"allowMultiple": false
|
||||
},
|
||||
{
|
||||
"type": "string",
|
||||
"paramType": "path",
|
||||
"name": "namespace",
|
||||
"description": "object name and auth scope, such as for teams and projects",
|
||||
"required": true,
|
||||
"allowMultiple": false
|
||||
},
|
||||
{
|
||||
"type": "string",
|
||||
"paramType": "path",
|
||||
"name": "name",
|
||||
"description": "name of the Pod",
|
||||
"required": true,
|
||||
"allowMultiple": false
|
||||
}
|
||||
],
|
||||
"produces": [
|
||||
"*/*"
|
||||
],
|
||||
"consumes": [
|
||||
"*/*"
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "string",
|
||||
"method": "DELETE",
|
||||
|
@ -9735,6 +9841,52 @@
|
|||
"*/*"
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "string",
|
||||
"method": "PATCH",
|
||||
"summary": "connect PATCH requests to proxy of Pod",
|
||||
"nickname": "connectPatchNamespacedPodProxyWithPath",
|
||||
"parameters": [
|
||||
{
|
||||
"type": "string",
|
||||
"paramType": "query",
|
||||
"name": "path",
|
||||
"description": "Path is the URL path to use for the current proxy request to pod.",
|
||||
"required": false,
|
||||
"allowMultiple": false
|
||||
},
|
||||
{
|
||||
"type": "string",
|
||||
"paramType": "path",
|
||||
"name": "namespace",
|
||||
"description": "object name and auth scope, such as for teams and projects",
|
||||
"required": true,
|
||||
"allowMultiple": false
|
||||
},
|
||||
{
|
||||
"type": "string",
|
||||
"paramType": "path",
|
||||
"name": "name",
|
||||
"description": "name of the Pod",
|
||||
"required": true,
|
||||
"allowMultiple": false
|
||||
},
|
||||
{
|
||||
"type": "string",
|
||||
"paramType": "path",
|
||||
"name": "path",
|
||||
"description": "path to the resource",
|
||||
"required": true,
|
||||
"allowMultiple": false
|
||||
}
|
||||
],
|
||||
"produces": [
|
||||
"*/*"
|
||||
],
|
||||
"consumes": [
|
||||
"*/*"
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "string",
|
||||
"method": "DELETE",
|
||||
|
@ -15908,6 +16060,44 @@
|
|||
"*/*"
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "string",
|
||||
"method": "PATCH",
|
||||
"summary": "connect PATCH requests to proxy of Service",
|
||||
"nickname": "connectPatchNamespacedServiceProxy",
|
||||
"parameters": [
|
||||
{
|
||||
"type": "string",
|
||||
"paramType": "query",
|
||||
"name": "path",
|
||||
"description": "Path is the part of URLs that include service endpoints, suffixes, and parameters to use for the current proxy request to service. For example, the whole request URL is http://localhost/api/v1/namespaces/kube-system/services/elasticsearch-logging/_search?q=user:kimchy. Path is _search?q=user:kimchy.",
|
||||
"required": false,
|
||||
"allowMultiple": false
|
||||
},
|
||||
{
|
||||
"type": "string",
|
||||
"paramType": "path",
|
||||
"name": "namespace",
|
||||
"description": "object name and auth scope, such as for teams and projects",
|
||||
"required": true,
|
||||
"allowMultiple": false
|
||||
},
|
||||
{
|
||||
"type": "string",
|
||||
"paramType": "path",
|
||||
"name": "name",
|
||||
"description": "name of the Service",
|
||||
"required": true,
|
||||
"allowMultiple": false
|
||||
}
|
||||
],
|
||||
"produces": [
|
||||
"*/*"
|
||||
],
|
||||
"consumes": [
|
||||
"*/*"
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "string",
|
||||
"method": "DELETE",
|
||||
|
@ -16166,6 +16356,52 @@
|
|||
"*/*"
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "string",
|
||||
"method": "PATCH",
|
||||
"summary": "connect PATCH requests to proxy of Service",
|
||||
"nickname": "connectPatchNamespacedServiceProxyWithPath",
|
||||
"parameters": [
|
||||
{
|
||||
"type": "string",
|
||||
"paramType": "query",
|
||||
"name": "path",
|
||||
"description": "Path is the part of URLs that include service endpoints, suffixes, and parameters to use for the current proxy request to service. For example, the whole request URL is http://localhost/api/v1/namespaces/kube-system/services/elasticsearch-logging/_search?q=user:kimchy. Path is _search?q=user:kimchy.",
|
||||
"required": false,
|
||||
"allowMultiple": false
|
||||
},
|
||||
{
|
||||
"type": "string",
|
||||
"paramType": "path",
|
||||
"name": "namespace",
|
||||
"description": "object name and auth scope, such as for teams and projects",
|
||||
"required": true,
|
||||
"allowMultiple": false
|
||||
},
|
||||
{
|
||||
"type": "string",
|
||||
"paramType": "path",
|
||||
"name": "name",
|
||||
"description": "name of the Service",
|
||||
"required": true,
|
||||
"allowMultiple": false
|
||||
},
|
||||
{
|
||||
"type": "string",
|
||||
"paramType": "path",
|
||||
"name": "path",
|
||||
"description": "path to the resource",
|
||||
"required": true,
|
||||
"allowMultiple": false
|
||||
}
|
||||
],
|
||||
"produces": [
|
||||
"*/*"
|
||||
],
|
||||
"consumes": [
|
||||
"*/*"
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "string",
|
||||
"method": "DELETE",
|
||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -43,7 +43,7 @@ type ProxyREST struct {
|
|||
// Implement Connecter
|
||||
var _ = rest.Connecter(&ProxyREST{})
|
||||
|
||||
var proxyMethods = []string{"GET", "POST", "PUT", "DELETE", "HEAD", "OPTIONS"}
|
||||
var proxyMethods = []string{"GET", "POST", "PUT", "PATCH", "DELETE", "HEAD", "OPTIONS"}
|
||||
|
||||
// New returns an empty service resource
|
||||
func (r *ProxyREST) New() runtime.Object {
|
||||
|
|
|
@ -42,7 +42,7 @@ type ProxyREST struct {
|
|||
// Implement Connecter
|
||||
var _ = rest.Connecter(&ProxyREST{})
|
||||
|
||||
var proxyMethods = []string{"GET", "POST", "PUT", "DELETE", "HEAD", "OPTIONS"}
|
||||
var proxyMethods = []string{"GET", "POST", "PUT", "PATCH", "DELETE", "HEAD", "OPTIONS"}
|
||||
|
||||
// New returns an empty pod resource
|
||||
func (r *ProxyREST) New() runtime.Object {
|
||||
|
|
|
@ -39,7 +39,7 @@ type ProxyREST struct {
|
|||
// Implement Connecter
|
||||
var _ = rest.Connecter(&ProxyREST{})
|
||||
|
||||
var proxyMethods = []string{"GET", "POST", "PUT", "DELETE", "HEAD", "OPTIONS"}
|
||||
var proxyMethods = []string{"GET", "POST", "PUT", "PATCH", "DELETE", "HEAD", "OPTIONS"}
|
||||
|
||||
// New returns an empty service resource
|
||||
func (r *ProxyREST) New() runtime.Object {
|
||||
|
|
Loading…
Reference in New Issue