Merge pull request #101294 from twosigma/gasethostnamefqdn

Promote setHostnameAsFQDN feature to GA
This commit is contained in:
Kubernetes Prow Robot 2021-06-09 09:07:48 -07:00 committed by GitHub
commit 3d6e0694bb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 14 deletions

View File

@ -619,11 +619,6 @@ func dropDisabledFields(
podSpec.PreemptionPolicy = nil
}
if !utilfeature.DefaultFeatureGate.Enabled(features.SetHostnameAsFQDN) && !setHostnameAsFQDNInUse(oldPodSpec) {
// Set SetHostnameAsFQDN to nil only if feature is disabled and it is not used
podSpec.SetHostnameAsFQDN = nil
}
dropDisabledPodAffinityTermFields(podSpec, oldPodSpec)
}
@ -918,14 +913,6 @@ func multiplePodIPsInUse(podStatus *api.PodStatus) bool {
return false
}
// setHostnameAsFQDNInUse returns true if any pod's spec defines setHostnameAsFQDN field.
func setHostnameAsFQDNInUse(podSpec *api.PodSpec) bool {
if podSpec == nil || podSpec.SetHostnameAsFQDN == nil {
return false
}
return *podSpec.SetHostnameAsFQDN
}
// SeccompAnnotationForField takes a pod seccomp profile field and returns the
// converted annotation value
func SeccompAnnotationForField(field *api.SeccompProfile) string {

View File

@ -549,6 +549,7 @@ const (
// kep: http://kep.k8s.io/1797
// alpha: v1.19
// beta: v1.20
// GA: v1.22
//
// Allow setting the Fully Qualified Domain Name (FQDN) in the hostname of a Pod. If a Pod does not
// have FQDN, this feature has no effect.
@ -833,7 +834,7 @@ var defaultKubernetesFeatureGates = map[featuregate.Feature]featuregate.FeatureS
DownwardAPIHugePages: {Default: false, PreRelease: featuregate.Beta}, // on by default in 1.22
AnyVolumeDataSource: {Default: false, PreRelease: featuregate.Alpha},
DefaultPodTopologySpread: {Default: true, PreRelease: featuregate.Beta},
SetHostnameAsFQDN: {Default: true, PreRelease: featuregate.Beta},
SetHostnameAsFQDN: {Default: true, PreRelease: featuregate.GA, LockToDefault: true}, //remove in 1.24
WinOverlay: {Default: true, PreRelease: featuregate.Beta},
WinDSR: {Default: false, PreRelease: featuregate.Alpha},
DisableAcceleratorUsageMetrics: {Default: true, PreRelease: featuregate.Beta},