diff --git a/api/openapi-spec/swagger.json b/api/openapi-spec/swagger.json index e232aecd69..5c5acb0728 100644 --- a/api/openapi-spec/swagger.json +++ b/api/openapi-spec/swagger.json @@ -74409,6 +74409,688 @@ } ] }, + "/apis/storage.k8s.io/v1/volumeattachments": { + "get": { + "description": "list or watch objects of kind VolumeAttachment", + "consumes": [ + "*/*" + ], + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf", + "application/json;stream=watch", + "application/vnd.kubernetes.protobuf;stream=watch" + ], + "schemes": [ + "https" + ], + "tags": [ + "storage_v1" + ], + "operationId": "listStorageV1VolumeAttachment", + "parameters": [ + { + "uniqueItems": true, + "type": "string", + "description": "The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\".\n\nThis field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.", + "name": "continue", + "in": "query" + }, + { + "uniqueItems": true, + "type": "string", + "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", + "name": "fieldSelector", + "in": "query" + }, + { + "uniqueItems": true, + "type": "string", + "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", + "name": "labelSelector", + "in": "query" + }, + { + "uniqueItems": true, + "type": "integer", + "description": "limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true.\n\nThe server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.", + "name": "limit", + "in": "query" + }, + { + "uniqueItems": true, + "type": "string", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", + "name": "resourceVersion", + "in": "query" + }, + { + "uniqueItems": true, + "type": "integer", + "description": "Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.", + "name": "timeoutSeconds", + "in": "query" + }, + { + "uniqueItems": true, + "type": "boolean", + "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", + "name": "watch", + "in": "query" + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/io.k8s.api.storage.v1.VolumeAttachmentList" + } + }, + "401": { + "description": "Unauthorized" + } + }, + "x-kubernetes-action": "list", + "x-kubernetes-group-version-kind": { + "group": "storage.k8s.io", + "kind": "VolumeAttachment", + "version": "v1" + } + }, + "post": { + "description": "create a VolumeAttachment", + "consumes": [ + "*/*" + ], + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf" + ], + "schemes": [ + "https" + ], + "tags": [ + "storage_v1" + ], + "operationId": "createStorageV1VolumeAttachment", + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/io.k8s.api.storage.v1.VolumeAttachment" + } + }, + { + "uniqueItems": true, + "type": "string", + "description": "When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed", + "name": "dryRun", + "in": "query" + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/io.k8s.api.storage.v1.VolumeAttachment" + } + }, + "201": { + "description": "Created", + "schema": { + "$ref": "#/definitions/io.k8s.api.storage.v1.VolumeAttachment" + } + }, + "202": { + "description": "Accepted", + "schema": { + "$ref": "#/definitions/io.k8s.api.storage.v1.VolumeAttachment" + } + }, + "401": { + "description": "Unauthorized" + } + }, + "x-kubernetes-action": "post", + "x-kubernetes-group-version-kind": { + "group": "storage.k8s.io", + "kind": "VolumeAttachment", + "version": "v1" + } + }, + "delete": { + "description": "delete collection of VolumeAttachment", + "consumes": [ + "*/*" + ], + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf" + ], + "schemes": [ + "https" + ], + "tags": [ + "storage_v1" + ], + "operationId": "deleteStorageV1CollectionVolumeAttachment", + "parameters": [ + { + "uniqueItems": true, + "type": "string", + "description": "The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\".\n\nThis field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.", + "name": "continue", + "in": "query" + }, + { + "uniqueItems": true, + "type": "string", + "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", + "name": "fieldSelector", + "in": "query" + }, + { + "uniqueItems": true, + "type": "string", + "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", + "name": "labelSelector", + "in": "query" + }, + { + "uniqueItems": true, + "type": "integer", + "description": "limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true.\n\nThe server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.", + "name": "limit", + "in": "query" + }, + { + "uniqueItems": true, + "type": "string", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", + "name": "resourceVersion", + "in": "query" + }, + { + "uniqueItems": true, + "type": "integer", + "description": "Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.", + "name": "timeoutSeconds", + "in": "query" + }, + { + "uniqueItems": true, + "type": "boolean", + "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", + "name": "watch", + "in": "query" + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.Status" + } + }, + "401": { + "description": "Unauthorized" + } + }, + "x-kubernetes-action": "deletecollection", + "x-kubernetes-group-version-kind": { + "group": "storage.k8s.io", + "kind": "VolumeAttachment", + "version": "v1" + } + }, + "parameters": [ + { + "uniqueItems": true, + "type": "boolean", + "description": "If true, partially initialized resources are included in the response.", + "name": "includeUninitialized", + "in": "query" + }, + { + "uniqueItems": true, + "type": "string", + "description": "If 'true', then the output is pretty printed.", + "name": "pretty", + "in": "query" + } + ] + }, + "/apis/storage.k8s.io/v1/volumeattachments/{name}": { + "get": { + "description": "read the specified VolumeAttachment", + "consumes": [ + "*/*" + ], + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf" + ], + "schemes": [ + "https" + ], + "tags": [ + "storage_v1" + ], + "operationId": "readStorageV1VolumeAttachment", + "parameters": [ + { + "uniqueItems": true, + "type": "boolean", + "description": "Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'.", + "name": "exact", + "in": "query" + }, + { + "uniqueItems": true, + "type": "boolean", + "description": "Should this value be exported. Export strips fields that a user can not specify.", + "name": "export", + "in": "query" + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/io.k8s.api.storage.v1.VolumeAttachment" + } + }, + "401": { + "description": "Unauthorized" + } + }, + "x-kubernetes-action": "get", + "x-kubernetes-group-version-kind": { + "group": "storage.k8s.io", + "kind": "VolumeAttachment", + "version": "v1" + } + }, + "put": { + "description": "replace the specified VolumeAttachment", + "consumes": [ + "*/*" + ], + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf" + ], + "schemes": [ + "https" + ], + "tags": [ + "storage_v1" + ], + "operationId": "replaceStorageV1VolumeAttachment", + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/io.k8s.api.storage.v1.VolumeAttachment" + } + }, + { + "uniqueItems": true, + "type": "string", + "description": "When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed", + "name": "dryRun", + "in": "query" + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/io.k8s.api.storage.v1.VolumeAttachment" + } + }, + "201": { + "description": "Created", + "schema": { + "$ref": "#/definitions/io.k8s.api.storage.v1.VolumeAttachment" + } + }, + "401": { + "description": "Unauthorized" + } + }, + "x-kubernetes-action": "put", + "x-kubernetes-group-version-kind": { + "group": "storage.k8s.io", + "kind": "VolumeAttachment", + "version": "v1" + } + }, + "delete": { + "description": "delete a VolumeAttachment", + "consumes": [ + "*/*" + ], + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf" + ], + "schemes": [ + "https" + ], + "tags": [ + "storage_v1" + ], + "operationId": "deleteStorageV1VolumeAttachment", + "parameters": [ + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.DeleteOptions" + } + }, + { + "uniqueItems": true, + "type": "string", + "description": "When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed", + "name": "dryRun", + "in": "query" + }, + { + "uniqueItems": true, + "type": "integer", + "description": "The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately.", + "name": "gracePeriodSeconds", + "in": "query" + }, + { + "uniqueItems": true, + "type": "boolean", + "description": "Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both.", + "name": "orphanDependents", + "in": "query" + }, + { + "uniqueItems": true, + "type": "string", + "description": "Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground.", + "name": "propagationPolicy", + "in": "query" + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.Status" + } + }, + "202": { + "description": "Accepted", + "schema": { + "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.Status" + } + }, + "401": { + "description": "Unauthorized" + } + }, + "x-kubernetes-action": "delete", + "x-kubernetes-group-version-kind": { + "group": "storage.k8s.io", + "kind": "VolumeAttachment", + "version": "v1" + } + }, + "patch": { + "description": "partially update the specified VolumeAttachment", + "consumes": [ + "application/json-patch+json", + "application/merge-patch+json", + "application/strategic-merge-patch+json" + ], + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf" + ], + "schemes": [ + "https" + ], + "tags": [ + "storage_v1" + ], + "operationId": "patchStorageV1VolumeAttachment", + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.Patch" + } + }, + { + "uniqueItems": true, + "type": "string", + "description": "When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed", + "name": "dryRun", + "in": "query" + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/io.k8s.api.storage.v1.VolumeAttachment" + } + }, + "401": { + "description": "Unauthorized" + } + }, + "x-kubernetes-action": "patch", + "x-kubernetes-group-version-kind": { + "group": "storage.k8s.io", + "kind": "VolumeAttachment", + "version": "v1" + } + }, + "parameters": [ + { + "uniqueItems": true, + "type": "string", + "description": "name of the VolumeAttachment", + "name": "name", + "in": "path", + "required": true + }, + { + "uniqueItems": true, + "type": "string", + "description": "If 'true', then the output is pretty printed.", + "name": "pretty", + "in": "query" + } + ] + }, + "/apis/storage.k8s.io/v1/volumeattachments/{name}/status": { + "get": { + "description": "read status of the specified VolumeAttachment", + "consumes": [ + "*/*" + ], + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf" + ], + "schemes": [ + "https" + ], + "tags": [ + "storage_v1" + ], + "operationId": "readStorageV1VolumeAttachmentStatus", + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/io.k8s.api.storage.v1.VolumeAttachment" + } + }, + "401": { + "description": "Unauthorized" + } + }, + "x-kubernetes-action": "get", + "x-kubernetes-group-version-kind": { + "group": "storage.k8s.io", + "kind": "VolumeAttachment", + "version": "v1" + } + }, + "put": { + "description": "replace status of the specified VolumeAttachment", + "consumes": [ + "*/*" + ], + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf" + ], + "schemes": [ + "https" + ], + "tags": [ + "storage_v1" + ], + "operationId": "replaceStorageV1VolumeAttachmentStatus", + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/io.k8s.api.storage.v1.VolumeAttachment" + } + }, + { + "uniqueItems": true, + "type": "string", + "description": "When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed", + "name": "dryRun", + "in": "query" + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/io.k8s.api.storage.v1.VolumeAttachment" + } + }, + "201": { + "description": "Created", + "schema": { + "$ref": "#/definitions/io.k8s.api.storage.v1.VolumeAttachment" + } + }, + "401": { + "description": "Unauthorized" + } + }, + "x-kubernetes-action": "put", + "x-kubernetes-group-version-kind": { + "group": "storage.k8s.io", + "kind": "VolumeAttachment", + "version": "v1" + } + }, + "patch": { + "description": "partially update status of the specified VolumeAttachment", + "consumes": [ + "application/json-patch+json", + "application/merge-patch+json", + "application/strategic-merge-patch+json" + ], + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf" + ], + "schemes": [ + "https" + ], + "tags": [ + "storage_v1" + ], + "operationId": "patchStorageV1VolumeAttachmentStatus", + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.Patch" + } + }, + { + "uniqueItems": true, + "type": "string", + "description": "When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed", + "name": "dryRun", + "in": "query" + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/io.k8s.api.storage.v1.VolumeAttachment" + } + }, + "401": { + "description": "Unauthorized" + } + }, + "x-kubernetes-action": "patch", + "x-kubernetes-group-version-kind": { + "group": "storage.k8s.io", + "kind": "VolumeAttachment", + "version": "v1" + } + }, + "parameters": [ + { + "uniqueItems": true, + "type": "string", + "description": "name of the VolumeAttachment", + "name": "name", + "in": "path", + "required": true + }, + { + "uniqueItems": true, + "type": "string", + "description": "If 'true', then the output is pretty printed.", + "name": "pretty", + "in": "query" + } + ] + }, "/apis/storage.k8s.io/v1/watch/storageclasses": { "get": { "description": "watch individual changes to a list of StorageClass. deprecated: use the 'watch' parameter with a list operation instead.", @@ -74625,6 +75307,222 @@ } ] }, + "/apis/storage.k8s.io/v1/watch/volumeattachments": { + "get": { + "description": "watch individual changes to a list of VolumeAttachment. deprecated: use the 'watch' parameter with a list operation instead.", + "consumes": [ + "*/*" + ], + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf", + "application/json;stream=watch", + "application/vnd.kubernetes.protobuf;stream=watch" + ], + "schemes": [ + "https" + ], + "tags": [ + "storage_v1" + ], + "operationId": "watchStorageV1VolumeAttachmentList", + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.WatchEvent" + } + }, + "401": { + "description": "Unauthorized" + } + }, + "x-kubernetes-action": "watchlist", + "x-kubernetes-group-version-kind": { + "group": "storage.k8s.io", + "kind": "VolumeAttachment", + "version": "v1" + } + }, + "parameters": [ + { + "uniqueItems": true, + "type": "string", + "description": "The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\".\n\nThis field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.", + "name": "continue", + "in": "query" + }, + { + "uniqueItems": true, + "type": "string", + "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", + "name": "fieldSelector", + "in": "query" + }, + { + "uniqueItems": true, + "type": "boolean", + "description": "If true, partially initialized resources are included in the response.", + "name": "includeUninitialized", + "in": "query" + }, + { + "uniqueItems": true, + "type": "string", + "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", + "name": "labelSelector", + "in": "query" + }, + { + "uniqueItems": true, + "type": "integer", + "description": "limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true.\n\nThe server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.", + "name": "limit", + "in": "query" + }, + { + "uniqueItems": true, + "type": "string", + "description": "If 'true', then the output is pretty printed.", + "name": "pretty", + "in": "query" + }, + { + "uniqueItems": true, + "type": "string", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", + "name": "resourceVersion", + "in": "query" + }, + { + "uniqueItems": true, + "type": "integer", + "description": "Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.", + "name": "timeoutSeconds", + "in": "query" + }, + { + "uniqueItems": true, + "type": "boolean", + "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", + "name": "watch", + "in": "query" + } + ] + }, + "/apis/storage.k8s.io/v1/watch/volumeattachments/{name}": { + "get": { + "description": "watch changes to an object of kind VolumeAttachment. deprecated: use the 'watch' parameter with a list operation instead, filtered to a single item with the 'fieldSelector' parameter.", + "consumes": [ + "*/*" + ], + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf", + "application/json;stream=watch", + "application/vnd.kubernetes.protobuf;stream=watch" + ], + "schemes": [ + "https" + ], + "tags": [ + "storage_v1" + ], + "operationId": "watchStorageV1VolumeAttachment", + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.WatchEvent" + } + }, + "401": { + "description": "Unauthorized" + } + }, + "x-kubernetes-action": "watch", + "x-kubernetes-group-version-kind": { + "group": "storage.k8s.io", + "kind": "VolumeAttachment", + "version": "v1" + } + }, + "parameters": [ + { + "uniqueItems": true, + "type": "string", + "description": "The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\".\n\nThis field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.", + "name": "continue", + "in": "query" + }, + { + "uniqueItems": true, + "type": "string", + "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", + "name": "fieldSelector", + "in": "query" + }, + { + "uniqueItems": true, + "type": "boolean", + "description": "If true, partially initialized resources are included in the response.", + "name": "includeUninitialized", + "in": "query" + }, + { + "uniqueItems": true, + "type": "string", + "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", + "name": "labelSelector", + "in": "query" + }, + { + "uniqueItems": true, + "type": "integer", + "description": "limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true.\n\nThe server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.", + "name": "limit", + "in": "query" + }, + { + "uniqueItems": true, + "type": "string", + "description": "name of the VolumeAttachment", + "name": "name", + "in": "path", + "required": true + }, + { + "uniqueItems": true, + "type": "string", + "description": "If 'true', then the output is pretty printed.", + "name": "pretty", + "in": "query" + }, + { + "uniqueItems": true, + "type": "string", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", + "name": "resourceVersion", + "in": "query" + }, + { + "uniqueItems": true, + "type": "integer", + "description": "Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.", + "name": "timeoutSeconds", + "in": "query" + }, + { + "uniqueItems": true, + "type": "boolean", + "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", + "name": "watch", + "in": "query" + } + ] + }, "/apis/storage.k8s.io/v1alpha1/": { "get": { "description": "get available resources", @@ -91435,6 +92333,146 @@ } ] }, + "io.k8s.api.storage.v1.VolumeAttachment": { + "description": "VolumeAttachment captures the intent to attach or detach the specified volume to/from the specified node.\n\nVolumeAttachment objects are non-namespaced.", + "required": [ + "spec" + ], + "properties": { + "apiVersion": { + "description": "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#resources", + "type": "string" + }, + "kind": { + "description": "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds", + "type": "string" + }, + "metadata": { + "description": "Standard object metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata", + "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta" + }, + "spec": { + "description": "Specification of the desired attach/detach volume behavior. Populated by the Kubernetes system.", + "$ref": "#/definitions/io.k8s.api.storage.v1.VolumeAttachmentSpec" + }, + "status": { + "description": "Status of the VolumeAttachment request. Populated by the entity completing the attach or detach operation, i.e. the external-attacher.", + "$ref": "#/definitions/io.k8s.api.storage.v1.VolumeAttachmentStatus" + } + }, + "x-kubernetes-group-version-kind": [ + { + "group": "storage.k8s.io", + "kind": "VolumeAttachment", + "version": "v1" + } + ] + }, + "io.k8s.api.storage.v1.VolumeAttachmentList": { + "description": "VolumeAttachmentList is a collection of VolumeAttachment objects.", + "required": [ + "items" + ], + "properties": { + "apiVersion": { + "description": "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#resources", + "type": "string" + }, + "items": { + "description": "Items is the list of VolumeAttachments", + "type": "array", + "items": { + "$ref": "#/definitions/io.k8s.api.storage.v1.VolumeAttachment" + } + }, + "kind": { + "description": "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds", + "type": "string" + }, + "metadata": { + "description": "Standard list metadata More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata", + "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.ListMeta" + } + }, + "x-kubernetes-group-version-kind": [ + { + "group": "storage.k8s.io", + "kind": "VolumeAttachmentList", + "version": "v1" + } + ] + }, + "io.k8s.api.storage.v1.VolumeAttachmentSource": { + "description": "VolumeAttachmentSource represents a volume that should be attached. Right now only PersistenVolumes can be attached via external attacher, in future we may allow also inline volumes in pods. Exactly one member can be set.", + "properties": { + "persistentVolumeName": { + "description": "Name of the persistent volume to attach.", + "type": "string" + } + } + }, + "io.k8s.api.storage.v1.VolumeAttachmentSpec": { + "description": "VolumeAttachmentSpec is the specification of a VolumeAttachment request.", + "required": [ + "attacher", + "source", + "nodeName" + ], + "properties": { + "attacher": { + "description": "Attacher indicates the name of the volume driver that MUST handle this request. This is the name returned by GetPluginName().", + "type": "string" + }, + "nodeName": { + "description": "The node that the volume should be attached to.", + "type": "string" + }, + "source": { + "description": "Source represents the volume that should be attached.", + "$ref": "#/definitions/io.k8s.api.storage.v1.VolumeAttachmentSource" + } + } + }, + "io.k8s.api.storage.v1.VolumeAttachmentStatus": { + "description": "VolumeAttachmentStatus is the status of a VolumeAttachment request.", + "required": [ + "attached" + ], + "properties": { + "attachError": { + "description": "The last error encountered during attach operation, if any. This field must only be set by the entity completing the attach operation, i.e. the external-attacher.", + "$ref": "#/definitions/io.k8s.api.storage.v1.VolumeError" + }, + "attached": { + "description": "Indicates the volume is successfully attached. This field must only be set by the entity completing the attach operation, i.e. the external-attacher.", + "type": "boolean" + }, + "attachmentMetadata": { + "description": "Upon successful attach, this field is populated with any information returned by the attach operation that must be passed into subsequent WaitForAttach or Mount calls. This field must only be set by the entity completing the attach operation, i.e. the external-attacher.", + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "detachError": { + "description": "The last error encountered during detach operation, if any. This field must only be set by the entity completing the detach operation, i.e. the external-attacher.", + "$ref": "#/definitions/io.k8s.api.storage.v1.VolumeError" + } + } + }, + "io.k8s.api.storage.v1.VolumeError": { + "description": "VolumeError captures an error encountered during a volume operation.", + "properties": { + "message": { + "description": "String detailing the error encountered during Attach or Detach operation. This string maybe logged, so it should not contain sensitive information.", + "type": "string" + }, + "time": { + "description": "Time the error was encountered.", + "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.Time" + } + } + }, "io.k8s.api.storage.v1alpha1.VolumeAttachment": { "description": "VolumeAttachment captures the intent to attach or detach the specified volume to/from the specified node.\n\nVolumeAttachment objects are non-namespaced.", "required": [ diff --git a/api/swagger-spec/storage.k8s.io_v1.json b/api/swagger-spec/storage.k8s.io_v1.json index 265b173984..23c9f051d7 100644 --- a/api/swagger-spec/storage.k8s.io_v1.json +++ b/api/swagger-spec/storage.k8s.io_v1.json @@ -747,6 +747,907 @@ } ] }, + { + "path": "/apis/storage.k8s.io/v1/volumeattachments", + "description": "API at /apis/storage.k8s.io/v1", + "operations": [ + { + "type": "v1.VolumeAttachmentList", + "method": "GET", + "summary": "list or watch objects of kind VolumeAttachment", + "nickname": "listVolumeAttachment", + "parameters": [ + { + "type": "string", + "paramType": "query", + "name": "pretty", + "description": "If 'true', then the output is pretty printed.", + "required": false, + "allowMultiple": false + }, + { + "type": "string", + "paramType": "query", + "name": "labelSelector", + "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", + "required": false, + "allowMultiple": false + }, + { + "type": "string", + "paramType": "query", + "name": "fieldSelector", + "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", + "required": false, + "allowMultiple": false + }, + { + "type": "boolean", + "paramType": "query", + "name": "includeUninitialized", + "description": "If true, partially initialized resources are included in the response.", + "required": false, + "allowMultiple": false + }, + { + "type": "boolean", + "paramType": "query", + "name": "watch", + "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", + "required": false, + "allowMultiple": false + }, + { + "type": "string", + "paramType": "query", + "name": "resourceVersion", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", + "required": false, + "allowMultiple": false + }, + { + "type": "integer", + "paramType": "query", + "name": "timeoutSeconds", + "description": "Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.", + "required": false, + "allowMultiple": false + }, + { + "type": "integer", + "paramType": "query", + "name": "limit", + "description": "limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true.\n\nThe server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.", + "required": false, + "allowMultiple": false + }, + { + "type": "string", + "paramType": "query", + "name": "continue", + "description": "The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\".\n\nThis field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.", + "required": false, + "allowMultiple": false + } + ], + "responseMessages": [ + { + "code": 200, + "message": "OK", + "responseModel": "v1.VolumeAttachmentList" + } + ], + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf", + "application/json;stream=watch", + "application/vnd.kubernetes.protobuf;stream=watch" + ], + "consumes": [ + "*/*" + ] + }, + { + "type": "v1.VolumeAttachment", + "method": "POST", + "summary": "create a VolumeAttachment", + "nickname": "createVolumeAttachment", + "parameters": [ + { + "type": "string", + "paramType": "query", + "name": "pretty", + "description": "If 'true', then the output is pretty printed.", + "required": false, + "allowMultiple": false + }, + { + "type": "v1.VolumeAttachment", + "paramType": "body", + "name": "body", + "description": "", + "required": true, + "allowMultiple": false + }, + { + "type": "string", + "paramType": "query", + "name": "dryRun", + "description": "When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed", + "required": false, + "allowMultiple": false + }, + { + "type": "boolean", + "paramType": "query", + "name": "includeUninitialized", + "description": "If IncludeUninitialized is specified, the object may be returned without completing initialization.", + "required": false, + "allowMultiple": false + } + ], + "responseMessages": [ + { + "code": 200, + "message": "OK", + "responseModel": "v1.VolumeAttachment" + }, + { + "code": 201, + "message": "Created", + "responseModel": "v1.VolumeAttachment" + }, + { + "code": 202, + "message": "Accepted", + "responseModel": "v1.VolumeAttachment" + } + ], + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf" + ], + "consumes": [ + "*/*" + ] + }, + { + "type": "v1.Status", + "method": "DELETE", + "summary": "delete collection of VolumeAttachment", + "nickname": "deletecollectionVolumeAttachment", + "parameters": [ + { + "type": "string", + "paramType": "query", + "name": "pretty", + "description": "If 'true', then the output is pretty printed.", + "required": false, + "allowMultiple": false + }, + { + "type": "string", + "paramType": "query", + "name": "labelSelector", + "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", + "required": false, + "allowMultiple": false + }, + { + "type": "string", + "paramType": "query", + "name": "fieldSelector", + "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", + "required": false, + "allowMultiple": false + }, + { + "type": "boolean", + "paramType": "query", + "name": "includeUninitialized", + "description": "If true, partially initialized resources are included in the response.", + "required": false, + "allowMultiple": false + }, + { + "type": "boolean", + "paramType": "query", + "name": "watch", + "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", + "required": false, + "allowMultiple": false + }, + { + "type": "string", + "paramType": "query", + "name": "resourceVersion", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", + "required": false, + "allowMultiple": false + }, + { + "type": "integer", + "paramType": "query", + "name": "timeoutSeconds", + "description": "Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.", + "required": false, + "allowMultiple": false + }, + { + "type": "integer", + "paramType": "query", + "name": "limit", + "description": "limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true.\n\nThe server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.", + "required": false, + "allowMultiple": false + }, + { + "type": "string", + "paramType": "query", + "name": "continue", + "description": "The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\".\n\nThis field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.", + "required": false, + "allowMultiple": false + } + ], + "responseMessages": [ + { + "code": 200, + "message": "OK", + "responseModel": "v1.Status" + } + ], + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf" + ], + "consumes": [ + "*/*" + ] + } + ] + }, + { + "path": "/apis/storage.k8s.io/v1/watch/volumeattachments", + "description": "API at /apis/storage.k8s.io/v1", + "operations": [ + { + "type": "v1.WatchEvent", + "method": "GET", + "summary": "watch individual changes to a list of VolumeAttachment. deprecated: use the 'watch' parameter with a list operation instead.", + "nickname": "watchVolumeAttachmentList", + "parameters": [ + { + "type": "string", + "paramType": "query", + "name": "pretty", + "description": "If 'true', then the output is pretty printed.", + "required": false, + "allowMultiple": false + }, + { + "type": "string", + "paramType": "query", + "name": "labelSelector", + "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", + "required": false, + "allowMultiple": false + }, + { + "type": "string", + "paramType": "query", + "name": "fieldSelector", + "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", + "required": false, + "allowMultiple": false + }, + { + "type": "boolean", + "paramType": "query", + "name": "includeUninitialized", + "description": "If true, partially initialized resources are included in the response.", + "required": false, + "allowMultiple": false + }, + { + "type": "boolean", + "paramType": "query", + "name": "watch", + "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", + "required": false, + "allowMultiple": false + }, + { + "type": "string", + "paramType": "query", + "name": "resourceVersion", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", + "required": false, + "allowMultiple": false + }, + { + "type": "integer", + "paramType": "query", + "name": "timeoutSeconds", + "description": "Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.", + "required": false, + "allowMultiple": false + }, + { + "type": "integer", + "paramType": "query", + "name": "limit", + "description": "limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true.\n\nThe server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.", + "required": false, + "allowMultiple": false + }, + { + "type": "string", + "paramType": "query", + "name": "continue", + "description": "The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\".\n\nThis field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.", + "required": false, + "allowMultiple": false + } + ], + "responseMessages": [ + { + "code": 200, + "message": "OK", + "responseModel": "v1.WatchEvent" + } + ], + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf", + "application/json;stream=watch", + "application/vnd.kubernetes.protobuf;stream=watch" + ], + "consumes": [ + "*/*" + ] + } + ] + }, + { + "path": "/apis/storage.k8s.io/v1/volumeattachments/{name}", + "description": "API at /apis/storage.k8s.io/v1", + "operations": [ + { + "type": "v1.VolumeAttachment", + "method": "GET", + "summary": "read the specified VolumeAttachment", + "nickname": "readVolumeAttachment", + "parameters": [ + { + "type": "string", + "paramType": "query", + "name": "pretty", + "description": "If 'true', then the output is pretty printed.", + "required": false, + "allowMultiple": false + }, + { + "type": "boolean", + "paramType": "query", + "name": "export", + "description": "Should this value be exported. Export strips fields that a user can not specify.", + "required": false, + "allowMultiple": false + }, + { + "type": "boolean", + "paramType": "query", + "name": "exact", + "description": "Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'.", + "required": false, + "allowMultiple": false + }, + { + "type": "string", + "paramType": "path", + "name": "name", + "description": "name of the VolumeAttachment", + "required": true, + "allowMultiple": false + } + ], + "responseMessages": [ + { + "code": 200, + "message": "OK", + "responseModel": "v1.VolumeAttachment" + } + ], + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf" + ], + "consumes": [ + "*/*" + ] + }, + { + "type": "v1.VolumeAttachment", + "method": "PUT", + "summary": "replace the specified VolumeAttachment", + "nickname": "replaceVolumeAttachment", + "parameters": [ + { + "type": "string", + "paramType": "query", + "name": "pretty", + "description": "If 'true', then the output is pretty printed.", + "required": false, + "allowMultiple": false + }, + { + "type": "v1.VolumeAttachment", + "paramType": "body", + "name": "body", + "description": "", + "required": true, + "allowMultiple": false + }, + { + "type": "string", + "paramType": "query", + "name": "dryRun", + "description": "When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed", + "required": false, + "allowMultiple": false + }, + { + "type": "string", + "paramType": "path", + "name": "name", + "description": "name of the VolumeAttachment", + "required": true, + "allowMultiple": false + } + ], + "responseMessages": [ + { + "code": 200, + "message": "OK", + "responseModel": "v1.VolumeAttachment" + }, + { + "code": 201, + "message": "Created", + "responseModel": "v1.VolumeAttachment" + } + ], + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf" + ], + "consumes": [ + "*/*" + ] + }, + { + "type": "v1.VolumeAttachment", + "method": "PATCH", + "summary": "partially update the specified VolumeAttachment", + "nickname": "patchVolumeAttachment", + "parameters": [ + { + "type": "string", + "paramType": "query", + "name": "pretty", + "description": "If 'true', then the output is pretty printed.", + "required": false, + "allowMultiple": false + }, + { + "type": "v1.Patch", + "paramType": "body", + "name": "body", + "description": "", + "required": true, + "allowMultiple": false + }, + { + "type": "string", + "paramType": "query", + "name": "dryRun", + "description": "When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed", + "required": false, + "allowMultiple": false + }, + { + "type": "string", + "paramType": "path", + "name": "name", + "description": "name of the VolumeAttachment", + "required": true, + "allowMultiple": false + } + ], + "responseMessages": [ + { + "code": 200, + "message": "OK", + "responseModel": "v1.VolumeAttachment" + } + ], + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf" + ], + "consumes": [ + "application/json-patch+json", + "application/merge-patch+json", + "application/strategic-merge-patch+json" + ] + }, + { + "type": "v1.Status", + "method": "DELETE", + "summary": "delete a VolumeAttachment", + "nickname": "deleteVolumeAttachment", + "parameters": [ + { + "type": "string", + "paramType": "query", + "name": "pretty", + "description": "If 'true', then the output is pretty printed.", + "required": false, + "allowMultiple": false + }, + { + "type": "v1.DeleteOptions", + "paramType": "body", + "name": "body", + "description": "", + "required": false, + "allowMultiple": false + }, + { + "type": "integer", + "paramType": "query", + "name": "gracePeriodSeconds", + "description": "The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately.", + "required": false, + "allowMultiple": false + }, + { + "type": "boolean", + "paramType": "query", + "name": "orphanDependents", + "description": "Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both.", + "required": false, + "allowMultiple": false + }, + { + "type": "string", + "paramType": "query", + "name": "propagationPolicy", + "description": "Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground.", + "required": false, + "allowMultiple": false + }, + { + "type": "string", + "paramType": "query", + "name": "dryRun", + "description": "When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed", + "required": false, + "allowMultiple": false + }, + { + "type": "string", + "paramType": "path", + "name": "name", + "description": "name of the VolumeAttachment", + "required": true, + "allowMultiple": false + } + ], + "responseMessages": [ + { + "code": 200, + "message": "OK", + "responseModel": "v1.Status" + }, + { + "code": 202, + "message": "Accepted", + "responseModel": "v1.Status" + } + ], + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf" + ], + "consumes": [ + "*/*" + ] + } + ] + }, + { + "path": "/apis/storage.k8s.io/v1/watch/volumeattachments/{name}", + "description": "API at /apis/storage.k8s.io/v1", + "operations": [ + { + "type": "v1.WatchEvent", + "method": "GET", + "summary": "watch changes to an object of kind VolumeAttachment. deprecated: use the 'watch' parameter with a list operation instead, filtered to a single item with the 'fieldSelector' parameter.", + "nickname": "watchVolumeAttachment", + "parameters": [ + { + "type": "string", + "paramType": "query", + "name": "pretty", + "description": "If 'true', then the output is pretty printed.", + "required": false, + "allowMultiple": false + }, + { + "type": "string", + "paramType": "query", + "name": "labelSelector", + "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", + "required": false, + "allowMultiple": false + }, + { + "type": "string", + "paramType": "query", + "name": "fieldSelector", + "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", + "required": false, + "allowMultiple": false + }, + { + "type": "boolean", + "paramType": "query", + "name": "includeUninitialized", + "description": "If true, partially initialized resources are included in the response.", + "required": false, + "allowMultiple": false + }, + { + "type": "boolean", + "paramType": "query", + "name": "watch", + "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", + "required": false, + "allowMultiple": false + }, + { + "type": "string", + "paramType": "query", + "name": "resourceVersion", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", + "required": false, + "allowMultiple": false + }, + { + "type": "integer", + "paramType": "query", + "name": "timeoutSeconds", + "description": "Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.", + "required": false, + "allowMultiple": false + }, + { + "type": "integer", + "paramType": "query", + "name": "limit", + "description": "limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true.\n\nThe server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.", + "required": false, + "allowMultiple": false + }, + { + "type": "string", + "paramType": "query", + "name": "continue", + "description": "The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\".\n\nThis field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.", + "required": false, + "allowMultiple": false + }, + { + "type": "string", + "paramType": "path", + "name": "name", + "description": "name of the VolumeAttachment", + "required": true, + "allowMultiple": false + } + ], + "responseMessages": [ + { + "code": 200, + "message": "OK", + "responseModel": "v1.WatchEvent" + } + ], + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf", + "application/json;stream=watch", + "application/vnd.kubernetes.protobuf;stream=watch" + ], + "consumes": [ + "*/*" + ] + } + ] + }, + { + "path": "/apis/storage.k8s.io/v1/volumeattachments/{name}/status", + "description": "API at /apis/storage.k8s.io/v1", + "operations": [ + { + "type": "v1.VolumeAttachment", + "method": "GET", + "summary": "read status of the specified VolumeAttachment", + "nickname": "readVolumeAttachmentStatus", + "parameters": [ + { + "type": "string", + "paramType": "query", + "name": "pretty", + "description": "If 'true', then the output is pretty printed.", + "required": false, + "allowMultiple": false + }, + { + "type": "string", + "paramType": "path", + "name": "name", + "description": "name of the VolumeAttachment", + "required": true, + "allowMultiple": false + } + ], + "responseMessages": [ + { + "code": 200, + "message": "OK", + "responseModel": "v1.VolumeAttachment" + } + ], + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf" + ], + "consumes": [ + "*/*" + ] + }, + { + "type": "v1.VolumeAttachment", + "method": "PUT", + "summary": "replace status of the specified VolumeAttachment", + "nickname": "replaceVolumeAttachmentStatus", + "parameters": [ + { + "type": "string", + "paramType": "query", + "name": "pretty", + "description": "If 'true', then the output is pretty printed.", + "required": false, + "allowMultiple": false + }, + { + "type": "v1.VolumeAttachment", + "paramType": "body", + "name": "body", + "description": "", + "required": true, + "allowMultiple": false + }, + { + "type": "string", + "paramType": "query", + "name": "dryRun", + "description": "When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed", + "required": false, + "allowMultiple": false + }, + { + "type": "string", + "paramType": "path", + "name": "name", + "description": "name of the VolumeAttachment", + "required": true, + "allowMultiple": false + } + ], + "responseMessages": [ + { + "code": 200, + "message": "OK", + "responseModel": "v1.VolumeAttachment" + }, + { + "code": 201, + "message": "Created", + "responseModel": "v1.VolumeAttachment" + } + ], + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf" + ], + "consumes": [ + "*/*" + ] + }, + { + "type": "v1.VolumeAttachment", + "method": "PATCH", + "summary": "partially update status of the specified VolumeAttachment", + "nickname": "patchVolumeAttachmentStatus", + "parameters": [ + { + "type": "string", + "paramType": "query", + "name": "pretty", + "description": "If 'true', then the output is pretty printed.", + "required": false, + "allowMultiple": false + }, + { + "type": "v1.Patch", + "paramType": "body", + "name": "body", + "description": "", + "required": true, + "allowMultiple": false + }, + { + "type": "string", + "paramType": "query", + "name": "dryRun", + "description": "When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed", + "required": false, + "allowMultiple": false + }, + { + "type": "string", + "paramType": "path", + "name": "name", + "description": "name of the VolumeAttachment", + "required": true, + "allowMultiple": false + } + ], + "responseMessages": [ + { + "code": 200, + "message": "OK", + "responseModel": "v1.VolumeAttachment" + } + ], + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf" + ], + "consumes": [ + "application/json-patch+json", + "application/merge-patch+json", + "application/strategic-merge-patch+json" + ] + } + ] + }, { "path": "/apis/storage.k8s.io/v1", "description": "API at /apis/storage.k8s.io/v1", @@ -1229,6 +2130,135 @@ "id": "v1.DeletionPropagation", "properties": {} }, + "v1.VolumeAttachmentList": { + "id": "v1.VolumeAttachmentList", + "description": "VolumeAttachmentList is a collection of VolumeAttachment objects.", + "required": [ + "items" + ], + "properties": { + "kind": { + "type": "string", + "description": "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds" + }, + "apiVersion": { + "type": "string", + "description": "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#resources" + }, + "metadata": { + "$ref": "v1.ListMeta", + "description": "Standard list metadata More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata" + }, + "items": { + "type": "array", + "items": { + "$ref": "v1.VolumeAttachment" + }, + "description": "Items is the list of VolumeAttachments" + } + } + }, + "v1.VolumeAttachment": { + "id": "v1.VolumeAttachment", + "description": "VolumeAttachment captures the intent to attach or detach the specified volume to/from the specified node.\n\nVolumeAttachment objects are non-namespaced.", + "required": [ + "spec" + ], + "properties": { + "kind": { + "type": "string", + "description": "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds" + }, + "apiVersion": { + "type": "string", + "description": "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#resources" + }, + "metadata": { + "$ref": "v1.ObjectMeta", + "description": "Standard object metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata" + }, + "spec": { + "$ref": "v1.VolumeAttachmentSpec", + "description": "Specification of the desired attach/detach volume behavior. Populated by the Kubernetes system." + }, + "status": { + "$ref": "v1.VolumeAttachmentStatus", + "description": "Status of the VolumeAttachment request. Populated by the entity completing the attach or detach operation, i.e. the external-attacher." + } + } + }, + "v1.VolumeAttachmentSpec": { + "id": "v1.VolumeAttachmentSpec", + "description": "VolumeAttachmentSpec is the specification of a VolumeAttachment request.", + "required": [ + "attacher", + "source", + "nodeName" + ], + "properties": { + "attacher": { + "type": "string", + "description": "Attacher indicates the name of the volume driver that MUST handle this request. This is the name returned by GetPluginName()." + }, + "source": { + "$ref": "v1.VolumeAttachmentSource", + "description": "Source represents the volume that should be attached." + }, + "nodeName": { + "type": "string", + "description": "The node that the volume should be attached to." + } + } + }, + "v1.VolumeAttachmentSource": { + "id": "v1.VolumeAttachmentSource", + "description": "VolumeAttachmentSource represents a volume that should be attached. Right now only PersistenVolumes can be attached via external attacher, in future we may allow also inline volumes in pods. Exactly one member can be set.", + "properties": { + "persistentVolumeName": { + "type": "string", + "description": "Name of the persistent volume to attach." + } + } + }, + "v1.VolumeAttachmentStatus": { + "id": "v1.VolumeAttachmentStatus", + "description": "VolumeAttachmentStatus is the status of a VolumeAttachment request.", + "required": [ + "attached" + ], + "properties": { + "attached": { + "type": "boolean", + "description": "Indicates the volume is successfully attached. This field must only be set by the entity completing the attach operation, i.e. the external-attacher." + }, + "attachmentMetadata": { + "type": "object", + "description": "Upon successful attach, this field is populated with any information returned by the attach operation that must be passed into subsequent WaitForAttach or Mount calls. This field must only be set by the entity completing the attach operation, i.e. the external-attacher." + }, + "attachError": { + "$ref": "v1.VolumeError", + "description": "The last error encountered during attach operation, if any. This field must only be set by the entity completing the attach operation, i.e. the external-attacher." + }, + "detachError": { + "$ref": "v1.VolumeError", + "description": "The last error encountered during detach operation, if any. This field must only be set by the entity completing the detach operation, i.e. the external-attacher." + } + } + }, + "v1.VolumeError": { + "id": "v1.VolumeError", + "description": "VolumeError captures an error encountered during a volume operation.", + "properties": { + "time": { + "type": "string", + "description": "Time the error was encountered." + }, + "message": { + "type": "string", + "description": "String detailing the error encountered during Attach or Detach operation. This string maybe logged, so it should not contain sensitive information." + } + } + }, "v1.APIResourceList": { "id": "v1.APIResourceList", "description": "APIResourceList is a list of APIResource, it is used to expose the name of the resources supported in a specific group and version, and if the resource is namespaced.", diff --git a/docs/api-reference/storage.k8s.io/v1/definitions.html b/docs/api-reference/storage.k8s.io/v1/definitions.html index 8b8becbae0..b0371e3baf 100755 --- a/docs/api-reference/storage.k8s.io/v1/definitions.html +++ b/docs/api-reference/storage.k8s.io/v1/definitions.html @@ -375,6 +375,12 @@ span.icon > [class^="icon-"], span.icon > [class*=" icon-"] { cursor: default; }
  • v1.StorageClassList

  • +
  • +

    v1.VolumeAttachment

    +
  • +
  • +

    v1.VolumeAttachmentList

    +
  • @@ -438,15 +444,9 @@ span.icon > [class^="icon-"], span.icon > [class*=" icon-"] { cursor: default; }
    -

    v1.Patch

    +

    v1.VolumeAttachmentList

    -

    Patch is provided to give a concrete name and type to the Kubernetes PATCH request body.

    -
    -
    -
    -

    v1.DeleteOptions

    -
    -

    DeleteOptions may be provided when deleting an API object.

    +

    VolumeAttachmentList is a collection of VolumeAttachment objects.

    @@ -481,38 +481,17 @@ span.icon > [class^="icon-"], span.icon > [class*=" icon-"] { cursor: default; } - - + + - + - - - - - - - - - - - - - - - - - - - - - - - - - + + + + @@ -568,9 +547,9 @@ span.icon > [class^="icon-"], span.icon > [class*=" icon-"] { cursor: default; }
    -

    v1.TopologySelectorLabelRequirement

    +

    v1.VolumeAttachmentSource

    -

    A topology selector requirement is a selector that matches given label. This is an alpha feature and may change in the future.

    +

    VolumeAttachmentSource represents a volume that should be attached. Right now only PersistenVolumes can be attached via external attacher, in future we may allow also inline volumes in pods. Exactly one member can be set.

    gracePeriodSeconds

    The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately.

    metadata

    Standard list metadata More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata

    false

    integer (int64)

    v1.ListMeta

    preconditions

    Must be fulfilled before a deletion is carried out. If not possible, a 409 Conflict status will be returned.

    false

    v1.Preconditions

    orphanDependents

    Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the "orphan" finalizer will be added to/removed from the object’s finalizers list. Either this field or PropagationPolicy may be set, but not both.

    false

    boolean

    false

    propagationPolicy

    Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: Orphan - orphan the dependents; Background - allow the garbage collector to delete the dependents in the background; Foreground - a cascading policy that deletes all dependents in the foreground.

    false

    v1.DeletionPropagation

    dryRun

    When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed

    false

    string array

    items

    Items is the list of VolumeAttachments

    true

    v1.VolumeAttachment array

    @@ -591,122 +570,12 @@ span.icon > [class^="icon-"], span.icon > [class*=" icon-"] { cursor: default; } - - - - - - - - - - - - - - -

    key

    The label key that the selector applies to.

    true

    string

    values

    An array of string values. One value must match the label to be selected. Each entry in Values is ORed.

    true

    string array

    - -
    -
    -

    v1.StatusDetails

    -
    -

    StatusDetails is a set of additional properties that MAY be set by the server to provide additional information about a response. The Reason field of a Status object defines what attributes will be set. Clients must ignore fields that do not match the defined type of each attribute, and should assume that any attribute may be empty, invalid, or under defined.

    -
    - ------- - - - - - - - - - - - - - + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    NameDescriptionRequiredSchemaDefault

    name

    The name attribute of the resource associated with the status StatusReason (when there is a single name which can be described).

    persistentVolumeName

    Name of the persistent volume to attach.

    false

    string

    group

    The group attribute of the resource associated with the status StatusReason.

    false

    string

    kind

    The kind attribute of the resource associated with the status StatusReason. On some operations may differ from the requested resource Kind. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds

    false

    string

    uid

    UID of the resource. (when there is a single resource which can be described). More info: http://kubernetes.io/docs/user-guide/identifiers#uids

    false

    string

    causes

    The Causes array includes more details associated with the StatusReason failure. Not all StatusReasons may provide detailed causes.

    false

    v1.StatusCause array

    retryAfterSeconds

    If specified, the time in seconds before the operation should be retried. Some errors may indicate the client must take an alternate action - for those errors this field may indicate how long to wait before taking the alternate action.

    false

    integer (int32)

    - -
    -
    -

    v1.Preconditions

    -
    -

    Preconditions must be fulfilled before an operation (update, delete, etc.) is carried out.

    -
    - ------- - - - - - - - - - - - - - - - - -
    NameDescriptionRequiredSchemaDefault

    uid

    Specifies the target UID.

    false

    types.UID

    @@ -753,9 +622,9 @@ span.icon > [class^="icon-"], span.icon > [class*=" icon-"] { cursor: default; }
    -

    v1.Initializer

    +

    v1.Preconditions

    -

    Initializer is information about an initializer that has not yet completed.

    +

    Preconditions must be fulfilled before an operation (update, delete, etc.) is carried out.

    @@ -776,10 +645,10 @@ span.icon > [class^="icon-"], span.icon > [class*=" icon-"] { cursor: default; } - - - - + + + + @@ -868,6 +737,47 @@ span.icon > [class^="icon-"], span.icon > [class*=" icon-"] { cursor: default; }

    name

    name of the process that is responsible for initializing this object.

    true

    string

    uid

    Specifies the target UID.

    false

    types.UID

    +
    +
    +

    v1.VolumeError

    +
    +

    VolumeError captures an error encountered during a volume operation.

    +
    + +++++++ + + + + + + + + + + + + + + + + + + + + + + + + + +
    NameDescriptionRequiredSchemaDefault

    time

    Time the error was encountered.

    false

    string

    message

    String detailing the error encountered during Attach or Detach operation. This string maybe logged, so it should not contain sensitive information.

    false

    string

    +

    v1.WatchEvent

    @@ -906,6 +816,387 @@ span.icon > [class^="icon-"], span.icon > [class*=" icon-"] { cursor: default; } +
    +
    +

    v1.VolumeAttachment

    +
    +

    VolumeAttachment captures the intent to attach or detach the specified volume to/from the specified node.

    +
    +
    +

    VolumeAttachment objects are non-namespaced.

    +
    + +++++++ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NameDescriptionRequiredSchemaDefault

    kind

    Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds

    false

    string

    apiVersion

    APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#resources

    false

    string

    metadata

    Standard object metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata

    false

    v1.ObjectMeta

    spec

    Specification of the desired attach/detach volume behavior. Populated by the Kubernetes system.

    true

    v1.VolumeAttachmentSpec

    status

    Status of the VolumeAttachment request. Populated by the entity completing the attach or detach operation, i.e. the external-attacher.

    false

    v1.VolumeAttachmentStatus

    + +
    +
    +

    v1.PersistentVolumeReclaimPolicy

    + +
    +
    +

    v1.TopologySelectorTerm

    +
    +

    A topology selector term represents the result of label queries. A null or empty topology selector term matches no objects. The requirements of them are ANDed. It provides a subset of functionality as NodeSelectorTerm. This is an alpha feature and may change in the future.

    +
    + +++++++ + + + + + + + + + + + + + + + + + + +
    NameDescriptionRequiredSchemaDefault

    matchLabelExpressions

    A list of topology selector requirements by labels.

    false

    v1.TopologySelectorLabelRequirement array

    + +
    +
    +

    v1.VolumeAttachmentSpec

    +
    +

    VolumeAttachmentSpec is the specification of a VolumeAttachment request.

    +
    + +++++++ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NameDescriptionRequiredSchemaDefault

    attacher

    Attacher indicates the name of the volume driver that MUST handle this request. This is the name returned by GetPluginName().

    true

    string

    source

    Source represents the volume that should be attached.

    true

    v1.VolumeAttachmentSource

    nodeName

    The node that the volume should be attached to.

    true

    string

    + +
    +
    +

    v1.DeletionPropagation

    + +
    +
    +

    v1.Patch

    +
    +

    Patch is provided to give a concrete name and type to the Kubernetes PATCH request body.

    +
    +
    +
    +

    v1.DeleteOptions

    +
    +

    DeleteOptions may be provided when deleting an API object.

    +
    + +++++++ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NameDescriptionRequiredSchemaDefault

    kind

    Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds

    false

    string

    apiVersion

    APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#resources

    false

    string

    gracePeriodSeconds

    The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately.

    false

    integer (int64)

    preconditions

    Must be fulfilled before a deletion is carried out. If not possible, a 409 Conflict status will be returned.

    false

    v1.Preconditions

    orphanDependents

    Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the "orphan" finalizer will be added to/removed from the object’s finalizers list. Either this field or PropagationPolicy may be set, but not both.

    false

    boolean

    false

    propagationPolicy

    Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: Orphan - orphan the dependents; Background - allow the garbage collector to delete the dependents in the background; Foreground - a cascading policy that deletes all dependents in the foreground.

    false

    v1.DeletionPropagation

    dryRun

    When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed

    false

    string array

    + +
    +
    +

    v1.StatusDetails

    +
    +

    StatusDetails is a set of additional properties that MAY be set by the server to provide additional information about a response. The Reason field of a Status object defines what attributes will be set. Clients must ignore fields that do not match the defined type of each attribute, and should assume that any attribute may be empty, invalid, or under defined.

    +
    + +++++++ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NameDescriptionRequiredSchemaDefault

    name

    The name attribute of the resource associated with the status StatusReason (when there is a single name which can be described).

    false

    string

    group

    The group attribute of the resource associated with the status StatusReason.

    false

    string

    kind

    The kind attribute of the resource associated with the status StatusReason. On some operations may differ from the requested resource Kind. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds

    false

    string

    uid

    UID of the resource. (when there is a single resource which can be described). More info: http://kubernetes.io/docs/user-guide/identifiers#uids

    false

    string

    causes

    The Causes array includes more details associated with the StatusReason failure. Not all StatusReasons may provide detailed causes.

    false

    v1.StatusCause array

    retryAfterSeconds

    If specified, the time in seconds before the operation should be retried. Some errors may indicate the client must take an alternate action - for those errors this field may indicate how long to wait before taking the alternate action.

    false

    integer (int32)

    + +
    +
    +

    v1.TopologySelectorLabelRequirement

    +
    +

    A topology selector requirement is a selector that matches given label. This is an alpha feature and may change in the future.

    +
    + +++++++ + + + + + + + + + + + + + + + + + + + + + + + + + +
    NameDescriptionRequiredSchemaDefault

    key

    The label key that the selector applies to.

    true

    string

    values

    An array of string values. One value must match the label to be selected. Each entry in Values is ORed.

    true

    string array

    + +
    +
    +

    v1.Initializer

    +
    +

    Initializer is information about an initializer that has not yet completed.

    +
    + +++++++ + + + + + + + + + + + + + + + + + + +
    NameDescriptionRequiredSchemaDefault

    name

    name of the process that is responsible for initializing this object.

    true

    string

    +

    v1.StorageClassList

    @@ -963,12 +1254,9 @@ span.icon > [class^="icon-"], span.icon > [class*=" icon-"] { cursor: default; }
    -

    v1.StorageClass

    +

    v1.OwnerReference

    -

    StorageClass describes the parameters for a class of storage for which PersistentVolumes can be dynamically provisioned.

    -
    -
    -

    StorageClasses are non-namespaced; the name of the storage class according to etcd is in ObjectMeta.Name.

    +

    OwnerReference contains enough information to let you identify an owning object. An owning object must be in the same namespace as the dependent, or be cluster-scoped, so there is no namespace field.

    @@ -989,74 +1277,46 @@ span.icon > [class^="icon-"], span.icon > [class*=" icon-"] { cursor: default; } - - - - - - - - - - - - - - - - - - - - - - + - - - - + + + + - - - - + + + + - - - - + + + + - - + + - - + + - - - - - - + - -

    kind

    Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds

    false

    string

    apiVersion

    APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#resources

    false

    string

    metadata

    Standard object’s metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata

    false

    v1.ObjectMeta

    provisioner

    Provisioner indicates the type of the provisioner.

    API version of the referent.

    true

    string

    parameters

    Parameters holds the parameters for the provisioner that should create volumes of this storage class.

    false

    object

    kind

    Kind of the referent. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds

    true

    string

    reclaimPolicy

    Dynamically provisioned PersistentVolumes of this storage class are created with this reclaimPolicy. Defaults to Delete.

    false

    v1.PersistentVolumeReclaimPolicy

    name

    Name of the referent. More info: http://kubernetes.io/docs/user-guide/identifiers#names

    true

    string

    mountOptions

    Dynamically provisioned PersistentVolumes of this storage class are created with these mountOptions, e.g. ["ro", "soft"]. Not validated - mount of the PVs will simply fail if one is invalid.

    false

    string array

    uid

    UID of the referent. More info: http://kubernetes.io/docs/user-guide/identifiers#uids

    true

    string

    allowVolumeExpansion

    AllowVolumeExpansion shows whether the storage class allow volume expand

    controller

    If true, this reference points to the managing controller.

    false

    boolean

    false

    volumeBindingMode

    VolumeBindingMode indicates how PersistentVolumeClaims should be provisioned and bound. When unset, VolumeBindingImmediate is used. This field is only honored by servers that enable the VolumeScheduling feature.

    blockOwnerDeletion

    If true, AND if the owner has the "foregroundDeletion" finalizer, then the owner cannot be deleted from the key-value store until this reference is removed. Defaults to false. To set this field, a user needs "delete" permission of the owner, otherwise 422 (Unprocessable Entity) will be returned.

    false

    v1.VolumeBindingMode

    allowedTopologies

    Restrict the node topologies where volumes can be dynamically provisioned. Each volume plugin defines its own supported topology specifications. An empty TopologySelectorTerm list means there is no topology restriction. This field is only honored by servers that enable the VolumeScheduling feature.

    boolean

    false

    v1.TopologySelectorTerm array

    @@ -1218,9 +1478,12 @@ When an object is created, the system will populate this list with the current s
    -

    v1.OwnerReference

    +

    v1.StorageClass

    -

    OwnerReference contains enough information to let you identify an owning object. An owning object must be in the same namespace as the dependent, or be cluster-scoped, so there is no namespace field.

    +

    StorageClass describes the parameters for a class of storage for which PersistentVolumes can be dynamically provisioned.

    +
    +
    +

    StorageClasses are non-namespaced; the name of the storage class according to etcd is in ObjectMeta.Name.

    @@ -1241,88 +1504,78 @@ When an object is created, the system will populate this list with the current s - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + - - - - + + + + - - - - + + + + - - + + + + + + + + + - - - - + + + + - -

    apiVersion

    API version of the referent.

    true

    string

    kind

    Kind of the referent. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds

    Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds

    false

    string

    apiVersion

    APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#resources

    false

    string

    metadata

    Standard object’s metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata

    false

    v1.ObjectMeta

    provisioner

    Provisioner indicates the type of the provisioner.

    true

    string

    name

    Name of the referent. More info: http://kubernetes.io/docs/user-guide/identifiers#names

    true

    string

    parameters

    Parameters holds the parameters for the provisioner that should create volumes of this storage class.

    false

    object

    uid

    UID of the referent. More info: http://kubernetes.io/docs/user-guide/identifiers#uids

    true

    string

    reclaimPolicy

    Dynamically provisioned PersistentVolumes of this storage class are created with this reclaimPolicy. Defaults to Delete.

    false

    v1.PersistentVolumeReclaimPolicy

    controller

    If true, this reference points to the managing controller.

    mountOptions

    Dynamically provisioned PersistentVolumes of this storage class are created with these mountOptions, e.g. ["ro", "soft"]. Not validated - mount of the PVs will simply fail if one is invalid.

    false

    string array

    allowVolumeExpansion

    AllowVolumeExpansion shows whether the storage class allow volume expand

    false

    boolean

    false

    blockOwnerDeletion

    If true, AND if the owner has the "foregroundDeletion" finalizer, then the owner cannot be deleted from the key-value store until this reference is removed. Defaults to false. To set this field, a user needs "delete" permission of the owner, otherwise 422 (Unprocessable Entity) will be returned.

    false

    boolean

    volumeBindingMode

    VolumeBindingMode indicates how PersistentVolumeClaims should be provisioned and bound. When unset, VolumeBindingImmediate is used. This field is only honored by servers that enable the VolumeScheduling feature.

    false

    v1.VolumeBindingMode

    - -
    -
    -

    v1.TopologySelectorTerm

    -
    -

    A topology selector term represents the result of label queries. A null or empty topology selector term matches no objects. The requirements of them are ANDed. It provides a subset of functionality as NodeSelectorTerm. This is an alpha feature and may change in the future.

    -
    - ------- - - - - - - - - - - - - + + - +
    NameDescriptionRequiredSchemaDefault

    matchLabelExpressions

    A list of topology selector requirements by labels.

    allowedTopologies

    Restrict the node topologies where volumes can be dynamically provisioned. Each volume plugin defines its own supported topology specifications. An empty TopologySelectorTerm list means there is no topology restriction. This field is only honored by servers that enable the VolumeScheduling feature.

    false

    v1.TopologySelectorLabelRequirement array

    v1.TopologySelectorTerm array

    -
    -
    -

    v1.PersistentVolumeReclaimPolicy

    -

    v1.APIResource

    @@ -1413,6 +1666,61 @@ When an object is created, the system will populate this list with the current s +
    +
    +

    v1.VolumeAttachmentStatus

    +
    +

    VolumeAttachmentStatus is the status of a VolumeAttachment request.

    +
    + +++++++ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NameDescriptionRequiredSchemaDefault

    attached

    Indicates the volume is successfully attached. This field must only be set by the entity completing the attach operation, i.e. the external-attacher.

    true

    boolean

    false

    attachmentMetadata

    Upon successful attach, this field is populated with any information returned by the attach operation that must be passed into subsequent WaitForAttach or Mount calls. This field must only be set by the entity completing the attach operation, i.e. the external-attacher.

    false

    object

    attachError

    The last error encountered during attach operation, if any. This field must only be set by the entity completing the attach operation, i.e. the external-attacher.

    false

    v1.VolumeError

    detachError

    The last error encountered during detach operation, if any. This field must only be set by the entity completing the detach operation, i.e. the external-attacher.

    false

    v1.VolumeError

    +

    types.UID

    @@ -1469,10 +1777,6 @@ Examples:
    -
    -
    -

    v1.DeletionPropagation

    -

    v1.VolumeBindingMode

    diff --git a/docs/api-reference/storage.k8s.io/v1/operations.html b/docs/api-reference/storage.k8s.io/v1/operations.html index 15ad8bb711..02a6cb2f3a 100755 --- a/docs/api-reference/storage.k8s.io/v1/operations.html +++ b/docs/api-reference/storage.k8s.io/v1/operations.html @@ -1472,10 +1472,10 @@ span.icon > [class^="icon-"], span.icon > [class*=" icon-"] { cursor: default; }
    -

    watch individual changes to a list of StorageClass. deprecated: use the watch parameter with a list operation instead.

    +

    list or watch objects of kind VolumeAttachment

    -
    GET /apis/storage.k8s.io/v1/watch/storageclasses
    +
    GET /apis/storage.k8s.io/v1/volumeattachments
    @@ -1597,7 +1597,7 @@ span.icon > [class^="icon-"], span.icon > [class*=" icon-"] { cursor: default; }

    200

    success

    -

    v1.WatchEvent

    +

    v1.VolumeAttachmentList

    @@ -1647,6 +1647,1411 @@ span.icon > [class^="icon-"], span.icon > [class*=" icon-"] { cursor: default; }
    +

    delete collection of VolumeAttachment

    +
    +
    +
    DELETE /apis/storage.k8s.io/v1/volumeattachments
    +
    +
    +
    +

    Parameters

    + ++++++++ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    TypeNameDescriptionRequiredSchemaDefault

    QueryParameter

    pretty

    If true, then the output is pretty printed.

    false

    string

    QueryParameter

    labelSelector

    A selector to restrict the list of returned objects by their labels. Defaults to everything.

    false

    string

    QueryParameter

    fieldSelector

    A selector to restrict the list of returned objects by their fields. Defaults to everything.

    false

    string

    QueryParameter

    includeUninitialized

    If true, partially initialized resources are included in the response.

    false

    boolean

    QueryParameter

    watch

    Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.

    false

    boolean

    QueryParameter

    resourceVersion

    When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it’s 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.

    false

    string

    QueryParameter

    timeoutSeconds

    Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.

    false

    integer (int32)

    QueryParameter

    limit

    limit is a maximum number of responses to return for a list call. If more items exist, the server will set the continue field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. +

    The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.

    false

    integer (int32)

    QueryParameter

    continue

    The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the "next key". +

    This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.

    false

    string

    + +
    +
    +

    Responses

    + +++++ + + + + + + + + + + + + + + +
    HTTP CodeDescriptionSchema

    200

    success

    v1.Status

    + +
    +
    +

    Consumes

    +
    +
      +
    • +

      /

      +
    • +
    +
    +
    +
    +

    Produces

    +
    +
      +
    • +

      application/json

      +
    • +
    • +

      application/yaml

      +
    • +
    • +

      application/vnd.kubernetes.protobuf

      +
    • +
    +
    +
    +
    +

    Tags

    +
    +
      +
    • +

      apisstorage.k8s.iov1

      +
    • +
    +
    +
    +
    +
    +

    create a VolumeAttachment

    +
    +
    +
    POST /apis/storage.k8s.io/v1/volumeattachments
    +
    +
    +
    +

    Parameters

    + ++++++++ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    TypeNameDescriptionRequiredSchemaDefault

    QueryParameter

    pretty

    If true, then the output is pretty printed.

    false

    string

    BodyParameter

    body

    true

    v1.VolumeAttachment

    QueryParameter

    dryRun

    When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed

    false

    string

    QueryParameter

    includeUninitialized

    If IncludeUninitialized is specified, the object may be returned without completing initialization.

    false

    boolean

    + +
    +
    +

    Responses

    + +++++ + + + + + + + + + + + + + + + + + + + + + + + + +
    HTTP CodeDescriptionSchema

    202

    Accepted

    v1.VolumeAttachment

    200

    success

    v1.VolumeAttachment

    201

    Created

    v1.VolumeAttachment

    + +
    +
    +

    Consumes

    +
    +
      +
    • +

      /

      +
    • +
    +
    +
    +
    +

    Produces

    +
    +
      +
    • +

      application/json

      +
    • +
    • +

      application/yaml

      +
    • +
    • +

      application/vnd.kubernetes.protobuf

      +
    • +
    +
    +
    +
    +

    Tags

    +
    +
      +
    • +

      apisstorage.k8s.iov1

      +
    • +
    +
    +
    +
    +
    +

    read the specified VolumeAttachment

    +
    +
    +
    GET /apis/storage.k8s.io/v1/volumeattachments/{name}
    +
    +
    +
    +

    Parameters

    + ++++++++ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    TypeNameDescriptionRequiredSchemaDefault

    QueryParameter

    pretty

    If true, then the output is pretty printed.

    false

    string

    QueryParameter

    export

    Should this value be exported. Export strips fields that a user can not specify.

    false

    boolean

    QueryParameter

    exact

    Should the export be exact. Exact export maintains cluster-specific fields like Namespace.

    false

    boolean

    PathParameter

    name

    name of the VolumeAttachment

    true

    string

    + +
    +
    +

    Responses

    + +++++ + + + + + + + + + + + + + + +
    HTTP CodeDescriptionSchema

    200

    success

    v1.VolumeAttachment

    + +
    +
    +

    Consumes

    +
    +
      +
    • +

      /

      +
    • +
    +
    +
    +
    +

    Produces

    +
    +
      +
    • +

      application/json

      +
    • +
    • +

      application/yaml

      +
    • +
    • +

      application/vnd.kubernetes.protobuf

      +
    • +
    +
    +
    +
    +

    Tags

    +
    +
      +
    • +

      apisstorage.k8s.iov1

      +
    • +
    +
    +
    +
    +
    +

    replace the specified VolumeAttachment

    +
    +
    +
    PUT /apis/storage.k8s.io/v1/volumeattachments/{name}
    +
    +
    +
    +

    Parameters

    + ++++++++ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    TypeNameDescriptionRequiredSchemaDefault

    QueryParameter

    pretty

    If true, then the output is pretty printed.

    false

    string

    BodyParameter

    body

    true

    v1.VolumeAttachment

    QueryParameter

    dryRun

    When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed

    false

    string

    PathParameter

    name

    name of the VolumeAttachment

    true

    string

    + +
    +
    +

    Responses

    + +++++ + + + + + + + + + + + + + + + + + + + +
    HTTP CodeDescriptionSchema

    200

    success

    v1.VolumeAttachment

    201

    Created

    v1.VolumeAttachment

    + +
    +
    +

    Consumes

    +
    +
      +
    • +

      /

      +
    • +
    +
    +
    +
    +

    Produces

    +
    +
      +
    • +

      application/json

      +
    • +
    • +

      application/yaml

      +
    • +
    • +

      application/vnd.kubernetes.protobuf

      +
    • +
    +
    +
    +
    +

    Tags

    +
    +
      +
    • +

      apisstorage.k8s.iov1

      +
    • +
    +
    +
    +
    +
    +

    delete a VolumeAttachment

    +
    +
    +
    DELETE /apis/storage.k8s.io/v1/volumeattachments/{name}
    +
    +
    +
    +

    Parameters

    + ++++++++ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    TypeNameDescriptionRequiredSchemaDefault

    QueryParameter

    pretty

    If true, then the output is pretty printed.

    false

    string

    BodyParameter

    body

    false

    v1.DeleteOptions

    QueryParameter

    gracePeriodSeconds

    The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately.

    false

    integer (int32)

    QueryParameter

    orphanDependents

    Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the "orphan" finalizer will be added to/removed from the object’s finalizers list. Either this field or PropagationPolicy may be set, but not both.

    false

    boolean

    QueryParameter

    propagationPolicy

    Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: Orphan - orphan the dependents; Background - allow the garbage collector to delete the dependents in the background; Foreground - a cascading policy that deletes all dependents in the foreground.

    false

    string

    QueryParameter

    dryRun

    When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed

    false

    string

    PathParameter

    name

    name of the VolumeAttachment

    true

    string

    + +
    +
    +

    Responses

    + +++++ + + + + + + + + + + + + + + + + + + + +
    HTTP CodeDescriptionSchema

    202

    Accepted

    v1.Status

    200

    success

    v1.Status

    + +
    +
    +

    Consumes

    +
    +
      +
    • +

      /

      +
    • +
    +
    +
    +
    +

    Produces

    +
    +
      +
    • +

      application/json

      +
    • +
    • +

      application/yaml

      +
    • +
    • +

      application/vnd.kubernetes.protobuf

      +
    • +
    +
    +
    +
    +

    Tags

    +
    +
      +
    • +

      apisstorage.k8s.iov1

      +
    • +
    +
    +
    +
    +
    +

    partially update the specified VolumeAttachment

    +
    +
    +
    PATCH /apis/storage.k8s.io/v1/volumeattachments/{name}
    +
    +
    +
    +

    Parameters

    + ++++++++ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    TypeNameDescriptionRequiredSchemaDefault

    QueryParameter

    pretty

    If true, then the output is pretty printed.

    false

    string

    BodyParameter

    body

    true

    v1.Patch

    QueryParameter

    dryRun

    When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed

    false

    string

    PathParameter

    name

    name of the VolumeAttachment

    true

    string

    + +
    +
    +

    Responses

    + +++++ + + + + + + + + + + + + + + +
    HTTP CodeDescriptionSchema

    200

    success

    v1.VolumeAttachment

    + +
    +
    +

    Consumes

    +
    +
      +
    • +

      application/json-patch+json

      +
    • +
    • +

      application/merge-patch+json

      +
    • +
    • +

      application/strategic-merge-patch+json

      +
    • +
    +
    +
    +
    +

    Produces

    +
    +
      +
    • +

      application/json

      +
    • +
    • +

      application/yaml

      +
    • +
    • +

      application/vnd.kubernetes.protobuf

      +
    • +
    +
    +
    +
    +

    Tags

    +
    +
      +
    • +

      apisstorage.k8s.iov1

      +
    • +
    +
    +
    +
    +
    +

    read status of the specified VolumeAttachment

    +
    +
    +
    GET /apis/storage.k8s.io/v1/volumeattachments/{name}/status
    +
    +
    +
    +

    Parameters

    + ++++++++ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    TypeNameDescriptionRequiredSchemaDefault

    QueryParameter

    pretty

    If true, then the output is pretty printed.

    false

    string

    PathParameter

    name

    name of the VolumeAttachment

    true

    string

    + +
    +
    +

    Responses

    + +++++ + + + + + + + + + + + + + + +
    HTTP CodeDescriptionSchema

    200

    success

    v1.VolumeAttachment

    + +
    +
    +

    Consumes

    +
    +
      +
    • +

      /

      +
    • +
    +
    +
    +
    +

    Produces

    +
    +
      +
    • +

      application/json

      +
    • +
    • +

      application/yaml

      +
    • +
    • +

      application/vnd.kubernetes.protobuf

      +
    • +
    +
    +
    +
    +

    Tags

    +
    +
      +
    • +

      apisstorage.k8s.iov1

      +
    • +
    +
    +
    +
    +
    +

    replace status of the specified VolumeAttachment

    +
    +
    +
    PUT /apis/storage.k8s.io/v1/volumeattachments/{name}/status
    +
    +
    +
    +

    Parameters

    + ++++++++ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    TypeNameDescriptionRequiredSchemaDefault

    QueryParameter

    pretty

    If true, then the output is pretty printed.

    false

    string

    BodyParameter

    body

    true

    v1.VolumeAttachment

    QueryParameter

    dryRun

    When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed

    false

    string

    PathParameter

    name

    name of the VolumeAttachment

    true

    string

    + +
    +
    +

    Responses

    + +++++ + + + + + + + + + + + + + + + + + + + +
    HTTP CodeDescriptionSchema

    200

    success

    v1.VolumeAttachment

    201

    Created

    v1.VolumeAttachment

    + +
    +
    +

    Consumes

    +
    +
      +
    • +

      /

      +
    • +
    +
    +
    +
    +

    Produces

    +
    +
      +
    • +

      application/json

      +
    • +
    • +

      application/yaml

      +
    • +
    • +

      application/vnd.kubernetes.protobuf

      +
    • +
    +
    +
    +
    +

    Tags

    +
    +
      +
    • +

      apisstorage.k8s.iov1

      +
    • +
    +
    +
    +
    +
    +

    partially update status of the specified VolumeAttachment

    +
    +
    +
    PATCH /apis/storage.k8s.io/v1/volumeattachments/{name}/status
    +
    +
    +
    +

    Parameters

    + ++++++++ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    TypeNameDescriptionRequiredSchemaDefault

    QueryParameter

    pretty

    If true, then the output is pretty printed.

    false

    string

    BodyParameter

    body

    true

    v1.Patch

    QueryParameter

    dryRun

    When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed

    false

    string

    PathParameter

    name

    name of the VolumeAttachment

    true

    string

    + +
    +
    +

    Responses

    + +++++ + + + + + + + + + + + + + + +
    HTTP CodeDescriptionSchema

    200

    success

    v1.VolumeAttachment

    + +
    +
    +

    Consumes

    +
    +
      +
    • +

      application/json-patch+json

      +
    • +
    • +

      application/merge-patch+json

      +
    • +
    • +

      application/strategic-merge-patch+json

      +
    • +
    +
    +
    +
    +

    Produces

    +
    +
      +
    • +

      application/json

      +
    • +
    • +

      application/yaml

      +
    • +
    • +

      application/vnd.kubernetes.protobuf

      +
    • +
    +
    +
    +
    +

    Tags

    +
    +
      +
    • +

      apisstorage.k8s.iov1

      +
    • +
    +
    +
    +
    +
    +

    watch individual changes to a list of StorageClass. deprecated: use the watch parameter with a list operation instead.

    +
    +
    +
    GET /apis/storage.k8s.io/v1/watch/storageclasses
    +
    +
    +
    +

    Parameters

    + ++++++++ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    TypeNameDescriptionRequiredSchemaDefault

    QueryParameter

    pretty

    If true, then the output is pretty printed.

    false

    string

    QueryParameter

    labelSelector

    A selector to restrict the list of returned objects by their labels. Defaults to everything.

    false

    string

    QueryParameter

    fieldSelector

    A selector to restrict the list of returned objects by their fields. Defaults to everything.

    false

    string

    QueryParameter

    includeUninitialized

    If true, partially initialized resources are included in the response.

    false

    boolean

    QueryParameter

    watch

    Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.

    false

    boolean

    QueryParameter

    resourceVersion

    When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it’s 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.

    false

    string

    QueryParameter

    timeoutSeconds

    Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.

    false

    integer (int32)

    QueryParameter

    limit

    limit is a maximum number of responses to return for a list call. If more items exist, the server will set the continue field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. +

    The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.

    false

    integer (int32)

    QueryParameter

    continue

    The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the "next key". +

    This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.

    false

    string

    + +
    +
    +

    Responses

    + +++++ + + + + + + + + + + + + + + +
    HTTP CodeDescriptionSchema

    200

    success

    v1.WatchEvent

    + +
    +
    +

    Consumes

    +
    +
      +
    • +

      /

      +
    • +
    +
    +
    +
    +

    Produces

    +
    +
      +
    • +

      application/json

      +
    • +
    • +

      application/yaml

      +
    • +
    • +

      application/vnd.kubernetes.protobuf

      +
    • +
    • +

      application/json;stream=watch

      +
    • +
    • +

      application/vnd.kubernetes.protobuf;stream=watch

      +
    • +
    +
    +
    +
    +

    Tags

    +
    +
      +
    • +

      apisstorage.k8s.iov1

      +
    • +
    +
    +
    +
    +

    watch changes to an object of kind StorageClass. deprecated: use the watch parameter with a list operation instead, filtered to a single item with the fieldSelector parameter.

    @@ -1654,7 +3059,7 @@ span.icon > [class^="icon-"], span.icon > [class*=" icon-"] { cursor: default; }
    -

    Parameters

    +

    Parameters

    @@ -1762,7 +3167,7 @@ span.icon > [class^="icon-"], span.icon > [class*=" icon-"] { cursor: default; }
    -

    Responses

    +

    Responses

    @@ -1787,7 +3192,7 @@ span.icon > [class^="icon-"], span.icon > [class*=" icon-"] { cursor: default; }
    -

    Consumes

    +

    Consumes

    • @@ -1797,7 +3202,7 @@ span.icon > [class^="icon-"], span.icon > [class*=" icon-"] { cursor: default; }
    -

    Produces

    +

    Produces

    • @@ -1819,7 +3224,365 @@ span.icon > [class^="icon-"], span.icon > [class*=" icon-"] { cursor: default; }
    -

    Tags

    +

    Tags

    +
    +
      +
    • +

      apisstorage.k8s.iov1

      +
    • +
    +
    +
    + +
    +

    watch individual changes to a list of VolumeAttachment. deprecated: use the watch parameter with a list operation instead.

    +
    +
    +
    GET /apis/storage.k8s.io/v1/watch/volumeattachments
    +
    +
    +
    +

    Parameters

    +
    ++++++++ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    TypeNameDescriptionRequiredSchemaDefault

    QueryParameter

    pretty

    If true, then the output is pretty printed.

    false

    string

    QueryParameter

    labelSelector

    A selector to restrict the list of returned objects by their labels. Defaults to everything.

    false

    string

    QueryParameter

    fieldSelector

    A selector to restrict the list of returned objects by their fields. Defaults to everything.

    false

    string

    QueryParameter

    includeUninitialized

    If true, partially initialized resources are included in the response.

    false

    boolean

    QueryParameter

    watch

    Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.

    false

    boolean

    QueryParameter

    resourceVersion

    When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it’s 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.

    false

    string

    QueryParameter

    timeoutSeconds

    Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.

    false

    integer (int32)

    QueryParameter

    limit

    limit is a maximum number of responses to return for a list call. If more items exist, the server will set the continue field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. +

    The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.

    false

    integer (int32)

    QueryParameter

    continue

    The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the "next key". +

    This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.

    false

    string

    + +
    +
    +

    Responses

    + +++++ + + + + + + + + + + + + + + +
    HTTP CodeDescriptionSchema

    200

    success

    v1.WatchEvent

    + +
    +
    +

    Consumes

    +
    +
      +
    • +

      /

      +
    • +
    +
    +
    +
    +

    Produces

    +
    +
      +
    • +

      application/json

      +
    • +
    • +

      application/yaml

      +
    • +
    • +

      application/vnd.kubernetes.protobuf

      +
    • +
    • +

      application/json;stream=watch

      +
    • +
    • +

      application/vnd.kubernetes.protobuf;stream=watch

      +
    • +
    +
    +
    +
    +

    Tags

    +
    +
      +
    • +

      apisstorage.k8s.iov1

      +
    • +
    +
    +
    +
    +
    +

    watch changes to an object of kind VolumeAttachment. deprecated: use the watch parameter with a list operation instead, filtered to a single item with the fieldSelector parameter.

    +
    +
    +
    GET /apis/storage.k8s.io/v1/watch/volumeattachments/{name}
    +
    +
    +
    +

    Parameters

    + ++++++++ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    TypeNameDescriptionRequiredSchemaDefault

    QueryParameter

    pretty

    If true, then the output is pretty printed.

    false

    string

    QueryParameter

    labelSelector

    A selector to restrict the list of returned objects by their labels. Defaults to everything.

    false

    string

    QueryParameter

    fieldSelector

    A selector to restrict the list of returned objects by their fields. Defaults to everything.

    false

    string

    QueryParameter

    includeUninitialized

    If true, partially initialized resources are included in the response.

    false

    boolean

    QueryParameter

    watch

    Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.

    false

    boolean

    QueryParameter

    resourceVersion

    When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it’s 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.

    false

    string

    QueryParameter

    timeoutSeconds

    Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.

    false

    integer (int32)

    QueryParameter

    limit

    limit is a maximum number of responses to return for a list call. If more items exist, the server will set the continue field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. +

    The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.

    false

    integer (int32)

    QueryParameter

    continue

    The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the "next key". +

    This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.

    false

    string

    PathParameter

    name

    name of the VolumeAttachment

    true

    string

    + +
    +
    +

    Responses

    + +++++ + + + + + + + + + + + + + + +
    HTTP CodeDescriptionSchema

    200

    success

    v1.WatchEvent

    + +
    +
    +

    Consumes

    +
    +
      +
    • +

      /

      +
    • +
    +
    +
    +
    +

    Produces

    +
    +
      +
    • +

      application/json

      +
    • +
    • +

      application/yaml

      +
    • +
    • +

      application/vnd.kubernetes.protobuf

      +
    • +
    • +

      application/json;stream=watch

      +
    • +
    • +

      application/vnd.kubernetes.protobuf;stream=watch

      +
    • +
    +
    +
    +
    +

    Tags

    • diff --git a/pkg/apis/storage/validation/validation.go b/pkg/apis/storage/validation/validation.go index c6e50ed2f5..d7278b6908 100644 --- a/pkg/apis/storage/validation/validation.go +++ b/pkg/apis/storage/validation/validation.go @@ -218,6 +218,7 @@ func ValidateVolumeAttachmentUpdate(new, old *storage.VolumeAttachment) field.Er allErrs := ValidateVolumeAttachment(new) // Spec is read-only + // If this ever relaxes in the future, make sure to increment the Generation number in PrepareForUpdate if !apiequality.Semantic.DeepEqual(old.Spec, new.Spec) { allErrs = append(allErrs, field.Invalid(field.NewPath("spec"), new.Spec, "field is immutable")) } diff --git a/pkg/registry/storage/rest/storage_storage.go b/pkg/registry/storage/rest/storage_storage.go index 6445f807a5..f799226001 100644 --- a/pkg/registry/storage/rest/storage_storage.go +++ b/pkg/registry/storage/rest/storage_storage.go @@ -54,8 +54,8 @@ func (p RESTStorageProvider) NewRESTStorage(apiResourceConfigSource serverstorag func (p RESTStorageProvider) v1alpha1Storage(apiResourceConfigSource serverstorage.APIResourceConfigSource, restOptionsGetter generic.RESTOptionsGetter) map[string]rest.Storage { storage := map[string]rest.Storage{} // volumeattachments - volumeAttachmentStorage := volumeattachmentstore.NewREST(restOptionsGetter) - storage["volumeattachments"] = volumeAttachmentStorage + volumeAttachmentStorage := volumeattachmentstore.NewStorage(restOptionsGetter) + storage["volumeattachments"] = volumeAttachmentStorage.VolumeAttachment return storage } @@ -67,21 +67,24 @@ func (p RESTStorageProvider) v1beta1Storage(apiResourceConfigSource serverstorag storage["storageclasses"] = storageClassStorage // volumeattachments - volumeAttachmentStorage := volumeattachmentstore.NewREST(restOptionsGetter) - storage["volumeattachments"] = volumeAttachmentStorage + volumeAttachmentStorage := volumeattachmentstore.NewStorage(restOptionsGetter) + storage["volumeattachments"] = volumeAttachmentStorage.VolumeAttachment return storage } func (p RESTStorageProvider) v1Storage(apiResourceConfigSource serverstorage.APIResourceConfigSource, restOptionsGetter generic.RESTOptionsGetter) map[string]rest.Storage { - storage := map[string]rest.Storage{} - // storageclasses storageClassStorage := storageclassstore.NewREST(restOptionsGetter) - storage["storageclasses"] = storageClassStorage + volumeAttachmentStorage := volumeattachmentstore.NewStorage(restOptionsGetter) - // volumeattachments - volumeAttachmentStorage := volumeattachmentstore.NewREST(restOptionsGetter) - storage["volumeattachments"] = volumeAttachmentStorage + storage := map[string]rest.Storage{ + // storageclasses + "storageclasses": storageClassStorage, + + // volumeattachments + "volumeattachments": volumeAttachmentStorage.VolumeAttachment, + "volumeattachments/status": volumeAttachmentStorage.Status, + } return storage } diff --git a/pkg/registry/storage/volumeattachment/BUILD b/pkg/registry/storage/volumeattachment/BUILD index 5fa8cbd44b..252a76c6f8 100644 --- a/pkg/registry/storage/volumeattachment/BUILD +++ b/pkg/registry/storage/volumeattachment/BUILD @@ -12,8 +12,11 @@ go_library( "//pkg/api/legacyscheme:go_default_library", "//pkg/apis/storage:go_default_library", "//pkg/apis/storage/validation:go_default_library", + "//staging/src/k8s.io/api/storage/v1beta1:go_default_library", "//staging/src/k8s.io/apimachinery/pkg/runtime:go_default_library", + "//staging/src/k8s.io/apimachinery/pkg/runtime/schema:go_default_library", "//staging/src/k8s.io/apimachinery/pkg/util/validation/field:go_default_library", + "//staging/src/k8s.io/apiserver/pkg/endpoints/request:go_default_library", "//staging/src/k8s.io/apiserver/pkg/storage/names:go_default_library", ], ) @@ -24,7 +27,9 @@ go_test( embed = [":go_default_library"], deps = [ "//pkg/apis/storage:go_default_library", + "//staging/src/k8s.io/apimachinery/pkg/api/equality:go_default_library", "//staging/src/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", + "//staging/src/k8s.io/apimachinery/pkg/util/diff:go_default_library", "//staging/src/k8s.io/apiserver/pkg/endpoints/request:go_default_library", ], ) diff --git a/pkg/registry/storage/volumeattachment/storage/BUILD b/pkg/registry/storage/volumeattachment/storage/BUILD index 0ed148659e..9d1389020c 100644 --- a/pkg/registry/storage/volumeattachment/storage/BUILD +++ b/pkg/registry/storage/volumeattachment/storage/BUILD @@ -8,9 +8,11 @@ go_library( deps = [ "//pkg/apis/storage:go_default_library", "//pkg/registry/storage/volumeattachment:go_default_library", + "//staging/src/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", "//staging/src/k8s.io/apimachinery/pkg/runtime:go_default_library", "//staging/src/k8s.io/apiserver/pkg/registry/generic:go_default_library", "//staging/src/k8s.io/apiserver/pkg/registry/generic/registry:go_default_library", + "//staging/src/k8s.io/apiserver/pkg/registry/rest:go_default_library", ], ) @@ -19,17 +21,18 @@ go_test( srcs = ["storage_test.go"], embed = [":go_default_library"], deps = [ - "//pkg/api/testapi:go_default_library", "//pkg/apis/storage:go_default_library", "//pkg/registry/registrytest:go_default_library", - "//staging/src/k8s.io/api/storage/v1alpha1:go_default_library", - "//staging/src/k8s.io/api/storage/v1beta1:go_default_library", + "//staging/src/k8s.io/apimachinery/pkg/api/equality:go_default_library", "//staging/src/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", "//staging/src/k8s.io/apimachinery/pkg/fields:go_default_library", "//staging/src/k8s.io/apimachinery/pkg/labels:go_default_library", "//staging/src/k8s.io/apimachinery/pkg/runtime:go_default_library", + "//staging/src/k8s.io/apimachinery/pkg/util/diff:go_default_library", + "//staging/src/k8s.io/apiserver/pkg/endpoints/request:go_default_library", "//staging/src/k8s.io/apiserver/pkg/registry/generic:go_default_library", "//staging/src/k8s.io/apiserver/pkg/registry/generic/testing:go_default_library", + "//staging/src/k8s.io/apiserver/pkg/registry/rest:go_default_library", "//staging/src/k8s.io/apiserver/pkg/storage/etcd/testing:go_default_library", ], ) diff --git a/pkg/registry/storage/volumeattachment/storage/storage.go b/pkg/registry/storage/volumeattachment/storage/storage.go index 28a3208e41..df8c470c89 100644 --- a/pkg/registry/storage/volumeattachment/storage/storage.go +++ b/pkg/registry/storage/volumeattachment/storage/storage.go @@ -17,20 +17,30 @@ limitations under the License. package storage import ( + "context" + + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/runtime" "k8s.io/apiserver/pkg/registry/generic" genericregistry "k8s.io/apiserver/pkg/registry/generic/registry" + "k8s.io/apiserver/pkg/registry/rest" storageapi "k8s.io/kubernetes/pkg/apis/storage" "k8s.io/kubernetes/pkg/registry/storage/volumeattachment" ) -// REST object that will work against persistent volumes. +// VolumeAttachmentStorage includes storage for VolumeAttachments and all subresources +type VolumeAttachmentStorage struct { + VolumeAttachment *REST + Status *StatusREST +} + +// REST object that will work for VolumeAttachments type REST struct { *genericregistry.Store } -// NewREST returns a RESTStorage object that will work against persistent volumes. -func NewREST(optsGetter generic.RESTOptionsGetter) *REST { +// NewStorage returns a RESTStorage object that will work against VolumeAttachments +func NewStorage(optsGetter generic.RESTOptionsGetter) *VolumeAttachmentStorage { store := &genericregistry.Store{ NewFunc: func() runtime.Object { return &storageapi.VolumeAttachment{} }, NewListFunc: func() runtime.Object { return &storageapi.VolumeAttachmentList{} }, @@ -46,5 +56,33 @@ func NewREST(optsGetter generic.RESTOptionsGetter) *REST { panic(err) // TODO: Propagate error up } - return &REST{store} + statusStore := *store + statusStore.UpdateStrategy = volumeattachment.StatusStrategy + + return &VolumeAttachmentStorage{ + VolumeAttachment: &REST{store}, + Status: &StatusREST{store: &statusStore}, + } +} + +// StatusREST implements the REST endpoint for changing the status of a VolumeAttachment +type StatusREST struct { + store *genericregistry.Store +} + +// New creates a new VolumeAttachment resource +func (r *StatusREST) New() runtime.Object { + return &storageapi.VolumeAttachment{} +} + +// Get retrieves the object from the storage. It is required to support Patch. +func (r *StatusREST) Get(ctx context.Context, name string, options *metav1.GetOptions) (runtime.Object, error) { + return r.store.Get(ctx, name, options) +} + +// Update alters the status subset of an object. +func (r *StatusREST) Update(ctx context.Context, name string, objInfo rest.UpdatedObjectInfo, createValidation rest.ValidateObjectFunc, updateValidation rest.ValidateObjectUpdateFunc, forceAllowCreate bool, options *metav1.UpdateOptions) (runtime.Object, bool, error) { + // We are explicitly setting forceAllowCreate to false in the call to the underlying storage because + // subresources should never allow create on update. + return r.store.Update(ctx, name, objInfo, createValidation, updateValidation, false, options) } diff --git a/pkg/registry/storage/volumeattachment/storage/storage_test.go b/pkg/registry/storage/volumeattachment/storage/storage_test.go index 7e2d389af6..10b61ba597 100644 --- a/pkg/registry/storage/volumeattachment/storage/storage_test.go +++ b/pkg/registry/storage/volumeattachment/storage/storage_test.go @@ -19,21 +19,22 @@ package storage import ( "testing" - storageapiv1alpha1 "k8s.io/api/storage/v1alpha1" - storageapiv1beta1 "k8s.io/api/storage/v1beta1" + apiequality "k8s.io/apimachinery/pkg/api/equality" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/fields" "k8s.io/apimachinery/pkg/labels" "k8s.io/apimachinery/pkg/runtime" + "k8s.io/apimachinery/pkg/util/diff" + genericapirequest "k8s.io/apiserver/pkg/endpoints/request" "k8s.io/apiserver/pkg/registry/generic" genericregistrytest "k8s.io/apiserver/pkg/registry/generic/testing" + "k8s.io/apiserver/pkg/registry/rest" etcdtesting "k8s.io/apiserver/pkg/storage/etcd/testing" - "k8s.io/kubernetes/pkg/api/testapi" storageapi "k8s.io/kubernetes/pkg/apis/storage" "k8s.io/kubernetes/pkg/registry/registrytest" ) -func newStorage(t *testing.T) (*REST, *etcdtesting.EtcdTestServer) { +func newStorage(t *testing.T) (*REST, *StatusREST, *etcdtesting.EtcdTestServer) { etcdStorage, server := registrytest.NewEtcdStorage(t, storageapi.GroupName) restOptions := generic.RESTOptions{ StorageConfig: etcdStorage, @@ -41,8 +42,8 @@ func newStorage(t *testing.T) (*REST, *etcdtesting.EtcdTestServer) { DeleteCollectionWorkers: 1, ResourcePrefix: "volumeattachments", } - volumeAttachmentStorage := NewREST(restOptions) - return volumeAttachmentStorage, server + volumeAttachmentStorage := NewStorage(restOptions) + return volumeAttachmentStorage.VolumeAttachment, volumeAttachmentStorage.Status, server } func validNewVolumeAttachment(name string) *storageapi.VolumeAttachment { @@ -62,13 +63,7 @@ func validNewVolumeAttachment(name string) *storageapi.VolumeAttachment { } func TestCreate(t *testing.T) { - if *testapi.Storage.GroupVersion() != storageapiv1alpha1.SchemeGroupVersion && - *testapi.Storage.GroupVersion() != storageapiv1beta1.SchemeGroupVersion { - // skip the test for all versions exception v1alpha1 and v1beta1 - return - } - - storage, server := newStorage(t) + storage, _, server := newStorage(t) defer server.Terminate(t) defer storage.Store.DestroyFunc() test := genericregistrytest.New(t, storage.Store).ClusterScope() @@ -93,20 +88,16 @@ func TestCreate(t *testing.T) { } func TestUpdate(t *testing.T) { - if *testapi.Storage.GroupVersion() != storageapiv1alpha1.SchemeGroupVersion && - *testapi.Storage.GroupVersion() != storageapiv1beta1.SchemeGroupVersion { - // skip the test for all versions exception v1alpha1 and v1beta1 - return - } - - storage, server := newStorage(t) + storage, _, server := newStorage(t) defer server.Terminate(t) defer storage.Store.DestroyFunc() test := genericregistrytest.New(t, storage.Store).ClusterScope() + test.TestUpdate( // valid validNewVolumeAttachment("foo"), - // updateFunc + // we still allow status field to be set in both v1 and v1beta1 + // it is just that in v1 the new value does not take effect. func(obj runtime.Object) runtime.Object { object := obj.(*storageapi.VolumeAttachment) object.Status.Attached = true @@ -122,13 +113,7 @@ func TestUpdate(t *testing.T) { } func TestDelete(t *testing.T) { - if *testapi.Storage.GroupVersion() != storageapiv1alpha1.SchemeGroupVersion && - *testapi.Storage.GroupVersion() != storageapiv1beta1.SchemeGroupVersion { - // skip the test for all versions exception v1alpha1 and v1beta1 - return - } - - storage, server := newStorage(t) + storage, _, server := newStorage(t) defer server.Terminate(t) defer storage.Store.DestroyFunc() test := genericregistrytest.New(t, storage.Store).ClusterScope().ReturnDeletedObject() @@ -136,13 +121,7 @@ func TestDelete(t *testing.T) { } func TestGet(t *testing.T) { - if *testapi.Storage.GroupVersion() != storageapiv1alpha1.SchemeGroupVersion && - *testapi.Storage.GroupVersion() != storageapiv1beta1.SchemeGroupVersion { - // skip the test for all versions exception v1alpha1 and v1beta1 - return - } - - storage, server := newStorage(t) + storage, _, server := newStorage(t) defer server.Terminate(t) defer storage.Store.DestroyFunc() test := genericregistrytest.New(t, storage.Store).ClusterScope() @@ -150,13 +129,7 @@ func TestGet(t *testing.T) { } func TestList(t *testing.T) { - if *testapi.Storage.GroupVersion() != storageapiv1alpha1.SchemeGroupVersion && - *testapi.Storage.GroupVersion() != storageapiv1beta1.SchemeGroupVersion { - // skip the test for all versions exception v1alpha1 and v1beta1 - return - } - - storage, server := newStorage(t) + storage, _, server := newStorage(t) defer server.Terminate(t) defer storage.Store.DestroyFunc() test := genericregistrytest.New(t, storage.Store).ClusterScope() @@ -164,13 +137,7 @@ func TestList(t *testing.T) { } func TestWatch(t *testing.T) { - if *testapi.Storage.GroupVersion() != storageapiv1alpha1.SchemeGroupVersion && - *testapi.Storage.GroupVersion() != storageapiv1beta1.SchemeGroupVersion { - // skip the test for all versions exception v1alpha1 and v1beta1 - return - } - - storage, server := newStorage(t) + storage, _, server := newStorage(t) defer server.Terminate(t) defer storage.Store.DestroyFunc() test := genericregistrytest.New(t, storage.Store).ClusterScope() @@ -192,3 +159,41 @@ func TestWatch(t *testing.T) { }, ) } + +func TestEtcdStatusUpdate(t *testing.T) { + storage, statusStorage, server := newStorage(t) + defer server.Terminate(t) + defer storage.Store.DestroyFunc() + ctx := genericapirequest.NewDefaultContext() + + attachment := validNewVolumeAttachment("foo") + if _, err := storage.Create(ctx, attachment, rest.ValidateAllObjectFunc, &metav1.CreateOptions{}); err != nil { + t.Fatalf("unexpected error: %v", err) + } + obj, err := storage.Get(ctx, attachment.ObjectMeta.Name, &metav1.GetOptions{}) + if err != nil { + t.Errorf("unexpected error: %v", err) + } + + // update status + attachmentIn := obj.(*storageapi.VolumeAttachment).DeepCopy() + attachmentIn.Status.Attached = true + + _, _, err = statusStorage.Update(ctx, attachmentIn.Name, rest.DefaultUpdatedObjectInfo(attachmentIn), rest.ValidateAllObjectFunc, rest.ValidateAllObjectUpdateFunc, false, &metav1.UpdateOptions{}) + if err != nil { + t.Fatalf("Failed to update status: %v", err) + } + + // validate object got updated + obj, err = storage.Get(ctx, attachmentIn.ObjectMeta.Name, &metav1.GetOptions{}) + if err != nil { + t.Errorf("unexpected error: %v", err) + } + attachmentOut := obj.(*storageapi.VolumeAttachment) + if !apiequality.Semantic.DeepEqual(attachmentIn.Spec, attachmentOut.Spec) { + t.Errorf("objects differ: %v", diff.ObjectDiff(attachmentOut.Spec, attachmentIn.Spec)) + } + if !apiequality.Semantic.DeepEqual(attachmentIn.Status, attachmentOut.Status) { + t.Errorf("objects differ: %v", diff.ObjectDiff(attachmentOut.Status, attachmentIn.Status)) + } +} diff --git a/pkg/registry/storage/volumeattachment/strategy.go b/pkg/registry/storage/volumeattachment/strategy.go index 9ee76f1874..bdf912be3c 100644 --- a/pkg/registry/storage/volumeattachment/strategy.go +++ b/pkg/registry/storage/volumeattachment/strategy.go @@ -19,8 +19,11 @@ package volumeattachment import ( "context" + storageapiv1beta1 "k8s.io/api/storage/v1beta1" "k8s.io/apimachinery/pkg/runtime" + "k8s.io/apimachinery/pkg/runtime/schema" "k8s.io/apimachinery/pkg/util/validation/field" + genericapirequest "k8s.io/apiserver/pkg/endpoints/request" "k8s.io/apiserver/pkg/storage/names" "k8s.io/kubernetes/pkg/api/legacyscheme" "k8s.io/kubernetes/pkg/apis/storage" @@ -43,6 +46,19 @@ func (volumeAttachmentStrategy) NamespaceScoped() bool { // ResetBeforeCreate clears the Status field which is not allowed to be set by end users on creation. func (volumeAttachmentStrategy) PrepareForCreate(ctx context.Context, obj runtime.Object) { + var groupVersion schema.GroupVersion + + if requestInfo, found := genericapirequest.RequestInfoFrom(ctx); found { + groupVersion = schema.GroupVersion{Group: requestInfo.APIGroup, Version: requestInfo.APIVersion} + } + + switch groupVersion { + case storageapiv1beta1.SchemeGroupVersion: + // allow modification of status for v1beta1 + default: + volumeAttachment := obj.(*storage.VolumeAttachment) + volumeAttachment.Status = storage.VolumeAttachmentStatus{} + } } func (volumeAttachmentStrategy) Validate(ctx context.Context, obj runtime.Object) field.ErrorList { @@ -58,8 +74,22 @@ func (volumeAttachmentStrategy) AllowCreateOnUpdate() bool { return false } -// PrepareForUpdate sets the Status fields which is not allowed to be set by an end user updating a PV +// PrepareForUpdate sets the Status fields which is not allowed to be set by an end user updating a VolumeAttachment func (volumeAttachmentStrategy) PrepareForUpdate(ctx context.Context, obj, old runtime.Object) { + var groupVersion schema.GroupVersion + + if requestInfo, found := genericapirequest.RequestInfoFrom(ctx); found { + groupVersion = schema.GroupVersion{Group: requestInfo.APIGroup, Version: requestInfo.APIVersion} + } + switch groupVersion { + case storageapiv1beta1.SchemeGroupVersion: + // allow modification of Status via main resource for v1beta1 + default: + newVolumeAttachment := obj.(*storage.VolumeAttachment) + oldVolumeAttachment := old.(*storage.VolumeAttachment) + newVolumeAttachment.Status = oldVolumeAttachment.Status + // No need to increment Generation because we don't allow updates to spec + } } func (volumeAttachmentStrategy) ValidateUpdate(ctx context.Context, obj, old runtime.Object) field.ErrorList { @@ -72,3 +102,30 @@ func (volumeAttachmentStrategy) ValidateUpdate(ctx context.Context, obj, old run func (volumeAttachmentStrategy) AllowUnconditionalUpdate() bool { return false } + +// volumeAttachmentStatusStrategy implements behavior for VolumeAttachmentStatus subresource +type volumeAttachmentStatusStrategy struct { + volumeAttachmentStrategy +} + +// StatusStrategy is the default logic that applies when creating and updating +// VolumeAttachmentStatus subresource via the REST API. +var StatusStrategy = volumeAttachmentStatusStrategy{Strategy} + +// PrepareForUpdate sets the Status fields which is not allowed to be set by an end user updating a VolumeAttachment +func (volumeAttachmentStatusStrategy) PrepareForUpdate(ctx context.Context, obj, old runtime.Object) { + newVolumeAttachment := obj.(*storage.VolumeAttachment) + oldVolumeAttachment := old.(*storage.VolumeAttachment) + + newVolumeAttachment.Spec = oldVolumeAttachment.Spec + + oldMeta := oldVolumeAttachment.ObjectMeta + newMeta := &newVolumeAttachment.ObjectMeta + newMeta.SetDeletionTimestamp(oldMeta.GetDeletionTimestamp()) + newMeta.SetGeneration(oldMeta.GetGeneration()) + newMeta.SetSelfLink(oldMeta.GetSelfLink()) + newMeta.SetLabels(oldMeta.GetLabels()) + newMeta.SetAnnotations(oldMeta.GetAnnotations()) + newMeta.SetFinalizers(oldMeta.GetFinalizers()) + newMeta.SetOwnerReferences(oldMeta.GetOwnerReferences()) +} diff --git a/pkg/registry/storage/volumeattachment/strategy_test.go b/pkg/registry/storage/volumeattachment/strategy_test.go index 33e8985e79..4be7184232 100644 --- a/pkg/registry/storage/volumeattachment/strategy_test.go +++ b/pkg/registry/storage/volumeattachment/strategy_test.go @@ -19,13 +19,34 @@ package volumeattachment import ( "testing" + apiequality "k8s.io/apimachinery/pkg/api/equality" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/util/diff" genericapirequest "k8s.io/apiserver/pkg/endpoints/request" "k8s.io/kubernetes/pkg/apis/storage" ) +func getValidVolumeAttachment(name string) *storage.VolumeAttachment { + return &storage.VolumeAttachment{ + ObjectMeta: metav1.ObjectMeta{ + Name: name, + }, + Spec: storage.VolumeAttachmentSpec{ + Attacher: "valid-attacher", + Source: storage.VolumeAttachmentSource{ + PersistentVolumeName: &name, + }, + NodeName: "valid-node", + }, + } +} + func TestVolumeAttachmentStrategy(t *testing.T) { - ctx := genericapirequest.NewDefaultContext() + ctx := genericapirequest.WithRequestInfo(genericapirequest.NewContext(), &genericapirequest.RequestInfo{ + APIGroup: "storage.k8s.io", + APIVersion: "v1", + Resource: "volumeattachments", + }) if Strategy.NamespaceScoped() { t.Errorf("VolumeAttachment must not be namespace scoped") } @@ -33,19 +54,7 @@ func TestVolumeAttachmentStrategy(t *testing.T) { t.Errorf("VolumeAttachment should not allow create on update") } - pvName := "name" - volumeAttachment := &storage.VolumeAttachment{ - ObjectMeta: metav1.ObjectMeta{ - Name: "valid-attachment", - }, - Spec: storage.VolumeAttachmentSpec{ - Attacher: "valid-attacher", - Source: storage.VolumeAttachmentSource{ - PersistentVolumeName: &pvName, - }, - NodeName: "valid-node", - }, - } + volumeAttachment := getValidVolumeAttachment("valid-attachment") Strategy.PrepareForCreate(ctx, volumeAttachment) @@ -54,19 +63,18 @@ func TestVolumeAttachmentStrategy(t *testing.T) { t.Errorf("unexpected error validating %v", errs) } - newVolumeAttachment := &storage.VolumeAttachment{ - ObjectMeta: metav1.ObjectMeta{ - Name: "valid-attachment-2", - }, - Spec: storage.VolumeAttachmentSpec{ - Attacher: "valid-attacher-2", - Source: storage.VolumeAttachmentSource{ - PersistentVolumeName: &pvName, - }, - NodeName: "valid-node-2", - }, + // Create with status should drop status + statusVolumeAttachment := volumeAttachment.DeepCopy() + statusVolumeAttachment.Status = storage.VolumeAttachmentStatus{Attached: true} + Strategy.PrepareForCreate(ctx, statusVolumeAttachment) + if !apiequality.Semantic.DeepEqual(statusVolumeAttachment, volumeAttachment) { + t.Errorf("unexpected objects difference after creating with status: %v", diff.ObjectDiff(statusVolumeAttachment, volumeAttachment)) } + // Update of spec is disallowed + newVolumeAttachment := volumeAttachment.DeepCopy() + newVolumeAttachment.Spec.NodeName = "valid-node-2" + Strategy.PrepareForUpdate(ctx, newVolumeAttachment, volumeAttachment) errs = Strategy.ValidateUpdate(ctx, newVolumeAttachment, volumeAttachment) @@ -74,4 +82,116 @@ func TestVolumeAttachmentStrategy(t *testing.T) { t.Errorf("Expected a validation error") } + // modifying status should be dropped + statusVolumeAttachment = volumeAttachment.DeepCopy() + statusVolumeAttachment.Status = storage.VolumeAttachmentStatus{Attached: true} + + Strategy.PrepareForUpdate(ctx, statusVolumeAttachment, volumeAttachment) + + if !apiequality.Semantic.DeepEqual(statusVolumeAttachment, volumeAttachment) { + t.Errorf("unexpected objects difference after modfying status: %v", diff.ObjectDiff(statusVolumeAttachment, volumeAttachment)) + } +} + +func TestVolumeAttachmentStatusStrategy(t *testing.T) { + ctx := genericapirequest.WithRequestInfo(genericapirequest.NewContext(), &genericapirequest.RequestInfo{ + APIGroup: "storage.k8s.io", + APIVersion: "v1", + Resource: "volumeattachments", + }) + + volumeAttachment := getValidVolumeAttachment("valid-attachment") + + // modifying status should be allowed + statusVolumeAttachment := volumeAttachment.DeepCopy() + statusVolumeAttachment.Status = storage.VolumeAttachmentStatus{Attached: true} + + expectedVolumeAttachment := statusVolumeAttachment.DeepCopy() + StatusStrategy.PrepareForUpdate(ctx, statusVolumeAttachment, volumeAttachment) + if !apiequality.Semantic.DeepEqual(statusVolumeAttachment, expectedVolumeAttachment) { + t.Errorf("unexpected objects differerence after modifying status: %v", diff.ObjectDiff(statusVolumeAttachment, expectedVolumeAttachment)) + } + + // modifying spec should be dropped + newVolumeAttachment := volumeAttachment.DeepCopy() + newVolumeAttachment.Spec.NodeName = "valid-node-2" + + StatusStrategy.PrepareForUpdate(ctx, newVolumeAttachment, volumeAttachment) + if !apiequality.Semantic.DeepEqual(newVolumeAttachment, volumeAttachment) { + t.Errorf("unexpected objects differerence after modifying spec: %v", diff.ObjectDiff(newVolumeAttachment, volumeAttachment)) + } +} + +func TestBetaAndV1StatusUpdate(t *testing.T) { + tests := []struct { + requestInfo genericapirequest.RequestInfo + newStatus bool + expectedStatus bool + }{ + { + genericapirequest.RequestInfo{ + APIGroup: "storage.k8s.io", + APIVersion: "v1", + Resource: "volumeattachments", + }, + true, + false, + }, + { + genericapirequest.RequestInfo{ + APIGroup: "storage.k8s.io", + APIVersion: "v1beta1", + Resource: "volumeattachments", + }, + true, + true, + }, + } + for _, test := range tests { + va := getValidVolumeAttachment("valid-attachment") + newAttachment := va.DeepCopy() + newAttachment.Status.Attached = test.newStatus + context := genericapirequest.WithRequestInfo(genericapirequest.NewContext(), &test.requestInfo) + Strategy.PrepareForUpdate(context, newAttachment, va) + if newAttachment.Status.Attached != test.expectedStatus { + t.Errorf("expected status to be %v got %v", test.expectedStatus, newAttachment.Status.Attached) + } + } + +} + +func TestBetaAndV1StatusCreate(t *testing.T) { + tests := []struct { + requestInfo genericapirequest.RequestInfo + newStatus bool + expectedStatus bool + }{ + { + genericapirequest.RequestInfo{ + APIGroup: "storage.k8s.io", + APIVersion: "v1", + Resource: "volumeattachments", + }, + true, + false, + }, + { + genericapirequest.RequestInfo{ + APIGroup: "storage.k8s.io", + APIVersion: "v1beta1", + Resource: "volumeattachments", + }, + true, + true, + }, + } + for _, test := range tests { + va := getValidVolumeAttachment("valid-attachment") + va.Status.Attached = test.newStatus + context := genericapirequest.WithRequestInfo(genericapirequest.NewContext(), &test.requestInfo) + Strategy.PrepareForCreate(context, va) + if va.Status.Attached != test.expectedStatus { + t.Errorf("expected status to be %v got %v", test.expectedStatus, va.Status.Attached) + } + } } diff --git a/pkg/volume/csi/csi_attacher.go b/pkg/volume/csi/csi_attacher.go index bc86d12f9d..4bebf1ff72 100644 --- a/pkg/volume/csi/csi_attacher.go +++ b/pkg/volume/csi/csi_attacher.go @@ -95,7 +95,6 @@ func (c *csiAttacher) Attach(spec *volume.Spec, nodeName types.NodeName) (string PersistentVolumeName: &pvName, }, }, - Status: storage.VolumeAttachmentStatus{Attached: false}, } _, err = c.k8s.StorageV1beta1().VolumeAttachments().Create(attachment)