Skip to content

Commit d8b3cd4

Browse files
authored
Merge pull request #44626 from sftim/20240103_default_host_network_ports_in_pod_templates
Revise explanation for DefaultHostNetworkHostPortsInPodTemplates
2 parents 99b2b5e + 3b2873b commit d8b3cd4

File tree

1 file changed

+8
-5
lines changed

1 file changed

+8
-5
lines changed

content/en/docs/reference/command-line-tools-reference/feature-gates/default-host-network-ports-in-pod-templates.md

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,12 @@ stages:
1010
defaultValue: false
1111
fromVersion: "1.28"
1212
---
13-
Changes when the default value of
14-
`PodSpec.containers[*].ports[*].hostPort`
15-
is assigned. The default is to only set a default value in Pods.
13+
This feature gate controls the point at which a default value for
14+
`.spec.containers[*].ports[*].hostPort`
15+
is assigned, for Pods using `hostNetwork: true`. The default since Kubernetes v1.28 is to only set a default
16+
value in Pods.
1617

17-
Enabling this means a default will be assigned even to embedded
18-
PodSpecs (e.g. in a Deployment), which is the historical default.
18+
Enabling this means a default will be assigned even to the `.spec` of an embedded
19+
[PodTemplate](/docs/concepts/workloads/pods/#pod-templates) (for example, in a Deployment),
20+
which is the way that older releases of Kubernetes worked.
21+
You should migrate your code so that it does not rely on the legacy behavior.

0 commit comments

Comments
 (0)