Merge pull request #39928 from humblec/iscsi-multipath-backuptp

Automatic merge from submit-queue

Add mulitpath support to iscsi plugin

#issue https://github.com/kubernetes/kubernetes/issues/39345
Signed-off-by: Humble Chirammal <hchiramm@redhat.com>
This commit is contained in:
Kubernetes Submit Queue
2017-02-13 12:18:55 -08:00
committed by GitHub
25 changed files with 1063 additions and 800 deletions

View File

@@ -625,6 +625,10 @@ type ISCSIVolumeSource struct {
// the ReadOnly setting in VolumeMounts.
// +optional
ReadOnly bool
// Required: list of iSCSI target portal ips for high availability.
// the portal is either an IP or ip_addr:port if port is other than default (typically TCP ports 860 and 3260)
// +optional
Portals []string
}
// Represents a Fibre Channel volume.

File diff suppressed because it is too large Load Diff

View File

@@ -1179,6 +1179,11 @@ message ISCSIVolumeSource {
// Defaults to false.
// +optional
optional bool readOnly = 6;
// iSCSI target portal List. The portal is either an IP or ip_addr:port if the port
// is other than default (typically TCP ports 860 and 3260).
// +optional
repeated string portals = 7;
}
// Maps a string key to a path within a volume.

View File

