Skip to content

Commit

Permalink
CSI - API change for CSI volume source type
Browse files Browse the repository at this point in the history
This commit tracks source code update to support the CSI volume source type additionn.

Kubernetes-commit: af0c2bda94a65807c9c7aaa2d59f07fb62b8eea6
  • Loading branch information
vladimirvivien authored and k8s-publish-robot committed Oct 25, 2017
1 parent 51e667a commit 7e6fe1f
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions core/v1/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -448,6 +448,9 @@ type PersistentVolumeSource struct {
// More info: https://releases.k8s.io/HEAD/examples/volumes/storageos/README.md
// +optional
StorageOS *StorageOSPersistentVolumeSource `json:"storageos,omitempty" protobuf:"bytes,21,opt,name=storageos"`
// CSI represents storage that handled by an external CSI driver
// +optional
CSI *CSIPersistentVolumeSource `json:"csi,omitempty" protobuf:"bytes,22,opt,name=csi"`
}

const (
Expand Down Expand Up @@ -1621,6 +1624,23 @@ type LocalVolumeSource struct {
Path string `json:"path" protobuf:"bytes,1,opt,name=path"`
}

// Represents storage that is managed by an external CSI volume driver
type CSIPersistentVolumeSource struct {
// Driver is the name of the driver to use for this volume.
// Required.
Driver string `json:"driver" protobuf:"bytes,1,opt,name=driver"`

// VolumeHandle is the unique volume name returned by the CSI volume
// plugin’s CreateVolume to refer to the volume on all subsequent calls.
// Required.
VolumeHandle string `json:"volumeHandle" protobuf:"bytes,2,opt,name=volumeHandle"`

// Optional: The value to pass to ControllerPublishVolumeRequest.
// Defaults to false (read/write).
// +optional
ReadOnly bool `json:"readOnly,omitempty" protobuf:"varint,3,opt,name=readOnly"`
}

// ContainerPort represents a network port in a single container.
type ContainerPort struct {
// If specified, this must be an IANA_SVC_NAME and unique within the pod. Each
Expand Down

0 comments on commit 7e6fe1f

Please sign in to comment.