Merge pull request #44626 from sftim/20240103_default_host_network_ports_in_pod_templates

Revise explanation for DefaultHostNetworkHostPortsInPodTemplates
pull/44997/head^2
Kubernetes Prow Robot 2024-02-02 06:56:04 -08:00 committed by GitHub
commit d8b3cd47b9
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 8 additions and 5 deletions

View File

@ -10,9 +10,12 @@ stages:
defaultValue: false
fromVersion: "1.28"
---
Changes when the default value of
`PodSpec.containers[*].ports[*].hostPort`
is assigned. The default is to only set a default value in Pods.
This feature gate controls the point at which a default value for
`.spec.containers[*].ports[*].hostPort`
is assigned, for Pods using `hostNetwork: true`. The default since Kubernetes v1.28 is to only set a default
value in Pods.
Enabling this means a default will be assigned even to embedded
PodSpecs (e.g. in a Deployment), which is the historical default.
Enabling this means a default will be assigned even to the `.spec` of an embedded
[PodTemplate](/docs/concepts/workloads/pods/#pod-templates) (for example, in a Deployment),
which is the way that older releases of Kubernetes worked.
You should migrate your code so that it does not rely on the legacy behavior.