Skip to content

Commit 7e6fe1f

Browse files
vladimirvivienk8s-publish-robot
authored andcommitted
CSI - API change for CSI volume source type
This commit tracks source code update to support the CSI volume source type additionn. Kubernetes-commit: af0c2bda94a65807c9c7aaa2d59f07fb62b8eea6
1 parent 51e667a commit 7e6fe1f

File tree

1 file changed

+20
-0
lines changed

1 file changed

+20
-0
lines changed

core/v1/types.go

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -448,6 +448,9 @@ type PersistentVolumeSource struct {
448448
// More info: https://releases.k8s.io/HEAD/examples/volumes/storageos/README.md
449449
// +optional
450450
StorageOS *StorageOSPersistentVolumeSource `json:"storageos,omitempty" protobuf:"bytes,21,opt,name=storageos"`
451+
// CSI represents storage that handled by an external CSI driver
452+
// +optional
453+
CSI *CSIPersistentVolumeSource `json:"csi,omitempty" protobuf:"bytes,22,opt,name=csi"`
451454
}
452455

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

1627+
// Represents storage that is managed by an external CSI volume driver
1628+
type CSIPersistentVolumeSource struct {
1629+
// Driver is the name of the driver to use for this volume.
1630+
// Required.
1631+
Driver string `json:"driver" protobuf:"bytes,1,opt,name=driver"`
1632+
1633+
// VolumeHandle is the unique volume name returned by the CSI volume
1634+
// plugin’s CreateVolume to refer to the volume on all subsequent calls.
1635+
// Required.
1636+
VolumeHandle string `json:"volumeHandle" protobuf:"bytes,2,opt,name=volumeHandle"`
1637+
1638+
// Optional: The value to pass to ControllerPublishVolumeRequest.
1639+
// Defaults to false (read/write).
1640+
// +optional
1641+
ReadOnly bool `json:"readOnly,omitempty" protobuf:"varint,3,opt,name=readOnly"`
1642+
}
1643+
16241644
// ContainerPort represents a network port in a single container.
16251645
type ContainerPort struct {
16261646
// If specified, this must be an IANA_SVC_NAME and unique within the pod. Each

0 commit comments

Comments
 (0)