@@ -14833,7 +14833,7 @@ func (x *ISCSIVolumeSource) CodecEncodeSelf(e *codec1978.Encoder) {
} else {
yysep2 := !z.EncBinary()
yy2arr2 := z.EncBasicHandle().StructToArray
var yyq2 [6]bool
var yyq2 [7]bool
_, _, _ = yysep2, yyq2, yy2arr2
const yyr2 bool = false
yyq2[3] = x.ISCSIInterface != ""
@@ -14841,9 +14841,9 @@ func (x *ISCSIVolumeSource) CodecEncodeSelf(e *codec1978.Encoder) {
yyq2[5] = x.ReadOnly != false
var yynn2 int
if yyr2 || yy2arr2 {
r.EncodeArrayStart(6)
r.EncodeArrayStart(7)
} else {
yynn2 = 3
yynn2 = 4
for _, b := range yyq2 {
if b {
yynn2++
@@ -14984,6 +14984,33 @@ func (x *ISCSIVolumeSource) CodecEncodeSelf(e *codec1978.Encoder) {
}
}
}
if yyr2 || yy2arr2 {
z.EncSendContainerState(codecSelfer_containerArrayElem1234)
if x.Portals == nil {
r.EncodeNil()
} else {
yym22 := z.EncBinary()
_ = yym22
if false {
} else {
z.F.EncSliceStringV(x.Portals, false, e)
}
}
} else {
z.EncSendContainerState(codecSelfer_containerMapKey1234)
r.EncodeString(codecSelferC_UTF81234, string("portals"))
z.EncSendContainerState(codecSelfer_containerMapValue1234)
if x.Portals == nil {
r.EncodeNil()
} else {
yym23 := z.EncBinary()
_ = yym23
if false {
} else {
z.F.EncSliceStringV(x.Portals, false, e)
}
}
}
if yyr2 || yy2arr2 {
z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
} else {
@@ -15117,6 +15144,18 @@ func (x *ISCSIVolumeSource) codecDecodeSelfFromMap(l int, d *codec1978.Decoder)
*((*bool)(yyv14)) = r.DecodeBool()
}
}
case "portals":
if r.TryDecodeAsNil() {
x.Portals = nil
} else {
yyv16 := &x.Portals
yym17 := z.DecBinary()
_ = yym17
if false {
} else {
z.F.DecSliceStringX(yyv16, false, d)
}
}
default:
z.DecStructFieldNotFound(-1, yys3)
} // end switch yys3
@@ -15128,16 +15167,16 @@ func (x *ISCSIVolumeSource) codecDecodeSelfFromArray(l int, d *codec1978.Decoder
var h codecSelfer1234
z, r := codec1978.GenHelperDecoder(d)
_, _, _ = h, z, r
var yyj16 int
var yyb16 bool
var yyhl16 bool = l >= 0
yyj16++
if yyhl16 {
yyb16 = yyj16 > l
var yyj18 int
var yyb18 bool
var yyhl18 bool = l >= 0
yyj18++
if yyhl18 {
yyb18 = yyj18 > l
} else {
yyb16 = r.CheckBreak()
yyb18 = r.CheckBreak()
}
if yyb16 {
if yyb18 {
z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
return
}
@@ -15145,29 +15184,7 @@ func (x *ISCSIVolumeSource) codecDecodeSelfFromArray(l int, d *codec1978.Decoder
if r.TryDecodeAsNil() {
x.TargetPortal = ""
} else {
yyv17 := &x.TargetPortal
yym18 := z.DecBinary()
_ = yym18
if false {
} else {
*((*string)(yyv17)) = r.DecodeString()
}
}
yyj16++
if yyhl16 {
yyb16 = yyj16 > l
} else {
yyb16 = r.CheckBreak()
}
if yyb16 {
z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
return
}
z.DecSendContainerState(codecSelfer_containerArrayElem1234)
if r.TryDecodeAsNil() {
x.IQN = ""
} else {
yyv19 := &x.IQN
yyv19 := &x.TargetPortal
yym20 := z.DecBinary()
_ = yym20
if false {
@@ -15175,13 +15192,35 @@ func (x *ISCSIVolumeSource) codecDecodeSelfFromArray(l int, d *codec1978.Decoder
*((*string)(yyv19)) = r.DecodeString()
}
}
yyj16++
if yyhl16 {
yyb16 = yyj16 > l
yyj18++
if yyhl18 {
yyb18 = yyj18 > l
} else {
yyb16 = r.CheckBreak()
yyb18 = r.CheckBreak()
}
if yyb16 {
if yyb18 {
z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
return
}
z.DecSendContainerState(codecSelfer_containerArrayElem1234)
if r.TryDecodeAsNil() {
x.IQN = ""
} else {
yyv21 := &x.IQN
yym22 := z.DecBinary()
_ = yym22
if false {
} else {
*((*string)(yyv21)) = r.DecodeString()
}
}
yyj18++
if yyhl18 {
yyb18 = yyj18 > l
} else {
yyb18 = r.CheckBreak()
}
if yyb18 {
z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
return
}
@@ -15189,21 +15228,21 @@ func (x *ISCSIVolumeSource) codecDecodeSelfFromArray(l int, d *codec1978.Decoder
if r.TryDecodeAsNil() {
x.Lun = 0
} else {
yyv21 := &x.Lun
yym22 := z.DecBinary()
_ = yym22
yyv23 := &x.Lun
yym24 := z.DecBinary()
_ = yym24
if false {
} else {
*((*int32)(yyv21)) = int32(r.DecodeInt(32))
*((*int32)(yyv23)) = int32(r.DecodeInt(32))
}
}
yyj16++
if yyhl16 {
yyb16 = yyj16 > l
yyj18++
if yyhl18 {
yyb18 = yyj18 > l
} else {
yyb16 = r.CheckBreak()
yyb18 = r.CheckBreak()
}
if yyb16 {
if yyb18 {
z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
return
}
@@ -15211,29 +15250,7 @@ func (x *ISCSIVolumeSource) codecDecodeSelfFromArray(l int, d *codec1978.Decoder
if r.TryDecodeAsNil() {
x.ISCSIInterface = ""
} else {
yyv23 := &x.ISCSIInterface
yym24 := z.DecBinary()
_ = yym24
if false {
} else {
*((*string)(yyv23)) = r.DecodeString()
}
}
yyj16++
if yyhl16 {
yyb16 = yyj16 > l
} else {
yyb16 = r.CheckBreak()
}
if yyb16 {
z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
return
}
z.DecSendContainerState(codecSelfer_containerArrayElem1234)
if r.TryDecodeAsNil() {
x.FSType = ""
} else {
yyv25 := &x.FSType
yyv25 := &x.ISCSIInterface
yym26 := z.DecBinary()
_ = yym26
if false {
@@ -15241,13 +15258,35 @@ func (x *ISCSIVolumeSource) codecDecodeSelfFromArray(l int, d *codec1978.Decoder
*((*string)(yyv25)) = r.DecodeString()
}
}
yyj16++
if yyhl16 {
yyb16 = yyj16 > l
yyj18++
if yyhl18 {
yyb18 = yyj18 > l
} else {
yyb16 = r.CheckBreak()
yyb18 = r.CheckBreak()
}
if yyb16 {
if yyb18 {
z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
return
}
z.DecSendContainerState(codecSelfer_containerArrayElem1234)
if r.TryDecodeAsNil() {
x.FSType = ""
} else {
yyv27 := &x.FSType
yym28 := z.DecBinary()
_ = yym28
if false {
} else {
*((*string)(yyv27)) = r.DecodeString()
}
}
yyj18++
if yyhl18 {
yyb18 = yyj18 > l
} else {
yyb18 = r.CheckBreak()
}
if yyb18 {
z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
return
}
@@ -15255,26 +15294,48 @@ func (x *ISCSIVolumeSource) codecDecodeSelfFromArray(l int, d *codec1978.Decoder
if r.TryDecodeAsNil() {
x.ReadOnly = false
} else {
yyv27 := &x.ReadOnly
yym28 := z.DecBinary()
_ = yym28
yyv29 := &x.ReadOnly
yym30 := z.DecBinary()
_ = yym30
if false {
} else {
*((*bool)(yyv27)) = r.DecodeBool()
*((*bool)(yyv29)) = r.DecodeBool()
}
}
yyj18++
if yyhl18 {
yyb18 = yyj18 > l
} else {
yyb18 = r.CheckBreak()
}
if yyb18 {
z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
return
}
z.DecSendContainerState(codecSelfer_containerArrayElem1234)
if r.TryDecodeAsNil() {
x.Portals = nil
} else {
yyv31 := &x.Portals
yym32 := z.DecBinary()
_ = yym32
if false {
} else {
z.F.DecSliceStringX(yyv31, false, d)
}
}
for {
yyj16++
if yyhl16 {
yyb16 = yyj16 > l
yyj18++
if yyhl18 {
yyb18 = yyj18 > l
} else {
yyb16 = r.CheckBreak()
yyb18 = r.CheckBreak()
}
if yyb16 {
if yyb18 {
break
}
z.DecSendContainerState(codecSelfer_containerArrayElem1234)
z.DecStructFieldNotFound(yyj16-1, "")
z.DecStructFieldNotFound(yyj18-1, "")
}
z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
}

View File

@@ -988,6 +988,10 @@ type ISCSIVolumeSource struct {
// Defaults to false.
// +optional
ReadOnly bool `json:"readOnly,omitempty" protobuf:"varint,6,opt,name=readOnly"`
// iSCSI target portal List. The portal is either an IP or ip_addr:port if the port
// is other than default (typically TCP ports 860 and 3260).
// +optional
Portals []string `json:"portals" protobuf:"bytes,7,opt,name=portals"`
}
// Represents a Fibre Channel volume.

View File

@@ -637,6 +637,7 @@ var map_ISCSIVolumeSource = map[string]string{
"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\". Implicitly inferred to be \"ext4\" if unspecified. More info: http://kubernetes.io/docs/user-guide/volumes#iscsi",
"readOnly": "ReadOnly here will force the ReadOnly setting in VolumeMounts. Defaults to false.",
"portals": "iSCSI target portal List. The portal is either an IP or ip_addr:port if the port is other than default (typically TCP ports 860 and 3260).",
}
func (ISCSIVolumeSource) SwaggerDoc() map[string]string {

View File

@@ -1613,6 +1613,7 @@ func autoConvert_v1_ISCSIVolumeSource_To_api_ISCSIVolumeSource(in *ISCSIVolumeSo
out.ISCSIInterface = in.ISCSIInterface
out.FSType = in.FSType
out.ReadOnly = in.ReadOnly
out.Portals = *(*[]string)(unsafe.Pointer(&in.Portals))
return nil
}
@@ -1627,6 +1628,7 @@ func autoConvert_api_ISCSIVolumeSource_To_v1_ISCSIVolumeSource(in *api.ISCSIVolu
out.ISCSIInterface = in.ISCSIInterface
out.FSType = in.FSType
out.ReadOnly = in.ReadOnly
out.Portals = *(*[]string)(unsafe.Pointer(&in.Portals))
return nil
}

View File

@@ -1140,6 +1140,11 @@ func DeepCopy_v1_ISCSIVolumeSource(in interface{}, out interface{}, c *conversio
in := in.(*ISCSIVolumeSource)
out := out.(*ISCSIVolumeSource)
*out = *in
if in.Portals != nil {
in, out := &in.Portals, &out.Portals
*out = make([]string, len(*in))
copy(*out, *in)
}
return nil
}
}
@@ -1885,7 +1890,9 @@ func DeepCopy_v1_PersistentVolumeSource(in interface{}, out interface{}, c *conv
if in.ISCSI != nil {
in, out := &in.ISCSI, &out.ISCSI
*out = new(ISCSIVolumeSource)
**out = **in
if err := DeepCopy_v1_ISCSIVolumeSource(*in, *out, c); err != nil {
return err
}
}
if in.Cinder != nil {
in, out := &in.Cinder, &out.Cinder
@@ -3155,7 +3162,9 @@ func DeepCopy_v1_VolumeSource(in interface{}, out interface{}, c *conversion.Clo
if in.ISCSI != nil {
in, out := &in.ISCSI, &out.ISCSI
*out = new(ISCSIVolumeSource)
**out = **in
if err := DeepCopy_v1_ISCSIVolumeSource(*in, *out, c); err != nil {
return err
}
}
if in.Glusterfs != nil {
in, out := &in.Glusterfs, &out.Glusterfs

View File

@@ -1168,6 +1168,11 @@ func DeepCopy_api_ISCSIVolumeSource(in interface{}, out interface{}, c *conversi
in := in.(*ISCSIVolumeSource)
out := out.(*ISCSIVolumeSource)
*out = *in
if in.Portals != nil {
in, out := &in.Portals, &out.Portals
*out = make([]string, len(*in))
copy(*out, *in)
}
return nil
}
}
@@ -1934,7 +1939,9 @@ func DeepCopy_api_PersistentVolumeSource(in interface{}, out interface{}, c *con
if in.ISCSI != nil {
in, out := &in.ISCSI, &out.ISCSI
*out = new(ISCSIVolumeSource)
**out = **in
if err := DeepCopy_api_ISCSIVolumeSource(*in, *out, c); err != nil {
return err
}
}
if in.FlexVolume != nil {
in, out := &in.FlexVolume, &out.FlexVolume
@@ -3182,7 +3189,9 @@ func DeepCopy_api_VolumeSource(in interface{}, out interface{}, c *conversion.Cl
if in.ISCSI != nil {
in, out := &in.ISCSI, &out.ISCSI
*out = new(ISCSIVolumeSource)
**out = **in
if err := DeepCopy_api_ISCSIVolumeSource(*in, *out, c); err != nil {
return err
}
}
if in.Glusterfs != nil {
in, out := &in.Glusterfs, &out.Glusterfs