@@ -95,3 +95,31 @@ func ToUpdateClientSecretInstruction(imageOverride, systemDefaultRegistry, k8sVe
95
95
Command : cmd ,
96
96
}, nil
97
97
}
98
+
99
+ func ToScaleDownFleetControllerInstruction (imageOverride , systemDefaultRegistry , k8sVersion string ) (* applyinator.Instruction , error ) {
100
+ cmd , err := self .Self ()
101
+ if err != nil {
102
+ return nil , fmt .Errorf ("resolving location of %s: %w" , os .Args [0 ], err )
103
+ }
104
+ return & applyinator.Instruction {
105
+ Name : "scale-down-fleet-controller" ,
106
+ SaveOutput : true ,
107
+ Args : []string {"retry" , kubectl .Command (k8sVersion ), "-n" , "cattle-fleet-system" , "scale" , "--replicas" , "0" , "deploy/fleet-controller" },
108
+ Env : kubectl .Env (k8sVersion ),
109
+ Command : cmd ,
110
+ }, nil
111
+ }
112
+
113
+ func ToScaleUpFleetControllerInstruction (imageOverride , systemDefaultRegistry , k8sVersion string ) (* applyinator.Instruction , error ) {
114
+ cmd , err := self .Self ()
115
+ if err != nil {
116
+ return nil , fmt .Errorf ("resolving location of %s: %w" , os .Args [0 ], err )
117
+ }
118
+ return & applyinator.Instruction {
119
+ Name : "scale-up-fleet-controller" ,
120
+ SaveOutput : true ,
121
+ Args : []string {"retry" , kubectl .Command (k8sVersion ), "-n" , "cattle-fleet-system" , "scale" , "--replicas" , "1" , "deploy/fleet-controller" },
122
+ Env : kubectl .Env (k8sVersion ),
123
+ Command : cmd ,
124
+ }, nil
125
+ }
0 commit comments