Skip to content

Commit 08515c7

Browse files
tom1299HirazawaUi
authored andcommitted
Fix missing control plane health check timeout
1 parent d133742 commit 08515c7

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

cmd/kubeadm/app/util/config/initconfiguration.go

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -380,6 +380,11 @@ func documentMapToInitConfiguration(gvkmap kubeadmapi.DocumentMap, allowDeprecat
380380
// If ClusterConfiguration was given, populate it in the InitConfiguration struct
381381
if clustercfg != nil {
382382
initcfg.ClusterConfiguration = *clustercfg
383+
384+
// TODO: Workaround for missing v1beta3 ClusterConfiguration timeout conversion. Remove this conversion once the v1beta3 is removed
385+
if clustercfg.APIServer.TimeoutForControlPlane.Duration != 0 && clustercfg.APIServer.TimeoutForControlPlane.Duration != kubeadmconstants.ControlPlaneComponentHealthCheckTimeout {
386+
initcfg.Timeouts.ControlPlaneComponentHealthCheck.Duration = clustercfg.APIServer.TimeoutForControlPlane.Duration
387+
}
383388
} else {
384389
// Populate the internal InitConfiguration.ClusterConfiguration with defaults
385390
extclustercfg := &kubeadmapiv1.ClusterConfiguration{}

0 commit comments

Comments
 (0)