mirror of
https://github.com/k3s-io/kubernetes.git
synced 2026-01-06 07:57:35 +00:00
Add support for open-iscsi transports.
This enables use of software or hardware transports viz. be2iscsi, bnx2i, cxgb3i, cxgb4i, qla4xx, iser and ocs. The default transport (tcp) happens to be called "default". Use of non-default transports changes the disk path to the following format: /dev/disk/by-path/pci-<pci_id>-ip-<portal>-iscsi-<iqn>-lun-<lun_id>
This commit is contained in:
@@ -919,6 +919,7 @@ func autoconvert_api_ISCSIVolumeSource_To_v1_ISCSIVolumeSource(in *api.ISCSIVolu
|
||||
out.TargetPortal = in.TargetPortal
|
||||
out.IQN = in.IQN
|
||||
out.Lun = int32(in.Lun)
|
||||
out.ISCSIInterface = in.ISCSIInterface
|
||||
out.FSType = in.FSType
|
||||
out.ReadOnly = in.ReadOnly
|
||||
return nil
|
||||
@@ -3945,6 +3946,7 @@ func autoconvert_v1_ISCSIVolumeSource_To_api_ISCSIVolumeSource(in *ISCSIVolumeSo
|
||||
out.TargetPortal = in.TargetPortal
|
||||
out.IQN = in.IQN
|
||||
out.Lun = int(in.Lun)
|
||||
out.ISCSIInterface = in.ISCSIInterface
|
||||
out.FSType = in.FSType
|
||||
out.ReadOnly = in.ReadOnly
|
||||
return nil
|
||||
|
||||
@@ -681,6 +681,7 @@ func deepCopy_v1_ISCSIVolumeSource(in ISCSIVolumeSource, out *ISCSIVolumeSource,
|
||||
out.TargetPortal = in.TargetPortal
|
||||
out.IQN = in.IQN
|
||||
out.Lun = in.Lun
|
||||
out.ISCSIInterface = in.ISCSIInterface
|
||||
out.FSType = in.FSType
|
||||
out.ReadOnly = in.ReadOnly
|
||||
return nil
|
||||
|
||||
@@ -164,6 +164,11 @@ func addDefaultingFuncs() {
|
||||
obj.Status.Phase = ClaimPending
|
||||
}
|
||||
},
|
||||
func(obj *ISCSIVolumeSource) {
|
||||
if obj.ISCSIInterface == "" {
|
||||
obj.ISCSIInterface = "default"
|
||||
}
|
||||
},
|
||||
func(obj *Endpoints) {
|
||||
for i := range obj.Subsets {
|
||||
ss := &obj.Subsets[i]
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -715,6 +715,8 @@ type ISCSIVolumeSource struct {
|
||||
IQN string `json:"iqn"`
|
||||
// iSCSI target lun number.
|
||||
Lun int32 `json:"lun"`
|
||||
// Optional: Defaults to 'default' (tcp). iSCSI interface name that uses an iSCSI transport.
|
||||
ISCSIInterface string `json:"iscsiInterface,omitempty"`
|
||||
// Filesystem type of the volume that you want to mount.
|
||||
// Tip: Ensure that the filesystem type is supported by the host operating system.
|
||||
// Examples: "ext4", "xfs", "ntfs".
|
||||
|
||||
@@ -467,12 +467,13 @@ func (HostPathVolumeSource) SwaggerDoc() map[string]string {
|
||||
}
|
||||
|
||||
var map_ISCSIVolumeSource = map[string]string{
|
||||
"": "ISCSIVolumeSource describes an ISCSI Disk can only be mounted as read/write once.",
|
||||
"targetPortal": "iSCSI target portal. The portal is either an IP or ip_addr:port if the port is other than default (typically TCP ports 860 and 3260).",
|
||||
"iqn": "Target iSCSI Qualified Name.",
|
||||
"lun": "iSCSI target lun number.",
|
||||
"fsType": "Filesystem type of the volume that you want to mount. Tip: Ensure that the filesystem type is supported by the host operating system. Examples: \"ext4\", \"xfs\", \"ntfs\". More info: http://releases.k8s.io/HEAD/docs/user-guide/volumes.md#iscsi",
|
||||
"readOnly": "ReadOnly here will force the ReadOnly setting in VolumeMounts. Defaults to false.",
|
||||
"": "ISCSIVolumeSource describes an ISCSI Disk can only be mounted as read/write once.",
|
||||
"targetPortal": "iSCSI target portal. The portal is either an IP or ip_addr:port if the port is other than default (typically TCP ports 860 and 3260).",
|
||||
"iqn": "Target iSCSI Qualified Name.",
|
||||
"lun": "iSCSI target lun number.",
|
||||
"iscsiInterface": "Optional: Defaults to 'default' (tcp). iSCSI interface name that uses an iSCSI transport.",
|
||||
"fsType": "Filesystem type of the volume that you want to mount. Tip: Ensure that the filesystem type is supported by the host operating system. Examples: \"ext4\", \"xfs\", \"ntfs\". More info: http://releases.k8s.io/HEAD/docs/user-guide/volumes.md#iscsi",
|
||||
"readOnly": "ReadOnly here will force the ReadOnly setting in VolumeMounts. Defaults to false.",
|
||||
}
|
||||
|
||||
func (ISCSIVolumeSource) SwaggerDoc() map[string]string {
|
||||
|
||||
Reference in New Issue
Block a user