From fde414601e479c2854bde805d4cc1f657f159ffc Mon Sep 17 00:00:00 2001 From: wackxu Date: Fri, 13 Apr 2018 14:51:04 +0800 Subject: [PATCH 1/2] update comments for local volume --- pkg/apis/core/types.go | 10 ++++++---- staging/src/k8s.io/api/core/v1/types.go | 10 ++++++---- 2 files changed, 12 insertions(+), 8 deletions(-) diff --git a/pkg/apis/core/types.go b/pkg/apis/core/types.go index 7cef78b8f3b..054543de9c4 100644 --- a/pkg/apis/core/types.go +++ b/pkg/apis/core/types.go @@ -1434,11 +1434,13 @@ type KeyToPath struct { Mode *int32 } -// Local represents directly-attached storage with node affinity +// Local represents directly-attached storage with node affinity (Beta feature) type LocalVolumeSource struct { - // The full path to the volume on the node - // For alpha, this path must be a directory - // Once block as a source is supported, then this path can point to a block device + // The full path to the volume on the node. + // It can be either a directory or block device (disk, partition, ...). + // Directories can be represented only by PersistentVolume with VolumeMode=Filesystem. + // Block devices can be represented only by VolumeMode=Block, which also requires the + // BlockVolume alpha feature gate to be enabled. Path string } diff --git a/staging/src/k8s.io/api/core/v1/types.go b/staging/src/k8s.io/api/core/v1/types.go index 90f012d50ac..fd1faedfb4d 100644 --- a/staging/src/k8s.io/api/core/v1/types.go +++ b/staging/src/k8s.io/api/core/v1/types.go @@ -1513,11 +1513,13 @@ type KeyToPath struct { Mode *int32 `json:"mode,omitempty" protobuf:"varint,3,opt,name=mode"` } -// Local represents directly-attached storage with node affinity +// Local represents directly-attached storage with node affinity (Beta feature) type LocalVolumeSource struct { - // The full path to the volume on the node - // For alpha, this path must be a directory - // Once block as a source is supported, then this path can point to a block device + // The full path to the volume on the node. + // It can be either a directory or block device (disk, partition, ...). + // Directories can be represented only by PersistentVolume with VolumeMode=Filesystem. + // Block devices can be represented only by VolumeMode=Block, which also requires the + // BlockVolume alpha feature gate to be enabled. Path string `json:"path" protobuf:"bytes,1,opt,name=path"` } From 2f648ede63d6301003c0f3058e5e450206bfb61a Mon Sep 17 00:00:00 2001 From: wackxu Date: Fri, 13 Apr 2018 15:11:43 +0800 Subject: [PATCH 2/2] add generate file --- api/openapi-spec/swagger.json | 4 ++-- api/swagger-spec/v1.json | 4 ++-- docs/api-reference/v1/definitions.html | 4 ++-- staging/src/k8s.io/api/core/v1/generated.proto | 10 ++++++---- .../k8s.io/api/core/v1/types_swagger_doc_generated.go | 4 ++-- 5 files changed, 14 insertions(+), 12 deletions(-) diff --git a/api/openapi-spec/swagger.json b/api/openapi-spec/swagger.json index 66c8520117f..cd01ee97695 100644 --- a/api/openapi-spec/swagger.json +++ b/api/openapi-spec/swagger.json @@ -77022,13 +77022,13 @@ } }, "io.k8s.api.core.v1.LocalVolumeSource": { - "description": "Local represents directly-attached storage with node affinity", + "description": "Local represents directly-attached storage with node affinity (Beta feature)", "required": [ "path" ], "properties": { "path": { - "description": "The full path to the volume on the node For alpha, this path must be a directory Once block as a source is supported, then this path can point to a block device", + "description": "The full path to the volume on the node. It can be either a directory or block device (disk, partition, ...). Directories can be represented only by PersistentVolume with VolumeMode=Filesystem. Block devices can be represented only by VolumeMode=Block, which also requires the BlockVolume alpha feature gate to be enabled.", "type": "string" } } diff --git a/api/swagger-spec/v1.json b/api/swagger-spec/v1.json index 3f1198efdf4..6912b8751f2 100644 --- a/api/swagger-spec/v1.json +++ b/api/swagger-spec/v1.json @@ -19949,14 +19949,14 @@ }, "v1.LocalVolumeSource": { "id": "v1.LocalVolumeSource", - "description": "Local represents directly-attached storage with node affinity", + "description": "Local represents directly-attached storage with node affinity (Beta feature)", "required": [ "path" ], "properties": { "path": { "type": "string", - "description": "The full path to the volume on the node For alpha, this path must be a directory Once block as a source is supported, then this path can point to a block device" + "description": "The full path to the volume on the node. It can be either a directory or block device (disk, partition, ...). Directories can be represented only by PersistentVolume with VolumeMode=Filesystem. Block devices can be represented only by VolumeMode=Block, which also requires the BlockVolume alpha feature gate to be enabled." } } }, diff --git a/docs/api-reference/v1/definitions.html b/docs/api-reference/v1/definitions.html index d3fdf533cde..bb5a0170ff5 100755 --- a/docs/api-reference/v1/definitions.html +++ b/docs/api-reference/v1/definitions.html @@ -6491,7 +6491,7 @@ Examples:

