Skip to content

Commit

Permalink
Merge pull request kubernetes#41479 from rootfs/iscsi-fix
Browse files Browse the repository at this point in the history
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
```
  • Loading branch information
Kubernetes Submit Queue authored Feb 27, 2017
2 parents e4c545a + 0c8a347 commit d7b3c62
Show file tree
Hide file tree
Showing 10 changed files with 38 additions and 35 deletions.
3 changes: 1 addition & 2 deletions api/swagger-spec/apps_v1beta1.json
Original file line number Diff line number Diff line change
Expand Up @@ -1660,8 +1660,7 @@
"required": [
"targetPortal",
"iqn",
"lun",
"portals"
"lun"
],
"properties": {
"targetPortal": {
Expand Down
3 changes: 1 addition & 2 deletions api/swagger-spec/batch_v1.json
Original file line number Diff line number Diff line change
Expand Up @@ -1665,8 +1665,7 @@
"required": [
"targetPortal",
"iqn",
"lun",
"portals"
"lun"
],
"properties": {
"targetPortal": {
Expand Down
3 changes: 1 addition & 2 deletions api/swagger-spec/extensions_v1beta1.json
Original file line number Diff line number Diff line change
Expand Up @@ -7067,8 +7067,7 @@
"required": [
"targetPortal",
"iqn",
"lun",
"portals"
"lun"
],
"properties": {
"targetPortal": {
Expand Down
3 changes: 1 addition & 2 deletions api/swagger-spec/v1.json
Original file line number Diff line number Diff line change
Expand Up @@ -18076,8 +18076,7 @@
"required": [
"targetPortal",
"iqn",
"lun",
"portals"
"lun"
],
"properties": {
"targetPortal": {
Expand Down
4 changes: 2 additions & 2 deletions docs/api-reference/apps/v1beta1/definitions.html
Original file line number Diff line number Diff line change
Expand Up @@ -2633,7 +2633,7 @@ <h3 id="_v1_iscsivolumesource">v1.ISCSIVolumeSource</h3>
<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>
Expand Down Expand Up @@ -5396,7 +5396,7 @@ <h3 id="_any">any</h3>
</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>
Expand Down
4 changes: 2 additions & 2 deletions docs/api-reference/batch/v1/definitions.html
Original file line number Diff line number Diff line change
Expand Up @@ -2537,7 +2537,7 @@ <h3 id="_v1_iscsivolumesource">v1.ISCSIVolumeSource</h3>
<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>
Expand Down Expand Up @@ -5321,7 +5321,7 @@ <h3 id="_any">any</h3>
</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>
Expand Down
4 changes: 2 additions & 2 deletions docs/api-reference/extensions/v1beta1/definitions.html
Original file line number Diff line number Diff line change
Expand Up @@ -2317,7 +2317,7 @@ <h3 id="_v1_iscsivolumesource">v1.ISCSIVolumeSource</h3>
<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>
Expand Down Expand Up @@ -7612,7 +7612,7 @@ <h3 id="_any">any</h3>
</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>
Expand Down
4 changes: 2 additions & 2 deletions docs/api-reference/v1/definitions.html
Original file line number Diff line number Diff line change
Expand Up @@ -2560,7 +2560,7 @@ <h3 id="_v1_iscsivolumesource">v1.ISCSIVolumeSource</h3>
<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>
Expand Down Expand Up @@ -9652,7 +9652,7 @@ <h3 id="_any">any</h3>
</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>
Expand Down
43 changes: 25 additions & 18 deletions pkg/api/v1/types.generated.go
Original file line number Diff line number Diff line change
Expand Up @@ -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++
Expand Down Expand Up @@ -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)
}
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion pkg/api/v1/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down

0 comments on commit d7b3c62

Please sign in to comment.