@@ -124,6 +124,34 @@ func ToScaleUpFleetControllerInstruction(_, _, k8sVersion string) (*applyinator.
124
124
}, nil
125
125
}
126
126
127
+ func ToDeleteRancherWebhookValidationConfiguration (k8sVersion string ) (* applyinator.Instruction , error ) {
128
+ cmd , err := self .Self ()
129
+ if err != nil {
130
+ return nil , fmt .Errorf ("resolving location of %s: %w" , os .Args [0 ], err )
131
+ }
132
+ return & applyinator.Instruction {
133
+ Name : "delete-rancher-webhook-validation-configuration" ,
134
+ SaveOutput : true ,
135
+ Args : []string {"retry" , kubectl .Command (k8sVersion ), "delete" , "validatingwebhookconfiguration" , "rancher.cattle.io" },
136
+ Env : kubectl .Env (k8sVersion ),
137
+ Command : cmd ,
138
+ }, nil
139
+ }
140
+
141
+ func ToRestartRancherWebhookInstruction (k8sVersion string ) (* applyinator.Instruction , error ) {
142
+ cmd , err := self .Self ()
143
+ if err != nil {
144
+ return nil , fmt .Errorf ("resolving location of %s: %w" , os .Args [0 ], err )
145
+ }
146
+ return & applyinator.Instruction {
147
+ Name : "wait-rancher-webhook" ,
148
+ SaveOutput : true ,
149
+ Args : []string {"retry" , kubectl .Command (k8sVersion ), "-n" , "cattle-system" , "rollout" , "restart" , "deploy/rancher-webhook" },
150
+ Env : kubectl .Env (k8sVersion ),
151
+ Command : cmd ,
152
+ }, nil
153
+ }
154
+
127
155
// Needs to patch status subresource
128
156
// k patch cluster.provisioning local -n fleet-local --subresource=status --type=merge --patch '{"status":{"fleetWorkspaceName": "fleet-local"}}'
129
157
func PatchLocalProvisioningClusterStatus (_ , _ , k8sVersion string ) (* applyinator.Instruction , error ) {
@@ -132,7 +160,7 @@ func PatchLocalProvisioningClusterStatus(_, _, k8sVersion string) (*applyinator.
132
160
return nil , fmt .Errorf ("resolving location of %s: %w" , os .Args [0 ], err )
133
161
}
134
162
return & applyinator.Instruction {
135
- Name : "wait-suc-plan-resolved " ,
163
+ Name : "patch-provisioning-cluster-status " ,
136
164
SaveOutput : true ,
137
165
Args : []string {"retry" , kubectl .Command (k8sVersion ), "-n" , "fleet-local" , "patch" , "cluster.provisioning" , "local" , "--subresource=status" , "--type=merge" , "--patch" , "{\" status\" :{\" fleetWorkspaceName\" : \" fleet-local\" }}" },
138
166
Env : kubectl .Env (k8sVersion ),
0 commit comments