v1.LocalVolumeSource

-

Local represents directly-attached storage with node affinity

+

Local represents directly-attached storage with node affinity (Beta feature)

@@ -6513,7 +6513,7 @@ Examples:
- + diff --git a/staging/src/k8s.io/api/core/v1/generated.proto b/staging/src/k8s.io/api/core/v1/generated.proto index e242c0b5728..87a2ebfd64f 100644 --- a/staging/src/k8s.io/api/core/v1/generated.proto +++ b/staging/src/k8s.io/api/core/v1/generated.proto @@ -1659,11 +1659,13 @@ message LocalObjectReference { optional string name = 1; } -// Local represents directly-attached storage with node affinity +// Local represents directly-attached storage with node affinity (Beta feature) message LocalVolumeSource { - // The full path to the volume on the node - // For alpha, this path must be a directory - // Once block as a source is supported, then this path can point to a block device + // The full path to the volume on the node. + // It can be either a directory or block device (disk, partition, ...). + // Directories can be represented only by PersistentVolume with VolumeMode=Filesystem. + // Block devices can be represented only by VolumeMode=Block, which also requires the + // BlockVolume alpha feature gate to be enabled. optional string path = 1; } diff --git a/staging/src/k8s.io/api/core/v1/types_swagger_doc_generated.go b/staging/src/k8s.io/api/core/v1/types_swagger_doc_generated.go index 4ce2aec1114..8ab3c802b5e 100644 --- a/staging/src/k8s.io/api/core/v1/types_swagger_doc_generated.go +++ b/staging/src/k8s.io/api/core/v1/types_swagger_doc_generated.go @@ -865,8 +865,8 @@ func (LocalObjectReference) SwaggerDoc() map[string]string { } var map_LocalVolumeSource = map[string]string{ - "": "Local represents directly-attached storage with node affinity", - "path": "The full path to the volume on the node For alpha, this path must be a directory Once block as a source is supported, then this path can point to a block device", + "": "Local represents directly-attached storage with node affinity (Beta feature)", + "path": "The full path to the volume on the node. It can be either a directory or block device (disk, partition, ...). Directories can be represented only by PersistentVolume with VolumeMode=Filesystem. Block devices can be represented only by VolumeMode=Block, which also requires the BlockVolume alpha feature gate to be enabled.", } func (LocalVolumeSource) SwaggerDoc() map[string]string {

path

The full path to the volume on the node For alpha, this path must be a directory Once block as a source is supported, then this path can point to a block device

The full path to the volume on the node. It can be either a directory or block device (disk, partition, …). Directories can be represented only by PersistentVolume with VolumeMode=Filesystem. Block devices can be represented only by VolumeMode=Block, which also requires the BlockVolume alpha feature gate to be enabled.

true

string