Skip to content

Commit 3ca940b

Browse files
committed
feat: patch provisioning cluster before installing resources
Signed-off-by: PoAn Yang <[email protected]>
1 parent fd9194c commit 3ca940b

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

pkg/plan/bootstrap.go

+6-5
Original file line numberDiff line numberDiff line change
@@ -139,17 +139,18 @@ func (p *plan) addInstructions(cfg *config.Config, dataDir string) error {
139139
}
140140
}
141141

142-
if err := p.addInstruction(resources.ToInstruction(cfg.RancherInstallerImage, cfg.SystemDefaultRegistry, k8sVersion, dataDir)); err != nil {
143-
return err
144-
}
145-
146-
// currently instruction is needed for version above v2.8.x
142+
// Patch local provisioning cluster status before installing bootstrap resources,
143+
// so bundles can be created first and managed charts can be installed smoothly.
147144
if semver.Compare(cfg.RancherVersion, "v2.8.0") >= 0 {
148145
if err := p.addInstruction(rancher.PatchLocalProvisioningClusterStatus(cfg.RancherInstallerImage, cfg.SystemDefaultRegistry, k8sVersion)); err != nil {
149146
return err
150147
}
151148
}
152149

150+
if err := p.addInstruction(resources.ToInstruction(cfg.RancherInstallerImage, cfg.SystemDefaultRegistry, k8sVersion, dataDir)); err != nil {
151+
return err
152+
}
153+
153154
if semver.Compare(cfg.RancherVersion, "v2.9.0") >= 0 {
154155
if err := p.addInstruction(rancher.ToRestartRancherWebhookInstruction(k8sVersion)); err != nil {
155156
return err

0 commit comments

Comments
 (0)