Skip to content

Commit 805ca0a

Browse files
make cluster status patch instruction conditional to rancher version
1 parent 0fe893d commit 805ca0a

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

pkg/plan/bootstrap.go

+6-2
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ package plan
33
import (
44
"context"
55
"fmt"
6+
"strings"
67

78
"github.com/rancher/system-agent/pkg/applyinator"
89

@@ -134,8 +135,11 @@ func (p *plan) addInstructions(cfg *config.Config, dataDir string) error {
134135
return err
135136
}
136137

137-
if err := p.addInstruction(rancher.PatchLocalProvisioningClusterStatus(cfg.RancherInstallerImage, cfg.SystemDefaultRegistry, k8sVersion)); err != nil {
138-
return err
138+
// currently instruction is only needed for v2.8.x
139+
if strings.HasPrefix(cfg.RancherVersion, "v2.8") {
140+
if err := p.addInstruction(rancher.PatchLocalProvisioningClusterStatus(cfg.RancherInstallerImage, cfg.SystemDefaultRegistry, k8sVersion)); err != nil {
141+
return err
142+
}
139143
}
140144

141145
if err := p.addInstruction(rancher.ToWaitSUCInstruction(cfg.RancherInstallerImage, cfg.SystemDefaultRegistry, k8sVersion)); err != nil {

0 commit comments

Comments
 (0)