mirror of https://github.com/k3s-io/k3s
Merge pull request #44641 from rickypai/rpai/host_mappings_type
Automatic merge from submit-queue
Add HostAliases to PodSpec to support adding entires to a Pod's hosts file
**What this PR does / why we need it**:
Adds a new field to PodSpec `HostAliases ` to support adding entries to a Pod's hosts file. A PR to incorporate this logic into [`ensureHostsFile`](2899f47bc8/pkg/kubelet/kubelet_pods.go (L208-L227)
) in kubelet will be next in order to isolate the discussion on the API.
**Which issue this PR fixes**:
A step into fixing #43632
**Special notes for your reviewer**:
- The API was suggested in https://github.com/kubernetes/kubernetes/issues/43632#issuecomment-293471293
- Concerns with compatible with `hostNetwork: true` Pods are addressed with an validation. https://github.com/kubernetes/kubernetes/issues/43632#issuecomment-293750410
**Release note**:
```release-note
A new field `hostAliases` has been added to `pod.spec` to support adding entries to a Pod's /etc/hosts file.
```
**Testing done**:
- Unit tests pass for validations
- Ran all automated updates, and compared against another PR which added a field in PodSpec to make sure the PR contains all the updated generated code
pull/6/head
commit
194a06917f
|
@ -38859,6 +38859,22 @@
|
|||
}
|
||||
}
|
||||
},
|
||||
"io.k8s.kubernetes.pkg.api.v1.HostAlias": {
|
||||
"description": "HostAlias holds the mapping between IP and hostnames that will be injected as an entry in the pod's hosts file.",
|
||||
"properties": {
|
||||
"hostnames": {
|
||||
"description": "Hostnames for the the above IP address.",
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"ip": {
|
||||
"description": "IP address of the host file entry.",
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
},
|
||||
"io.k8s.kubernetes.pkg.api.v1.HostPathVolumeSource": {
|
||||
"description": "Represents a host path mapped into a pod. Host path volumes do not support ownership management or SELinux relabeling.",
|
||||
"required": [
|
||||
|
@ -40187,6 +40203,15 @@
|
|||
"description": "Use the host's ipc namespace. Optional: Default to false.",
|
||||
"type": "boolean"
|
||||
},
|
||||
"hostMappings": {
|
||||
"description": "HostAliases is an optional list of hosts and IPs that will be injected into the pod's hosts file if specified. This is only valid for non-hostNetwork pods.",
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "#/definitions/io.k8s.kubernetes.pkg.api.v1.HostAlias"
|
||||
},
|
||||
"x-kubernetes-patch-merge-key": "IP",
|
||||
"x-kubernetes-patch-strategy": "merge"
|
||||
},
|
||||
"hostNetwork": {
|
||||
"description": "Host networking requested for this pod. Use the host's network namespace. If this option is set, the ports that will be used must be specified. Default to false.",
|
||||
"type": "boolean"
|
||||
|
|
|
@ -2609,6 +2609,13 @@
|
|||
"$ref": "v1.Toleration"
|
||||
},
|
||||
"description": "If specified, the pod's tolerations."
|
||||
},
|
||||
"hostMappings": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "v1.HostAlias"
|
||||
},
|
||||
"description": "HostAliases is an optional list of hosts and IPs that will be injected into the pod's hosts file if specified. This is only valid for non-hostNetwork pods."
|
||||
}
|
||||
}
|
||||
},
|
||||
|
@ -4359,6 +4366,23 @@
|
|||
}
|
||||
}
|
||||
},
|
||||
"v1.HostAlias": {
|
||||
"id": "v1.HostAlias",
|
||||
"description": "HostAlias holds the mapping between IP and hostnames that will be injected as an entry in the pod's hosts file.",
|
||||
"properties": {
|
||||
"ip": {
|
||||
"type": "string",
|
||||
"description": "IP address of the host file entry."
|
||||
},
|
||||
"hostnames": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "string"
|
||||
},
|
||||
"description": "Hostnames for the the above IP address."
|
||||
}
|
||||
}
|
||||
},
|
||||
"v1beta1.DeploymentStrategy": {
|
||||
"id": "v1beta1.DeploymentStrategy",
|
||||
"description": "DeploymentStrategy describes how to replace existing pods with new ones.",
|
||||
|
|
|
@ -1392,6 +1392,13 @@
|
|||
"$ref": "v1.Toleration"
|
||||
},
|
||||
"description": "If specified, the pod's tolerations."
|
||||
},
|
||||
"hostMappings": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "v1.HostAlias"
|
||||
},
|
||||
"description": "HostAliases is an optional list of hosts and IPs that will be injected into the pod's hosts file if specified. This is only valid for non-hostNetwork pods."
|
||||
}
|
||||
}
|
||||
},
|
||||
|
@ -3142,6 +3149,23 @@
|
|||
}
|
||||
}
|
||||
},
|
||||
"v1.HostAlias": {
|
||||
"id": "v1.HostAlias",
|
||||
"description": "HostAlias holds the mapping between IP and hostnames that will be injected as an entry in the pod's hosts file.",
|
||||
"properties": {
|
||||
"ip": {
|
||||
"type": "string",
|
||||
"description": "IP address of the host file entry."
|
||||
},
|
||||
"hostnames": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "string"
|
||||
},
|
||||
"description": "Hostnames for the the above IP address."
|
||||
}
|
||||
}
|
||||
},
|
||||
"v1.JobStatus": {
|
||||
"id": "v1.JobStatus",
|
||||
"description": "JobStatus represents the current state of a Job.",
|
||||
|
|
|
@ -2425,6 +2425,13 @@
|
|||
"$ref": "v1.Toleration"
|
||||
},
|
||||
"description": "If specified, the pod's tolerations."
|
||||
},
|
||||
"hostMappings": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "v1.HostAlias"
|
||||
},
|
||||
"description": "HostAliases is an optional list of hosts and IPs that will be injected into the pod's hosts file if specified. This is only valid for non-hostNetwork pods."
|
||||
}
|
||||
}
|
||||
},
|
||||
|
@ -4175,6 +4182,23 @@
|
|||
}
|
||||
}
|
||||
},
|
||||
"v1.HostAlias": {
|
||||
"id": "v1.HostAlias",
|
||||
"description": "HostAlias holds the mapping between IP and hostnames that will be injected as an entry in the pod's hosts file.",
|
||||
"properties": {
|
||||
"ip": {
|
||||
"type": "string",
|
||||
"description": "IP address of the host file entry."
|
||||
},
|
||||
"hostnames": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "string"
|
||||
},
|
||||
"description": "Hostnames for the the above IP address."
|
||||
}
|
||||
}
|
||||
},
|
||||
"v2alpha1.CronJobStatus": {
|
||||
"id": "v2alpha1.CronJobStatus",
|
||||
"description": "CronJobStatus represents the current state of a cron job.",
|
||||
|
|
|
@ -6856,6 +6856,13 @@
|
|||
"$ref": "v1.Toleration"
|
||||
},
|
||||
"description": "If specified, the pod's tolerations."
|
||||
},
|
||||
"hostMappings": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "v1.HostAlias"
|
||||
},
|
||||
"description": "HostAliases is an optional list of hosts and IPs that will be injected into the pod's hosts file if specified. This is only valid for non-hostNetwork pods."
|
||||
}
|
||||
}
|
||||
},
|
||||
|
@ -8606,6 +8613,23 @@
|
|||
}
|
||||
}
|
||||
},
|
||||
"v1.HostAlias": {
|
||||
"id": "v1.HostAlias",
|
||||
"description": "HostAlias holds the mapping between IP and hostnames that will be injected as an entry in the pod's hosts file.",
|
||||
"properties": {
|
||||
"ip": {
|
||||
"type": "string",
|
||||
"description": "IP address of the host file entry."
|
||||
},
|
||||
"hostnames": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "string"
|
||||
},
|
||||
"description": "Hostnames for the the above IP address."
|
||||
}
|
||||
}
|
||||
},
|
||||
"v1beta1.DaemonSetUpdateStrategy": {
|
||||
"id": "v1beta1.DaemonSetUpdateStrategy",
|
||||
"properties": {
|
||||
|
|
|
@ -18998,6 +18998,13 @@
|
|||
"$ref": "v1.Toleration"
|
||||
},
|
||||
"description": "If specified, the pod's tolerations."
|
||||
},
|
||||
"hostMappings": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "v1.HostAlias"
|
||||
},
|
||||
"description": "HostAliases is an optional list of hosts and IPs that will be injected into the pod's hosts file if specified. This is only valid for non-hostNetwork pods."
|
||||
}
|
||||
}
|
||||
},
|
||||
|
@ -20193,6 +20200,23 @@
|
|||
}
|
||||
}
|
||||
},
|
||||
"v1.HostAlias": {
|
||||
"id": "v1.HostAlias",
|
||||
"description": "HostAlias holds the mapping between IP and hostnames that will be injected as an entry in the pod's hosts file.",
|
||||
"properties": {
|
||||
"ip": {
|
||||
"type": "string",
|
||||
"description": "IP address of the host file entry."
|
||||
},
|
||||
"hostnames": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "string"
|
||||
},
|
||||
"description": "Hostnames for the the above IP address."
|
||||
}
|
||||
}
|
||||
},
|
||||
"v1.PodStatus": {
|
||||
"id": "v1.PodStatus",
|
||||
"description": "PodStatus represents information about the status of a pod. Status may trail the actual state of a system.",
|
||||
|
|
|
@ -3644,6 +3644,13 @@ The StatefulSet guarantees that a given network identity will always map to the
|
|||
<td class="tableblock halign-left valign-top"><p class="tableblock"><a href="#_v1_toleration">v1.Toleration</a> array</p></td>
|
||||
<td class="tableblock halign-left valign-top"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="tableblock halign-left valign-top"><p class="tableblock">hostMappings</p></td>
|
||||
<td class="tableblock halign-left valign-top"><p class="tableblock">HostAliases is an optional list of hosts and IPs that will be injected into the pod’s hosts file if specified. This is only valid for non-hostNetwork pods.</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"><a href="#_v1_hostalias">v1.HostAlias</a> array</p></td>
|
||||
<td class="tableblock halign-left valign-top"></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
|
@ -5951,6 +5958,47 @@ Examples:<br>
|
|||
</tbody>
|
||||
</table>
|
||||
|
||||
</div>
|
||||
<div class="sect2">
|
||||
<h3 id="_v1_hostalias">v1.HostAlias</h3>
|
||||
<div class="paragraph">
|
||||
<p>HostAlias holds the mapping between IP and hostnames that will be injected as an entry in the pod’s hosts file.</p>
|
||||
</div>
|
||||
<table class="tableblock frame-all grid-all" style="width:100%; ">
|
||||
<colgroup>
|
||||
<col style="width:20%;">
|
||||
<col style="width:20%;">
|
||||
<col style="width:20%;">
|
||||
<col style="width:20%;">
|
||||
<col style="width:20%;">
|
||||
</colgroup>
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="tableblock halign-left valign-top">Name</th>
|
||||
<th class="tableblock halign-left valign-top">Description</th>
|
||||
<th class="tableblock halign-left valign-top">Required</th>
|
||||
<th class="tableblock halign-left valign-top">Schema</th>
|
||||
<th class="tableblock halign-left valign-top">Default</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td class="tableblock halign-left valign-top"><p class="tableblock">ip</p></td>
|
||||
<td class="tableblock halign-left valign-top"><p class="tableblock">IP address of the host file entry.</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</p></td>
|
||||
<td class="tableblock halign-left valign-top"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="tableblock halign-left valign-top"><p class="tableblock">hostnames</p></td>
|
||||
<td class="tableblock halign-left valign-top"><p class="tableblock">Hostnames for the the above IP address.</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>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
</div>
|
||||
<div class="sect2">
|
||||
<h3 id="_v1_podtemplatespec">v1.PodTemplateSpec</h3>
|
||||
|
@ -6291,7 +6339,7 @@ Examples:<br>
|
|||
</div>
|
||||
<div id="footer">
|
||||
<div id="footer-text">
|
||||
Last updated 2017-04-05 12:44:27 UTC
|
||||
Last updated 2017-04-29 05:44:52 UTC
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
|
|
|
@ -3853,6 +3853,47 @@ Populated by the system when a graceful deletion is requested. Read-only. More i
|
|||
</tbody>
|
||||
</table>
|
||||
|
||||
</div>
|
||||
<div class="sect2">
|
||||
<h3 id="_v1_hostalias">v1.HostAlias</h3>
|
||||
<div class="paragraph">
|
||||
<p>HostAlias holds the mapping between IP and hostnames that will be injected as an entry in the pod’s hosts file.</p>
|
||||
</div>
|
||||
<table class="tableblock frame-all grid-all" style="width:100%; ">
|
||||
<colgroup>
|
||||
<col style="width:20%;">
|
||||
<col style="width:20%;">
|
||||
<col style="width:20%;">
|
||||
<col style="width:20%;">
|
||||
<col style="width:20%;">
|
||||
</colgroup>
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="tableblock halign-left valign-top">Name</th>
|
||||
<th class="tableblock halign-left valign-top">Description</th>
|
||||
<th class="tableblock halign-left valign-top">Required</th>
|
||||
<th class="tableblock halign-left valign-top">Schema</th>
|
||||
<th class="tableblock halign-left valign-top">Default</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td class="tableblock halign-left valign-top"><p class="tableblock">ip</p></td>
|
||||
<td class="tableblock halign-left valign-top"><p class="tableblock">IP address of the host file entry.</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</p></td>
|
||||
<td class="tableblock halign-left valign-top"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="tableblock halign-left valign-top"><p class="tableblock">hostnames</p></td>
|
||||
<td class="tableblock halign-left valign-top"><p class="tableblock">Hostnames for the the above IP address.</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>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
</div>
|
||||
<div class="sect2">
|
||||
<h3 id="_v1_podtemplatespec">v1.PodTemplateSpec</h3>
|
||||
|
@ -5132,6 +5173,13 @@ Populated by the system when a graceful deletion is requested. Read-only. More i
|
|||
<td class="tableblock halign-left valign-top"><p class="tableblock"><a href="#_v1_toleration">v1.Toleration</a> array</p></td>
|
||||
<td class="tableblock halign-left valign-top"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="tableblock halign-left valign-top"><p class="tableblock">hostMappings</p></td>
|
||||
<td class="tableblock halign-left valign-top"><p class="tableblock">HostAliases is an optional list of hosts and IPs that will be injected into the pod’s hosts file if specified. This is only valid for non-hostNetwork pods.</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"><a href="#_v1_hostalias">v1.HostAlias</a> array</p></td>
|
||||
<td class="tableblock halign-left valign-top"></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
|
@ -5533,7 +5581,7 @@ Examples:<br>
|
|||
</div>
|
||||
<div id="footer">
|
||||
<div id="footer-text">
|
||||
Last updated 2017-04-10 12:25:40 UTC
|
||||
Last updated 2017-04-29 05:45:24 UTC
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
|
|
|
@ -3680,6 +3680,47 @@ Populated by the system when a graceful deletion is requested. Read-only. More i
|
|||
</tbody>
|
||||
</table>
|
||||
|
||||
</div>
|
||||
<div class="sect2">
|
||||
<h3 id="_v1_hostalias">v1.HostAlias</h3>
|
||||
<div class="paragraph">
|
||||
<p>HostAlias holds the mapping between IP and hostnames that will be injected as an entry in the pod’s hosts file.</p>
|
||||
</div>
|
||||
<table class="tableblock frame-all grid-all" style="width:100%; ">
|
||||
<colgroup>
|
||||
<col style="width:20%;">
|
||||
<col style="width:20%;">
|
||||
<col style="width:20%;">
|
||||
<col style="width:20%;">
|
||||
<col style="width:20%;">
|
||||
</colgroup>
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="tableblock halign-left valign-top">Name</th>
|
||||
<th class="tableblock halign-left valign-top">Description</th>
|
||||
<th class="tableblock halign-left valign-top">Required</th>
|
||||
<th class="tableblock halign-left valign-top">Schema</th>
|
||||
<th class="tableblock halign-left valign-top">Default</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td class="tableblock halign-left valign-top"><p class="tableblock">ip</p></td>
|
||||
<td class="tableblock halign-left valign-top"><p class="tableblock">IP address of the host file entry.</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</p></td>
|
||||
<td class="tableblock halign-left valign-top"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="tableblock halign-left valign-top"><p class="tableblock">hostnames</p></td>
|
||||
<td class="tableblock halign-left valign-top"><p class="tableblock">Hostnames for the the above IP address.</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>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
</div>
|
||||
<div class="sect2">
|
||||
<h3 id="_v2alpha1_cronjobspec">v2alpha1.CronJobSpec</h3>
|
||||
|
@ -5111,6 +5152,13 @@ Populated by the system when a graceful deletion is requested. Read-only. More i
|
|||
<td class="tableblock halign-left valign-top"><p class="tableblock"><a href="#_v1_toleration">v1.Toleration</a> array</p></td>
|
||||
<td class="tableblock halign-left valign-top"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="tableblock halign-left valign-top"><p class="tableblock">hostMappings</p></td>
|
||||
<td class="tableblock halign-left valign-top"><p class="tableblock">HostAliases is an optional list of hosts and IPs that will be injected into the pod’s hosts file if specified. This is only valid for non-hostNetwork pods.</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"><a href="#_v1_hostalias">v1.HostAlias</a> array</p></td>
|
||||
<td class="tableblock halign-left valign-top"></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
|
@ -5629,7 +5677,7 @@ Examples:<br>
|
|||
</div>
|
||||
<div id="footer">
|
||||
<div id="footer-text">
|
||||
Last updated 2017-04-13 12:05:18 UTC
|
||||
Last updated 2017-04-29 05:45:29 UTC
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
|
|
|
@ -4435,6 +4435,13 @@ Populated by the system when a graceful deletion is requested. Read-only. More i
|
|||
<td class="tableblock halign-left valign-top"><p class="tableblock"><a href="#_v1_toleration">v1.Toleration</a> array</p></td>
|
||||
<td class="tableblock halign-left valign-top"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="tableblock halign-left valign-top"><p class="tableblock">hostMappings</p></td>
|
||||
<td class="tableblock halign-left valign-top"><p class="tableblock">HostAliases is an optional list of hosts and IPs that will be injected into the pod’s hosts file if specified. This is only valid for non-hostNetwork pods.</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"><a href="#_v1_hostalias">v1.HostAlias</a> array</p></td>
|
||||
<td class="tableblock halign-left valign-top"></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
|
@ -7236,6 +7243,47 @@ Both these may change in the future. Incoming requests are matched against the h
|
|||
</tbody>
|
||||
</table>
|
||||
|
||||
</div>
|
||||
<div class="sect2">
|
||||
<h3 id="_v1_hostalias">v1.HostAlias</h3>
|
||||
<div class="paragraph">
|
||||
<p>HostAlias holds the mapping between IP and hostnames that will be injected as an entry in the pod’s hosts file.</p>
|
||||
</div>
|
||||
<table class="tableblock frame-all grid-all" style="width:100%; ">
|
||||
<colgroup>
|
||||
<col style="width:20%;">
|
||||
<col style="width:20%;">
|
||||
<col style="width:20%;">
|
||||
<col style="width:20%;">
|
||||
<col style="width:20%;">
|
||||
</colgroup>
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="tableblock halign-left valign-top">Name</th>
|
||||
<th class="tableblock halign-left valign-top">Description</th>
|
||||
<th class="tableblock halign-left valign-top">Required</th>
|
||||
<th class="tableblock halign-left valign-top">Schema</th>
|
||||
<th class="tableblock halign-left valign-top">Default</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td class="tableblock halign-left valign-top"><p class="tableblock">ip</p></td>
|
||||
<td class="tableblock halign-left valign-top"><p class="tableblock">IP address of the host file entry.</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</p></td>
|
||||
<td class="tableblock halign-left valign-top"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="tableblock halign-left valign-top"><p class="tableblock">hostnames</p></td>
|
||||
<td class="tableblock halign-left valign-top"><p class="tableblock">Hostnames for the the above IP address.</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>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
</div>
|
||||
<div class="sect2">
|
||||
<h3 id="_v1_podtemplatespec">v1.PodTemplateSpec</h3>
|
||||
|
@ -7938,7 +7986,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-04-10 13:00:01 UTC
|
||||
Last updated 2017-04-29 05:45:39 UTC
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
|
|
|
@ -5224,6 +5224,13 @@ The resulting set of endpoints can be viewed as:<br>
|
|||
<td class="tableblock halign-left valign-top"><p class="tableblock"><a href="#_v1_toleration">v1.Toleration</a> array</p></td>
|
||||
<td class="tableblock halign-left valign-top"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="tableblock halign-left valign-top"><p class="tableblock">hostMappings</p></td>
|
||||
<td class="tableblock halign-left valign-top"><p class="tableblock">HostAliases is an optional list of hosts and IPs that will be injected into the pod’s hosts file if specified. This is only valid for non-hostNetwork pods.</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"><a href="#_v1_hostalias">v1.HostAlias</a> array</p></td>
|
||||
<td class="tableblock halign-left valign-top"></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
|
@ -8849,6 +8856,47 @@ Examples:<br>
|
|||
</tbody>
|
||||
</table>
|
||||
|
||||
</div>
|
||||
<div class="sect2">
|
||||
<h3 id="_v1_hostalias">v1.HostAlias</h3>
|
||||
<div class="paragraph">
|
||||
<p>HostAlias holds the mapping between IP and hostnames that will be injected as an entry in the pod’s hosts file.</p>
|
||||
</div>
|
||||
<table class="tableblock frame-all grid-all" style="width:100%; ">
|
||||
<colgroup>
|
||||
<col style="width:20%;">
|
||||
<col style="width:20%;">
|
||||
<col style="width:20%;">
|
||||
<col style="width:20%;">
|
||||
<col style="width:20%;">
|
||||
</colgroup>
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="tableblock halign-left valign-top">Name</th>
|
||||
<th class="tableblock halign-left valign-top">Description</th>
|
||||
<th class="tableblock halign-left valign-top">Required</th>
|
||||
<th class="tableblock halign-left valign-top">Schema</th>
|
||||
<th class="tableblock halign-left valign-top">Default</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td class="tableblock halign-left valign-top"><p class="tableblock">ip</p></td>
|
||||
<td class="tableblock halign-left valign-top"><p class="tableblock">IP address of the host file entry.</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</p></td>
|
||||
<td class="tableblock halign-left valign-top"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="tableblock halign-left valign-top"><p class="tableblock">hostnames</p></td>
|
||||
<td class="tableblock halign-left valign-top"><p class="tableblock">Hostnames for the the above IP address.</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>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
</div>
|
||||
<div class="sect2">
|
||||
<h3 id="_v1_limitrangeitem">v1.LimitRangeItem</h3>
|
||||
|
@ -9871,7 +9919,7 @@ Examples:<br>
|
|||
</div>
|
||||
<div id="footer">
|
||||
<div id="footer-text">
|
||||
Last updated 2017-04-15 19:52:31 UTC
|
||||
Last updated 2017-04-29 05:44:45 UTC
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
|
|
|
@ -10201,6 +10201,22 @@
|
|||
}
|
||||
}
|
||||
},
|
||||
"io.k8s.kubernetes.pkg.api.v1.HostAlias": {
|
||||
"description": "HostAlias holds the mapping between IP and hostnames that will be injected as an entry in the pod's hosts file.",
|
||||
"properties": {
|
||||
"hostnames": {
|
||||
"description": "Hostnames for the the above IP address.",
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"ip": {
|
||||
"description": "IP address of the host file entry.",
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
},
|
||||
"io.k8s.kubernetes.pkg.api.v1.HostPathVolumeSource": {
|
||||
"description": "Represents a host path mapped into a pod. Host path volumes do not support ownership management or SELinux relabeling.",
|
||||
"required": [
|
||||
|
@ -10722,6 +10738,15 @@
|
|||
"description": "Use the host's ipc namespace. Optional: Default to false.",
|
||||
"type": "boolean"
|
||||
},
|
||||
"hostMappings": {
|
||||
"description": "HostAliases is an optional list of hosts and IPs that will be injected into the pod's hosts file if specified. This is only valid for non-hostNetwork pods.",
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "#/definitions/io.k8s.kubernetes.pkg.api.v1.HostAlias"
|
||||
},
|
||||
"x-kubernetes-patch-merge-key": "IP",
|
||||
"x-kubernetes-patch-strategy": "merge"
|
||||
},
|
||||
"hostNetwork": {
|
||||
"description": "Host networking requested for this pod. Use the host's network namespace. If this option is set, the ports that will be used must be specified. Default to false.",
|
||||
"type": "boolean"
|
||||
|
|
|
@ -2099,6 +2099,17 @@ type PodSpec struct {
|
|||
// If specified, the pod's tolerations.
|
||||
// +optional
|
||||
Tolerations []Toleration
|
||||
// HostAliases is an optional list of hosts and IPs that will be injected into the pod's hosts
|
||||
// file if specified. This is only valid for non-hostNetwork pods.
|
||||
// +optional
|
||||
HostAliases []HostAlias
|
||||
}
|
||||
|
||||
// HostAlias holds the mapping between IP and hostnames that will be injected as an entry in the
|
||||
// pod's hosts file.
|
||||
type HostAlias struct {
|
||||
IP string
|
||||
Hostnames []string
|
||||
}
|
||||
|
||||
// Sysctl defines a kernel parameter to be set
|
||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -1193,6 +1193,16 @@ message Handler {
|
|||
optional TCPSocketAction tcpSocket = 3;
|
||||
}
|
||||
|
||||
// HostAlias holds the mapping between IP and hostnames that will be injected as an entry in the
|
||||
// pod's hosts file.
|
||||
message HostAlias {
|
||||
// IP address of the host file entry.
|
||||
optional string ip = 1;
|
||||
|
||||
// Hostnames for the the above IP address.
|
||||
repeated string hostnames = 2;
|
||||
}
|
||||
|
||||
// Represents a host path mapped into a pod.
|
||||
// Host path volumes do not support ownership management or SELinux relabeling.
|
||||
message HostPathVolumeSource {
|
||||
|
@ -2734,6 +2744,13 @@ message PodSpec {
|
|||
// If specified, the pod's tolerations.
|
||||
// +optional
|
||||
repeated Toleration tolerations = 22;
|
||||
|
||||
// HostAliases is an optional list of hosts and IPs that will be injected into the pod's hosts
|
||||
// file if specified. This is only valid for non-hostNetwork pods.
|
||||
// +optional
|
||||
// +patchMergeKey=IP
|
||||
// +patchStrategy=merge
|
||||
repeated HostAlias hostMappings = 23;
|
||||
}
|
||||
|
||||
// PodStatus represents information about the status of a pod. Status may trail the actual
|
||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -2406,6 +2406,21 @@ type PodSpec struct {
|
|||
// If specified, the pod's tolerations.
|
||||
// +optional
|
||||
Tolerations []Toleration `json:"tolerations,omitempty" protobuf:"bytes,22,opt,name=tolerations"`
|
||||
// HostAliases is an optional list of hosts and IPs that will be injected into the pod's hosts
|
||||
// file if specified. This is only valid for non-hostNetwork pods.
|
||||
// +optional
|
||||
// +patchMergeKey=IP
|
||||
// +patchStrategy=merge
|
||||
HostAliases []HostAlias `json:"hostMappings,omitempty" patchStrategy:"merge" patchMergeKey:"IP" protobuf:"bytes,23,rep,name=hostMappings"`
|
||||
}
|
||||
|
||||
// HostAlias holds the mapping between IP and hostnames that will be injected as an entry in the
|
||||
// pod's hosts file.
|
||||
type HostAlias struct {
|
||||
// IP address of the host file entry.
|
||||
IP string `json:"ip,omitempty" protobuf:"bytes,1,opt,name=ip"`
|
||||
// Hostnames for the the above IP address.
|
||||
Hostnames []string `json:"hostnames,omitempty" protobuf:"bytes,2,rep,name=hostnames"`
|
||||
}
|
||||
|
||||
// PodSecurityContext holds pod-level security attributes and common container settings.
|
||||
|
|
|
@ -640,6 +640,16 @@ func (Handler) SwaggerDoc() map[string]string {
|
|||
return map_Handler
|
||||
}
|
||||
|
||||
var map_HostAlias = map[string]string{
|
||||
"": "HostAlias holds the mapping between IP and hostnames that will be injected as an entry in the pod's hosts file.",
|
||||
"ip": "IP address of the host file entry.",
|
||||
"hostnames": "Hostnames for the the above IP address.",
|
||||
}
|
||||
|
||||
func (HostAlias) SwaggerDoc() map[string]string {
|
||||
return map_HostAlias
|
||||
}
|
||||
|
||||
var map_HostPathVolumeSource = map[string]string{
|
||||
"": "Represents a host path mapped into a pod. Host path volumes do not support ownership management or SELinux relabeling.",
|
||||
"path": "Path of the directory on the host. More info: http://kubernetes.io/docs/user-guide/volumes#hostpath",
|
||||
|
@ -1350,6 +1360,7 @@ var map_PodSpec = map[string]string{
|
|||
"affinity": "If specified, the pod's scheduling constraints",
|
||||
"schedulerName": "If specified, the pod will be dispatched by specified scheduler. If not specified, the pod will be dispatched by default scheduler.",
|
||||
"tolerations": "If specified, the pod's tolerations.",
|
||||
"hostMappings": "HostAliases is an optional list of hosts and IPs that will be injected into the pod's hosts file if specified. This is only valid for non-hostNetwork pods.",
|
||||
}
|
||||
|
||||
func (PodSpec) SwaggerDoc() map[string]string {
|
||||
|
|
|
@ -145,6 +145,8 @@ func RegisterConversions(scheme *runtime.Scheme) error {
|
|||
Convert_api_HTTPHeader_To_v1_HTTPHeader,
|
||||
Convert_v1_Handler_To_api_Handler,
|
||||
Convert_api_Handler_To_v1_Handler,
|
||||
Convert_v1_HostAlias_To_api_HostAlias,
|
||||
Convert_api_HostAlias_To_v1_HostAlias,
|
||||
Convert_v1_HostPathVolumeSource_To_api_HostPathVolumeSource,
|
||||
Convert_api_HostPathVolumeSource_To_v1_HostPathVolumeSource,
|
||||
Convert_v1_ISCSIVolumeSource_To_api_ISCSIVolumeSource,
|
||||
|
@ -1788,6 +1790,28 @@ func Convert_api_Handler_To_v1_Handler(in *api.Handler, out *Handler, s conversi
|
|||
return autoConvert_api_Handler_To_v1_Handler(in, out, s)
|
||||
}
|
||||
|
||||
func autoConvert_v1_HostAlias_To_api_HostAlias(in *HostAlias, out *api.HostAlias, s conversion.Scope) error {
|
||||
out.IP = in.IP
|
||||
out.Hostnames = *(*[]string)(unsafe.Pointer(&in.Hostnames))
|
||||
return nil
|
||||
}
|
||||
|
||||
// Convert_v1_HostAlias_To_api_HostAlias is an autogenerated conversion function.
|
||||
func Convert_v1_HostAlias_To_api_HostAlias(in *HostAlias, out *api.HostAlias, s conversion.Scope) error {
|
||||
return autoConvert_v1_HostAlias_To_api_HostAlias(in, out, s)
|
||||
}
|
||||
|
||||
func autoConvert_api_HostAlias_To_v1_HostAlias(in *api.HostAlias, out *HostAlias, s conversion.Scope) error {
|
||||
out.IP = in.IP
|
||||
out.Hostnames = *(*[]string)(unsafe.Pointer(&in.Hostnames))
|
||||
return nil
|
||||
}
|
||||
|
||||
// Convert_api_HostAlias_To_v1_HostAlias is an autogenerated conversion function.
|
||||
func Convert_api_HostAlias_To_v1_HostAlias(in *api.HostAlias, out *HostAlias, s conversion.Scope) error {
|
||||
return autoConvert_api_HostAlias_To_v1_HostAlias(in, out, s)
|
||||
}
|
||||
|
||||
func autoConvert_v1_HostPathVolumeSource_To_api_HostPathVolumeSource(in *HostPathVolumeSource, out *api.HostPathVolumeSource, s conversion.Scope) error {
|
||||
out.Path = in.Path
|
||||
return nil
|
||||
|
@ -3468,6 +3492,7 @@ func autoConvert_v1_PodSpec_To_api_PodSpec(in *PodSpec, out *api.PodSpec, s conv
|
|||
out.Affinity = (*api.Affinity)(unsafe.Pointer(in.Affinity))
|
||||
out.SchedulerName = in.SchedulerName
|
||||
out.Tolerations = *(*[]api.Toleration)(unsafe.Pointer(&in.Tolerations))
|
||||
out.HostAliases = *(*[]api.HostAlias)(unsafe.Pointer(&in.HostAliases))
|
||||
return nil
|
||||
}
|
||||
|
||||
|
@ -3512,6 +3537,7 @@ func autoConvert_api_PodSpec_To_v1_PodSpec(in *api.PodSpec, out *PodSpec, s conv
|
|||
out.Affinity = (*Affinity)(unsafe.Pointer(in.Affinity))
|
||||
out.SchedulerName = in.SchedulerName
|
||||
out.Tolerations = *(*[]Toleration)(unsafe.Pointer(&in.Tolerations))
|
||||
out.HostAliases = *(*[]HostAlias)(unsafe.Pointer(&in.HostAliases))
|
||||
return nil
|
||||
}
|
||||
|
||||
|
|
|
@ -90,6 +90,7 @@ func RegisterDeepCopies(scheme *runtime.Scheme) error {
|
|||
conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_HTTPGetAction, InType: reflect.TypeOf(&HTTPGetAction{})},
|
||||
conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_HTTPHeader, InType: reflect.TypeOf(&HTTPHeader{})},
|
||||
conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_Handler, InType: reflect.TypeOf(&Handler{})},
|
||||
conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_HostAlias, InType: reflect.TypeOf(&HostAlias{})},
|
||||
conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_HostPathVolumeSource, InType: reflect.TypeOf(&HostPathVolumeSource{})},
|
||||
conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_ISCSIVolumeSource, InType: reflect.TypeOf(&ISCSIVolumeSource{})},
|
||||
conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_KeyToPath, InType: reflect.TypeOf(&KeyToPath{})},
|
||||
|
@ -1179,6 +1180,20 @@ func DeepCopy_v1_Handler(in interface{}, out interface{}, c *conversion.Cloner)
|
|||
}
|
||||
}
|
||||
|
||||
func DeepCopy_v1_HostAlias(in interface{}, out interface{}, c *conversion.Cloner) error {
|
||||
{
|
||||
in := in.(*HostAlias)
|
||||
out := out.(*HostAlias)
|
||||
*out = *in
|
||||
if in.Hostnames != nil {
|
||||
in, out := &in.Hostnames, &out.Hostnames
|
||||
*out = make([]string, len(*in))
|
||||
copy(*out, *in)
|
||||
}
|
||||
return nil
|
||||
}
|
||||
}
|
||||
|
||||
func DeepCopy_v1_HostPathVolumeSource(in interface{}, out interface{}, c *conversion.Cloner) error {
|
||||
{
|
||||
in := in.(*HostPathVolumeSource)
|
||||
|
@ -2423,6 +2438,15 @@ func DeepCopy_v1_PodSpec(in interface{}, out interface{}, c *conversion.Cloner)
|
|||
}
|
||||
}
|
||||
}
|
||||
if in.HostAliases != nil {
|
||||
in, out := &in.HostAliases, &out.HostAliases
|
||||
*out = make([]HostAlias, len(*in))
|
||||
for i := range *in {
|
||||
if err := DeepCopy_v1_HostAlias(&(*in)[i], &(*out)[i], c); err != nil {
|
||||
return err
|
||||
}
|
||||
}
|
||||
}
|
||||
return nil
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1909,6 +1909,16 @@ func validateHostNetwork(hostNetwork bool, containers []api.Container, fldPath *
|
|||
return allErrors
|
||||
}
|
||||
|
||||
func validateHostNetworkNoHostAliases(hostNetwork bool, hostAliases []api.HostAlias, fldPath *field.Path) field.ErrorList {
|
||||
allErrors := field.ErrorList{}
|
||||
if hostNetwork {
|
||||
if len(hostAliases) > 0 {
|
||||
allErrors = append(allErrors, field.Forbidden(fldPath, "may not be set when `hostNetwork` is true"))
|
||||
}
|
||||
}
|
||||
return allErrors
|
||||
}
|
||||
|
||||
// validateImagePullSecrets checks to make sure the pull secrets are well
|
||||
// formed. Right now, we only expect name to be set (it's the only field). If
|
||||
// this ever changes and someone decides to set those fields, we'd like to
|
||||
|
@ -2001,6 +2011,19 @@ func validateOnlyAddedTolerations(newTolerations []api.Toleration, oldToleration
|
|||
return allErrs
|
||||
}
|
||||
|
||||
func ValidateHostAliases(hostAliases []api.HostAlias, fldPath *field.Path) field.ErrorList {
|
||||
allErrs := field.ErrorList{}
|
||||
for _, hostAlias := range hostAliases {
|
||||
if ip := net.ParseIP(hostAlias.IP); ip == nil {
|
||||
allErrs = append(allErrs, field.Invalid(fldPath.Child("ip"), hostAlias.IP, "must be valid IP address"))
|
||||
}
|
||||
for _, hostname := range hostAlias.Hostnames {
|
||||
allErrs = append(allErrs, ValidateDNS1123Label(hostname, fldPath.Child("hostnames"))...)
|
||||
}
|
||||
}
|
||||
return allErrs
|
||||
}
|
||||
|
||||
// ValidateTolerations tests if given tolerations have valid data.
|
||||
func ValidateTolerations(tolerations []api.Toleration, fldPath *field.Path) field.ErrorList {
|
||||
allErrors := field.ErrorList{}
|
||||
|
@ -2102,6 +2125,10 @@ func ValidatePodSpec(spec *api.PodSpec, fldPath *field.Path) field.ErrorList {
|
|||
allErrs = append(allErrs, ValidateTolerations(spec.Tolerations, fldPath.Child("tolerations"))...)
|
||||
}
|
||||
|
||||
if len(spec.HostAliases) > 0 {
|
||||
allErrs = append(allErrs, ValidateHostAliases(spec.HostAliases, fldPath.Child("hostAliases"))...)
|
||||
}
|
||||
|
||||
return allErrs
|
||||
}
|
||||
|
||||
|
@ -2401,6 +2428,7 @@ func ValidatePodSecurityContext(securityContext *api.PodSecurityContext, spec *a
|
|||
|
||||
if securityContext != nil {
|
||||
allErrs = append(allErrs, validateHostNetwork(securityContext.HostNetwork, spec.Containers, specPath.Child("containers"))...)
|
||||
allErrs = append(allErrs, validateHostNetworkNoHostAliases(securityContext.HostNetwork, spec.HostAliases, specPath)...)
|
||||
if securityContext.FSGroup != nil {
|
||||
for _, msg := range validation.IsValidGroupId(*securityContext.FSGroup) {
|
||||
allErrs = append(allErrs, field.Invalid(fldPath.Child("fsGroup"), *(securityContext.FSGroup), msg))
|
||||
|
|
|
@ -3202,6 +3202,13 @@ func TestValidatePodSpec(t *testing.T) {
|
|||
RestartPolicy: api.RestartPolicyAlways,
|
||||
DNSPolicy: api.DNSClusterFirst,
|
||||
},
|
||||
{ // Populate HostAliases.
|
||||
HostAliases: []api.HostAlias{{IP: "12.34.56.78", Hostnames: []string{"host1", "host2"}}},
|
||||
Volumes: []api.Volume{{Name: "vol", VolumeSource: api.VolumeSource{EmptyDir: &api.EmptyDirVolumeSource{}}}},
|
||||
Containers: []api.Container{{Name: "ctr", Image: "image", ImagePullPolicy: "IfNotPresent", TerminationMessagePolicy: "File"}},
|
||||
RestartPolicy: api.RestartPolicyAlways,
|
||||
DNSPolicy: api.DNSClusterFirst,
|
||||
},
|
||||
}
|
||||
for i := range successCases {
|
||||
if errs := ValidatePodSpec(&successCases[i], field.NewPath("field")); len(errs) != 0 {
|
||||
|
@ -3262,6 +3269,24 @@ func TestValidatePodSpec(t *testing.T) {
|
|||
RestartPolicy: api.RestartPolicyAlways,
|
||||
DNSPolicy: api.DNSClusterFirst,
|
||||
},
|
||||
"with hostNetwork and hostAliases": {
|
||||
SecurityContext: &api.PodSecurityContext{
|
||||
HostNetwork: true,
|
||||
},
|
||||
HostAliases: []api.HostAlias{{IP: "12.34.56.78", Hostnames: []string{"host1", "host2"}}},
|
||||
},
|
||||
"with hostAliases with invalid IP": {
|
||||
SecurityContext: &api.PodSecurityContext{
|
||||
HostNetwork: false,
|
||||
},
|
||||
HostAliases: []api.HostAlias{{IP: "999.999.999.999", Hostnames: []string{"host1", "host2"}}},
|
||||
},
|
||||
"with hostAliases with invalid hostname": {
|
||||
SecurityContext: &api.PodSecurityContext{
|
||||
HostNetwork: false,
|
||||
},
|
||||
HostAliases: []api.HostAlias{{IP: "12.34.56.78", Hostnames: []string{"@#$^#@#$"}}},
|
||||
},
|
||||
"bad supplementalGroups large than math.MaxInt32": {
|
||||
Containers: []api.Container{{Name: "ctr", Image: "image", ImagePullPolicy: "IfNotPresent", TerminationMessagePolicy: "File"}},
|
||||
SecurityContext: &api.PodSecurityContext{
|
||||
|
|
|
@ -92,6 +92,7 @@ func RegisterDeepCopies(scheme *runtime.Scheme) error {
|
|||
conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_api_HTTPGetAction, InType: reflect.TypeOf(&HTTPGetAction{})},
|
||||
conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_api_HTTPHeader, InType: reflect.TypeOf(&HTTPHeader{})},
|
||||
conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_api_Handler, InType: reflect.TypeOf(&Handler{})},
|
||||
conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_api_HostAlias, InType: reflect.TypeOf(&HostAlias{})},
|
||||
conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_api_HostPathVolumeSource, InType: reflect.TypeOf(&HostPathVolumeSource{})},
|
||||
conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_api_ISCSIVolumeSource, InType: reflect.TypeOf(&ISCSIVolumeSource{})},
|
||||
conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_api_KeyToPath, InType: reflect.TypeOf(&KeyToPath{})},
|
||||
|
@ -1181,6 +1182,20 @@ func DeepCopy_api_Handler(in interface{}, out interface{}, c *conversion.Cloner)
|
|||
}
|
||||
}
|
||||
|
||||
func DeepCopy_api_HostAlias(in interface{}, out interface{}, c *conversion.Cloner) error {
|
||||
{
|
||||
in := in.(*HostAlias)
|
||||
out := out.(*HostAlias)
|
||||
*out = *in
|
||||
if in.Hostnames != nil {
|
||||
in, out := &in.Hostnames, &out.Hostnames
|
||||
*out = make([]string, len(*in))
|
||||
copy(*out, *in)
|
||||
}
|
||||
return nil
|
||||
}
|
||||
}
|
||||
|
||||
func DeepCopy_api_HostPathVolumeSource(in interface{}, out interface{}, c *conversion.Cloner) error {
|
||||
{
|
||||
in := in.(*HostPathVolumeSource)
|
||||
|
@ -2441,6 +2456,15 @@ func DeepCopy_api_PodSpec(in interface{}, out interface{}, c *conversion.Cloner)
|
|||
}
|
||||
}
|
||||
}
|
||||
if in.HostAliases != nil {
|
||||
in, out := &in.HostAliases, &out.HostAliases
|
||||
*out = make([]HostAlias, len(*in))
|
||||
for i := range *in {
|
||||
if err := DeepCopy_api_HostAlias(&(*in)[i], &(*out)[i], c); err != nil {
|
||||
return err
|
||||
}
|
||||
}
|
||||
}
|
||||
return nil
|
||||
}
|
||||
}
|
||||
|
|
|
@ -6166,7 +6166,7 @@ func (x codecSelfer1234) decSliceStatefulSet(v *[]StatefulSet, d *codec1978.Deco
|
|||
|
||||
yyrg1 := len(yyv1) > 0
|
||||
yyv21 := yyv1
|
||||
yyrl1, yyrt1 = z.DecInferLen(yyl1, z.DecBasicHandle().MaxInitLen, 856)
|
||||
yyrl1, yyrt1 = z.DecInferLen(yyl1, z.DecBasicHandle().MaxInitLen, 880)
|
||||
if yyrt1 {
|
||||
if yyrl1 <= cap(yyv1) {
|
||||
yyv1 = yyv1[:yyrl1]
|
||||
|
@ -6404,7 +6404,7 @@ func (x codecSelfer1234) decSliceDeployment(v *[]Deployment, d *codec1978.Decode
|
|||
|
||||
yyrg1 := len(yyv1) > 0
|
||||
yyv21 := yyv1
|
||||
yyrl1, yyrt1 = z.DecInferLen(yyl1, z.DecBasicHandle().MaxInitLen, 920)
|
||||
yyrl1, yyrt1 = z.DecInferLen(yyl1, z.DecBasicHandle().MaxInitLen, 944)
|
||||
if yyrt1 {
|
||||
if yyrl1 <= cap(yyv1) {
|
||||
yyv1 = yyv1[:yyrl1]
|
||||
|
|
|
@ -2481,7 +2481,7 @@ func (x codecSelfer1234) decSliceJob(v *[]Job, d *codec1978.Decoder) {
|
|||
|
||||
yyrg1 := len(yyv1) > 0
|
||||
yyv21 := yyv1
|
||||
yyrl1, yyrt1 = z.DecInferLen(yyl1, z.DecBasicHandle().MaxInitLen, 880)
|
||||
yyrl1, yyrt1 = z.DecInferLen(yyl1, z.DecBasicHandle().MaxInitLen, 904)
|
||||
if yyrt1 {
|
||||
if yyrl1 <= cap(yyv1) {
|
||||
yyv1 = yyv1[:yyrl1]
|
||||
|
|
|
@ -2325,7 +2325,7 @@ func (x codecSelfer1234) decSliceCronJob(v *[]CronJob, d *codec1978.Decoder) {
|
|||
|
||||
yyrg1 := len(yyv1) > 0
|
||||
yyv21 := yyv1
|
||||
yyrl1, yyrt1 = z.DecInferLen(yyl1, z.DecBasicHandle().MaxInitLen, 1144)
|
||||
yyrl1, yyrt1 = z.DecInferLen(yyl1, z.DecBasicHandle().MaxInitLen, 1168)
|
||||
if yyrt1 {
|
||||
if yyrl1 <= cap(yyv1) {
|
||||
yyv1 = yyv1[:yyrl1]
|
||||
|
|
|
@ -19652,7 +19652,7 @@ func (x codecSelfer1234) decSliceDeployment(v *[]Deployment, d *codec1978.Decode
|
|||
|
||||
yyrg1 := len(yyv1) > 0
|
||||
yyv21 := yyv1
|
||||
yyrl1, yyrt1 = z.DecInferLen(yyl1, z.DecBasicHandle().MaxInitLen, 920)
|
||||
yyrl1, yyrt1 = z.DecInferLen(yyl1, z.DecBasicHandle().MaxInitLen, 944)
|
||||
if yyrt1 {
|
||||
if yyrl1 <= cap(yyv1) {
|
||||
yyv1 = yyv1[:yyrl1]
|
||||
|
@ -19771,7 +19771,7 @@ func (x codecSelfer1234) decSliceDaemonSet(v *[]DaemonSet, d *codec1978.Decoder)
|
|||
|
||||
yyrg1 := len(yyv1) > 0
|
||||
yyv21 := yyv1
|
||||
yyrl1, yyrt1 = z.DecInferLen(yyl1, z.DecBasicHandle().MaxInitLen, 872)
|
||||
yyrl1, yyrt1 = z.DecInferLen(yyl1, z.DecBasicHandle().MaxInitLen, 896)
|
||||
if yyrt1 {
|
||||
if yyrl1 <= cap(yyv1) {
|
||||
yyv1 = yyv1[:yyrl1]
|
||||
|
@ -20485,7 +20485,7 @@ func (x codecSelfer1234) decSliceReplicaSet(v *[]ReplicaSet, d *codec1978.Decode
|
|||
|
||||
yyrg1 := len(yyv1) > 0
|
||||
yyv21 := yyv1
|
||||
yyrl1, yyrt1 = z.DecInferLen(yyl1, z.DecBasicHandle().MaxInitLen, 856)
|
||||
yyrl1, yyrt1 = z.DecInferLen(yyl1, z.DecBasicHandle().MaxInitLen, 880)
|
||||
if yyrt1 {
|
||||
if yyrl1 <= cap(yyv1) {
|
||||
yyv1 = yyv1[:yyrl1]
|
||||
|
|
|
@ -2099,6 +2099,17 @@ type PodSpec struct {
|
|||
// If specified, the pod's tolerations.
|
||||
// +optional
|
||||
Tolerations []Toleration
|
||||
// HostAliases is an optional list of hosts and IPs that will be injected into the pod's hosts
|
||||
// file if specified. This is only valid for non-hostNetwork pods.
|
||||
// +optional
|
||||
HostAliases []HostAlias
|
||||
}
|
||||
|
||||
// HostAlias holds the mapping between IP and hostnames that will be injected as an entry in the
|
||||
// pod's hosts file.
|
||||
type HostAlias struct {
|
||||
IP string
|
||||
Hostnames []string
|
||||
}
|
||||
|
||||
// Sysctl defines a kernel parameter to be set
|
||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -1193,6 +1193,16 @@ message Handler {
|
|||
optional TCPSocketAction tcpSocket = 3;
|
||||
}
|
||||
|
||||
// HostAlias holds the mapping between IP and hostnames that will be injected as an entry in the
|
||||
// pod's hosts file.
|
||||
message HostAlias {
|
||||
// IP address of the host file entry.
|
||||
optional string ip = 1;
|
||||
|
||||
// Hostnames for the the above IP address.
|
||||
repeated string hostnames = 2;
|
||||
}
|
||||
|
||||
// Represents a host path mapped into a pod.
|
||||
// Host path volumes do not support ownership management or SELinux relabeling.
|
||||
message HostPathVolumeSource {
|
||||
|
@ -2734,6 +2744,13 @@ message PodSpec {
|
|||
// If specified, the pod's tolerations.
|
||||
// +optional
|
||||
repeated Toleration tolerations = 22;
|
||||
|
||||
// HostAliases is an optional list of hosts and IPs that will be injected into the pod's hosts
|
||||
// file if specified. This is only valid for non-hostNetwork pods.
|
||||
// +optional
|
||||
// +patchMergeKey=IP
|
||||
// +patchStrategy=merge
|
||||
repeated HostAlias hostMappings = 23;
|
||||
}
|
||||
|
||||
// PodStatus represents information about the status of a pod. Status may trail the actual
|
||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -2406,6 +2406,21 @@ type PodSpec struct {
|
|||
// If specified, the pod's tolerations.
|
||||
// +optional
|
||||
Tolerations []Toleration `json:"tolerations,omitempty" protobuf:"bytes,22,opt,name=tolerations"`
|
||||
// HostAliases is an optional list of hosts and IPs that will be injected into the pod's hosts
|
||||
// file if specified. This is only valid for non-hostNetwork pods.
|
||||
// +optional
|
||||
// +patchMergeKey=IP
|
||||
// +patchStrategy=merge
|
||||
HostAliases []HostAlias `json:"hostMappings,omitempty" patchStrategy:"merge" patchMergeKey:"IP" protobuf:"bytes,23,rep,name=hostMappings"`
|
||||
}
|
||||
|
||||
// HostAlias holds the mapping between IP and hostnames that will be injected as an entry in the
|
||||
// pod's hosts file.
|
||||
type HostAlias struct {
|
||||
// IP address of the host file entry.
|
||||
IP string `json:"ip,omitempty" protobuf:"bytes,1,opt,name=ip"`
|
||||
// Hostnames for the the above IP address.
|
||||
Hostnames []string `json:"hostnames,omitempty" protobuf:"bytes,2,rep,name=hostnames"`
|
||||
}
|
||||
|
||||
// PodSecurityContext holds pod-level security attributes and common container settings.
|
||||
|
|
|
@ -640,6 +640,16 @@ func (Handler) SwaggerDoc() map[string]string {
|
|||
return map_Handler
|
||||
}
|
||||
|
||||
var map_HostAlias = map[string]string{
|
||||
"": "HostAlias holds the mapping between IP and hostnames that will be injected as an entry in the pod's hosts file.",
|
||||
"ip": "IP address of the host file entry.",
|
||||
"hostnames": "Hostnames for the the above IP address.",
|
||||
}
|
||||
|
||||
func (HostAlias) SwaggerDoc() map[string]string {
|
||||
return map_HostAlias
|
||||
}
|
||||
|
||||
var map_HostPathVolumeSource = map[string]string{
|
||||
"": "Represents a host path mapped into a pod. Host path volumes do not support ownership management or SELinux relabeling.",
|
||||
"path": "Path of the directory on the host. More info: http://kubernetes.io/docs/user-guide/volumes#hostpath",
|
||||
|
@ -1350,6 +1360,7 @@ var map_PodSpec = map[string]string{
|
|||
"affinity": "If specified, the pod's scheduling constraints",
|
||||
"schedulerName": "If specified, the pod will be dispatched by specified scheduler. If not specified, the pod will be dispatched by default scheduler.",
|
||||
"tolerations": "If specified, the pod's tolerations.",
|
||||
"hostMappings": "HostAliases is an optional list of hosts and IPs that will be injected into the pod's hosts file if specified. This is only valid for non-hostNetwork pods.",
|
||||
}
|
||||
|
||||
func (PodSpec) SwaggerDoc() map[string]string {
|
||||
|
|
|
@ -145,6 +145,8 @@ func RegisterConversions(scheme *runtime.Scheme) error {
|
|||
Convert_api_HTTPHeader_To_v1_HTTPHeader,
|
||||
Convert_v1_Handler_To_api_Handler,
|
||||
Convert_api_Handler_To_v1_Handler,
|
||||
Convert_v1_HostAlias_To_api_HostAlias,
|
||||
Convert_api_HostAlias_To_v1_HostAlias,
|
||||
Convert_v1_HostPathVolumeSource_To_api_HostPathVolumeSource,
|
||||
Convert_api_HostPathVolumeSource_To_v1_HostPathVolumeSource,
|
||||
Convert_v1_ISCSIVolumeSource_To_api_ISCSIVolumeSource,
|
||||
|
@ -1788,6 +1790,28 @@ func Convert_api_Handler_To_v1_Handler(in *api.Handler, out *Handler, s conversi
|
|||
return autoConvert_api_Handler_To_v1_Handler(in, out, s)
|
||||
}
|
||||
|
||||
func autoConvert_v1_HostAlias_To_api_HostAlias(in *HostAlias, out *api.HostAlias, s conversion.Scope) error {
|
||||
out.IP = in.IP
|
||||
out.Hostnames = *(*[]string)(unsafe.Pointer(&in.Hostnames))
|
||||
return nil
|
||||
}
|
||||
|
||||
// Convert_v1_HostAlias_To_api_HostAlias is an autogenerated conversion function.
|
||||
func Convert_v1_HostAlias_To_api_HostAlias(in *HostAlias, out *api.HostAlias, s conversion.Scope) error {
|
||||
return autoConvert_v1_HostAlias_To_api_HostAlias(in, out, s)
|
||||
}
|
||||
|
||||
func autoConvert_api_HostAlias_To_v1_HostAlias(in *api.HostAlias, out *HostAlias, s conversion.Scope) error {
|
||||
out.IP = in.IP
|
||||
out.Hostnames = *(*[]string)(unsafe.Pointer(&in.Hostnames))
|
||||
return nil
|
||||
}
|
||||
|
||||
// Convert_api_HostAlias_To_v1_HostAlias is an autogenerated conversion function.
|
||||
func Convert_api_HostAlias_To_v1_HostAlias(in *api.HostAlias, out *HostAlias, s conversion.Scope) error {
|
||||
return autoConvert_api_HostAlias_To_v1_HostAlias(in, out, s)
|
||||
}
|
||||
|
||||
func autoConvert_v1_HostPathVolumeSource_To_api_HostPathVolumeSource(in *HostPathVolumeSource, out *api.HostPathVolumeSource, s conversion.Scope) error {
|
||||
out.Path = in.Path
|
||||
return nil
|
||||
|
@ -3468,6 +3492,7 @@ func autoConvert_v1_PodSpec_To_api_PodSpec(in *PodSpec, out *api.PodSpec, s conv
|
|||
out.Affinity = (*api.Affinity)(unsafe.Pointer(in.Affinity))
|
||||
out.SchedulerName = in.SchedulerName
|
||||
out.Tolerations = *(*[]api.Toleration)(unsafe.Pointer(&in.Tolerations))
|
||||
out.HostAliases = *(*[]api.HostAlias)(unsafe.Pointer(&in.HostAliases))
|
||||
return nil
|
||||
}
|
||||
|
||||
|
@ -3512,6 +3537,7 @@ func autoConvert_api_PodSpec_To_v1_PodSpec(in *api.PodSpec, out *PodSpec, s conv
|
|||
out.Affinity = (*Affinity)(unsafe.Pointer(in.Affinity))
|
||||
out.SchedulerName = in.SchedulerName
|
||||
out.Tolerations = *(*[]Toleration)(unsafe.Pointer(&in.Tolerations))
|
||||
out.HostAliases = *(*[]HostAlias)(unsafe.Pointer(&in.HostAliases))
|
||||
return nil
|
||||
}
|
||||
|
||||
|
|
|
@ -90,6 +90,7 @@ func RegisterDeepCopies(scheme *runtime.Scheme) error {
|
|||
conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_HTTPGetAction, InType: reflect.TypeOf(&HTTPGetAction{})},
|
||||
conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_HTTPHeader, InType: reflect.TypeOf(&HTTPHeader{})},
|
||||
conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_Handler, InType: reflect.TypeOf(&Handler{})},
|
||||
conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_HostAlias, InType: reflect.TypeOf(&HostAlias{})},
|
||||
conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_HostPathVolumeSource, InType: reflect.TypeOf(&HostPathVolumeSource{})},
|
||||
conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_ISCSIVolumeSource, InType: reflect.TypeOf(&ISCSIVolumeSource{})},
|
||||
conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_KeyToPath, InType: reflect.TypeOf(&KeyToPath{})},
|
||||
|
@ -1179,6 +1180,20 @@ func DeepCopy_v1_Handler(in interface{}, out interface{}, c *conversion.Cloner)
|
|||
}
|
||||
}
|
||||
|
||||
func DeepCopy_v1_HostAlias(in interface{}, out interface{}, c *conversion.Cloner) error {
|
||||
{
|
||||
in := in.(*HostAlias)
|
||||
out := out.(*HostAlias)
|
||||
*out = *in
|
||||
if in.Hostnames != nil {
|
||||
in, out := &in.Hostnames, &out.Hostnames
|
||||
*out = make([]string, len(*in))
|
||||
copy(*out, *in)
|
||||
}
|
||||
return nil
|
||||
}
|
||||
}
|
||||
|
||||
func DeepCopy_v1_HostPathVolumeSource(in interface{}, out interface{}, c *conversion.Cloner) error {
|
||||
{
|
||||
in := in.(*HostPathVolumeSource)
|
||||
|
@ -2423,6 +2438,15 @@ func DeepCopy_v1_PodSpec(in interface{}, out interface{}, c *conversion.Cloner)
|
|||
}
|
||||
}
|
||||
}
|
||||
if in.HostAliases != nil {
|
||||
in, out := &in.HostAliases, &out.HostAliases
|
||||
*out = make([]HostAlias, len(*in))
|
||||
for i := range *in {
|
||||
if err := DeepCopy_v1_HostAlias(&(*in)[i], &(*out)[i], c); err != nil {
|
||||
return err
|
||||
}
|
||||
}
|
||||
}
|
||||
return nil
|
||||
}
|
||||
}
|
||||
|
|
|
@ -92,6 +92,7 @@ func RegisterDeepCopies(scheme *runtime.Scheme) error {
|
|||
conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_api_HTTPGetAction, InType: reflect.TypeOf(&HTTPGetAction{})},
|
||||
conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_api_HTTPHeader, InType: reflect.TypeOf(&HTTPHeader{})},
|
||||
conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_api_Handler, InType: reflect.TypeOf(&Handler{})},
|
||||
conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_api_HostAlias, InType: reflect.TypeOf(&HostAlias{})},
|
||||
conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_api_HostPathVolumeSource, InType: reflect.TypeOf(&HostPathVolumeSource{})},
|
||||
conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_api_ISCSIVolumeSource, InType: reflect.TypeOf(&ISCSIVolumeSource{})},
|
||||
conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_api_KeyToPath, InType: reflect.TypeOf(&KeyToPath{})},
|
||||
|
@ -1181,6 +1182,20 @@ func DeepCopy_api_Handler(in interface{}, out interface{}, c *conversion.Cloner)
|
|||
}
|
||||
}
|
||||
|
||||
func DeepCopy_api_HostAlias(in interface{}, out interface{}, c *conversion.Cloner) error {
|
||||
{
|
||||
in := in.(*HostAlias)
|
||||
out := out.(*HostAlias)
|
||||
*out = *in
|
||||
if in.Hostnames != nil {
|
||||
in, out := &in.Hostnames, &out.Hostnames
|
||||
*out = make([]string, len(*in))
|
||||
copy(*out, *in)
|
||||
}
|
||||
return nil
|
||||
}
|
||||
}
|
||||
|
||||
func DeepCopy_api_HostPathVolumeSource(in interface{}, out interface{}, c *conversion.Cloner) error {
|
||||
{
|
||||
in := in.(*HostPathVolumeSource)
|
||||
|
@ -2441,6 +2456,15 @@ func DeepCopy_api_PodSpec(in interface{}, out interface{}, c *conversion.Cloner)
|
|||
}
|
||||
}
|
||||
}
|
||||
if in.HostAliases != nil {
|
||||
in, out := &in.HostAliases, &out.HostAliases
|
||||
*out = make([]HostAlias, len(*in))
|
||||
for i := range *in {
|
||||
if err := DeepCopy_api_HostAlias(&(*in)[i], &(*out)[i], c); err != nil {
|
||||
return err
|
||||
}
|
||||
}
|
||||
}
|
||||
return nil
|
||||
}
|
||||
}
|
||||
|
|
|
@ -6166,7 +6166,7 @@ func (x codecSelfer1234) decSliceStatefulSet(v *[]StatefulSet, d *codec1978.Deco
|
|||
|
||||
yyrg1 := len(yyv1) > 0
|
||||
yyv21 := yyv1
|
||||
yyrl1, yyrt1 = z.DecInferLen(yyl1, z.DecBasicHandle().MaxInitLen, 856)
|
||||
yyrl1, yyrt1 = z.DecInferLen(yyl1, z.DecBasicHandle().MaxInitLen, 880)
|
||||
if yyrt1 {
|
||||
if yyrl1 <= cap(yyv1) {
|
||||
yyv1 = yyv1[:yyrl1]
|
||||
|
@ -6404,7 +6404,7 @@ func (x codecSelfer1234) decSliceDeployment(v *[]Deployment, d *codec1978.Decode
|
|||
|
||||
yyrg1 := len(yyv1) > 0
|
||||
yyv21 := yyv1
|
||||
yyrl1, yyrt1 = z.DecInferLen(yyl1, z.DecBasicHandle().MaxInitLen, 920)
|
||||
yyrl1, yyrt1 = z.DecInferLen(yyl1, z.DecBasicHandle().MaxInitLen, 944)
|
||||
if yyrt1 {
|
||||
if yyrl1 <= cap(yyv1) {
|
||||
yyv1 = yyv1[:yyrl1]
|
||||
|
|
|
@ -2481,7 +2481,7 @@ func (x codecSelfer1234) decSliceJob(v *[]Job, d *codec1978.Decoder) {
|
|||
|
||||
yyrg1 := len(yyv1) > 0
|
||||
yyv21 := yyv1
|
||||
yyrl1, yyrt1 = z.DecInferLen(yyl1, z.DecBasicHandle().MaxInitLen, 880)
|
||||
yyrl1, yyrt1 = z.DecInferLen(yyl1, z.DecBasicHandle().MaxInitLen, 904)
|
||||
if yyrt1 {
|
||||
if yyrl1 <= cap(yyv1) {
|
||||
yyv1 = yyv1[:yyrl1]
|
||||
|
|
|
@ -2325,7 +2325,7 @@ func (x codecSelfer1234) decSliceCronJob(v *[]CronJob, d *codec1978.Decoder) {
|
|||
|
||||
yyrg1 := len(yyv1) > 0
|
||||
yyv21 := yyv1
|
||||
yyrl1, yyrt1 = z.DecInferLen(yyl1, z.DecBasicHandle().MaxInitLen, 1144)
|
||||
yyrl1, yyrt1 = z.DecInferLen(yyl1, z.DecBasicHandle().MaxInitLen, 1168)
|
||||
if yyrt1 {
|
||||
if yyrl1 <= cap(yyv1) {
|
||||
yyv1 = yyv1[:yyrl1]
|
||||
|
|
|
@ -19652,7 +19652,7 @@ func (x codecSelfer1234) decSliceDeployment(v *[]Deployment, d *codec1978.Decode
|
|||
|
||||
yyrg1 := len(yyv1) > 0
|
||||
yyv21 := yyv1
|
||||
yyrl1, yyrt1 = z.DecInferLen(yyl1, z.DecBasicHandle().MaxInitLen, 920)
|
||||
yyrl1, yyrt1 = z.DecInferLen(yyl1, z.DecBasicHandle().MaxInitLen, 944)
|
||||
if yyrt1 {
|
||||
if yyrl1 <= cap(yyv1) {
|
||||
yyv1 = yyv1[:yyrl1]
|
||||
|
@ -19771,7 +19771,7 @@ func (x codecSelfer1234) decSliceDaemonSet(v *[]DaemonSet, d *codec1978.Decoder)
|
|||
|
||||
yyrg1 := len(yyv1) > 0
|
||||
yyv21 := yyv1
|
||||
yyrl1, yyrt1 = z.DecInferLen(yyl1, z.DecBasicHandle().MaxInitLen, 872)
|
||||
yyrl1, yyrt1 = z.DecInferLen(yyl1, z.DecBasicHandle().MaxInitLen, 896)
|
||||
if yyrt1 {
|
||||
if yyrl1 <= cap(yyv1) {
|
||||
yyv1 = yyv1[:yyrl1]
|
||||
|
@ -20485,7 +20485,7 @@ func (x codecSelfer1234) decSliceReplicaSet(v *[]ReplicaSet, d *codec1978.Decode
|
|||
|
||||
yyrg1 := len(yyv1) > 0
|
||||
yyv21 := yyv1
|
||||
yyrl1, yyrt1 = z.DecInferLen(yyl1, z.DecBasicHandle().MaxInitLen, 856)
|
||||
yyrl1, yyrt1 = z.DecInferLen(yyl1, z.DecBasicHandle().MaxInitLen, 880)
|
||||
if yyrt1 {
|
||||
if yyrl1 <= cap(yyv1) {
|
||||
yyv1 = yyv1[:yyrl1]
|
||||
|
|
Loading…
Reference in New Issue