Merge pull request #41479 from rootfs/iscsi-fix

Automatic merge from submit-queue

make iscsi portals optional

**What this PR does / why we need it**: Make iSCSI portals optional

**Which issue this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close that issue when PR gets merged)*: fixes #

**Special notes for your reviewer**:

**Release note**:

```release-note
NONE
```
This commit is contained in:
Kubernetes Submit Queue 2017-02-26 16:31:31 -08:00 committed by GitHub
commit d7b3c62c56
10 changed files with 38 additions and 35 deletions

View File

@ -1660,8 +1660,7 @@
"required": [
"targetPortal",
"iqn",
"lun",
"portals"
"lun"
],
"properties": {
"targetPortal": {

View File

@ -1665,8 +1665,7 @@
"required": [
"targetPortal",
"iqn",
"lun",
"portals"
"lun"
],
"properties": {
"targetPortal": {

View File

@ -7067,8 +7067,7 @@
"required": [
"targetPortal",
"iqn",
"lun",
"portals"
"lun"
],
"properties": {
"targetPortal": {

View File

@ -18076,8 +18076,7 @@
"required": [
"targetPortal",
"iqn",
"lun",
"portals"
"lun"
],
"properties": {
"targetPortal": {

View File

@ -2633,7 +2633,7 @@ Populated by the system when a graceful deletion is requested. Read-only. More i
<tr>
<td class="tableblock halign-left valign-top"><p class="tableblock">portals</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">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).</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">true</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">false</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">string array</p></td>
<td class="tableblock halign-left valign-top"></td>
</tr>
@ -5396,7 +5396,7 @@ Examples:<br>
</div>
<div id="footer">
<div id="footer-text">
Last updated 2017-02-21 16:52:32 UTC
Last updated 2017-02-23 20:32:09 UTC
</div>
</div>
</body>

View File

@ -2537,7 +2537,7 @@ Populated by the system when a graceful deletion is requested. Read-only. More i
<tr>
<td class="tableblock halign-left valign-top"><p class="tableblock">portals</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">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).</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">true</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">false</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">string array</p></td>
<td class="tableblock halign-left valign-top"></td>
</tr>
@ -5321,7 +5321,7 @@ Examples:<br>
</div>
<div id="footer">
<div id="footer-text">
Last updated 2017-02-21 16:53:18 UTC
Last updated 2017-02-23 20:32:42 UTC
</div>
</div>
</body>

View File

@ -2317,7 +2317,7 @@ Populated by the system when a graceful deletion is requested. Read-only. More i
<tr>
<td class="tableblock halign-left valign-top"><p class="tableblock">portals</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">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).</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">true</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">false</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">string array</p></td>
<td class="tableblock halign-left valign-top"></td>
</tr>
@ -7612,7 +7612,7 @@ Both these may change in the future. Incoming requests are matched against the h
</div>
<div id="footer">
<div id="footer-text">
Last updated 2017-02-21 16:53:39 UTC
Last updated 2017-02-23 20:32:58 UTC
</div>
</div>
</body>

View File

@ -2560,7 +2560,7 @@ Populated by the system when a graceful deletion is requested. Read-only. More i
<tr>
<td class="tableblock halign-left valign-top"><p class="tableblock">portals</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">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).</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">true</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">false</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">string array</p></td>
<td class="tableblock halign-left valign-top"></td>
</tr>
@ -9652,7 +9652,7 @@ Examples:<br>
</div>
<div id="footer">
<div id="footer-text">
Last updated 2017-02-21 16:52:23 UTC
Last updated 2017-02-23 20:32:02 UTC
</div>
</div>
</body>

View File

@ -15436,11 +15436,12 @@ func (x *ISCSIVolumeSource) CodecEncodeSelf(e *codec1978.Encoder) {
yyq2[3] = x.ISCSIInterface != ""
yyq2[4] = x.FSType != ""
yyq2[5] = x.ReadOnly != false
yyq2[6] = len(x.Portals) != 0
var yynn2 int
if yyr2 || yy2arr2 {
r.EncodeArrayStart(7)
} else {
yynn2 = 4
yynn2 = 3
for _, b := range yyq2 {
if b {
yynn2++
@ -15583,28 +15584,34 @@ 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 {
if yyq2[6] {
if x.Portals == nil {
r.EncodeNil()
} else {
z.F.EncSliceStringV(x.Portals, false, e)
yym22 := z.EncBinary()
_ = yym22
if false {
} else {
z.F.EncSliceStringV(x.Portals, false, e)
}
}
} else {
r.EncodeNil()
}
} 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 {
if yyq2[6] {
z.EncSendContainerState(codecSelfer_containerMapKey1234)
r.EncodeString(codecSelferC_UTF81234, string("portals"))
z.EncSendContainerState(codecSelfer_containerMapValue1234)
if x.Portals == nil {
r.EncodeNil()
} else {
z.F.EncSliceStringV(x.Portals, false, e)
yym23 := z.EncBinary()
_ = yym23
if false {
} else {
z.F.EncSliceStringV(x.Portals, false, e)
}
}
}
}

View File

@ -1023,7 +1023,7 @@ type ISCSIVolumeSource struct {
// 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"`
Portals []string `json:"portals,omitempty" protobuf:"bytes,7,opt,name=portals"`
}
// Represents a Fibre Channel volume.