Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion data/data/bootstrap/files/usr/local/bin/bootkube.sh.template
Original file line number Diff line number Diff line change
Expand Up @@ -402,7 +402,11 @@ run_cluster_bootstrap() {
--volume "$PWD:/assets:z" \
--volume /etc/kubernetes:/etc/kubernetes:z \
"${CLUSTER_BOOTSTRAP_IMAGE}" \
start --tear-down-early=false --asset-dir=/assets --required-pods="${REQUIRED_PODS}"
start \
--tear-down-early=false \
--tear-down-delay="{{.TearDownDelay}}" \
--asset-dir=/assets \
--required-pods="${REQUIRED_PODS}"
}

if [ ! -f cb-bootstrap.done ]
Expand Down
11 changes: 11 additions & 0 deletions pkg/asset/ignition/bootstrap/common.go
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ import (
"github.com/openshift/installer/pkg/asset/rhcos"
"github.com/openshift/installer/pkg/asset/tls"
"github.com/openshift/installer/pkg/types"
"github.com/openshift/installer/pkg/types/alibabacloud"
baremetaltypes "github.com/openshift/installer/pkg/types/baremetal"
vspheretypes "github.com/openshift/installer/pkg/types/vsphere"
)
Expand Down Expand Up @@ -78,6 +79,7 @@ type bootstrapTemplateData struct {
BootstrapInPlace *types.BootstrapInPlace
UseIPv6ForNodeIP bool
IsOKD bool
TearDownDelay string
}

// platformTemplateData is the data to use to replace values in bootstrap
Expand Down Expand Up @@ -278,6 +280,14 @@ func (a *Common) getTemplateData(dependencies asset.Parents, bootstrapInPlace bo
logrus.Warnf("Found override for Cluster Profile: %q", cp)
clusterProfile = cp
}

tearDownDelay := "0"
if installConfig.Config.Platform.Name() == alibabacloud.Name {
// tear-down set to let kube-apiserver rolls out and avoid loopback CLB limitation
// BZ https://bugzilla.redhat.com/show_bug.cgi?id=2035757
tearDownDelay = "10m"
}

var bootstrapInPlaceConfig *types.BootstrapInPlace
if bootstrapInPlace {
bootstrapInPlaceConfig = installConfig.Config.BootstrapInPlace
Expand All @@ -297,6 +307,7 @@ func (a *Common) getTemplateData(dependencies asset.Parents, bootstrapInPlace bo
BootstrapInPlace: bootstrapInPlaceConfig,
UseIPv6ForNodeIP: APIIntVIPonIPv6,
IsOKD: installConfig.Config.IsOKD(),
TearDownDelay: tearDownDelay,
}
}

Expand Down