@@ -172,7 +172,7 @@ func (r *TalosConfigReconciler) Reconcile(ctx context.Context, req ctrl.Request)
172
172
// Handle deleted talosconfigs
173
173
// We no longer set finalizers on talosconfigs, but we have to remove previously set finalizers
174
174
if ! config .ObjectMeta .DeletionTimestamp .IsZero () {
175
- return r .reconcileDelete (ctx , config )
175
+ return r .reconcileDelete (config )
176
176
}
177
177
178
178
// Look up the resource that owns this talosconfig if there is one
@@ -254,7 +254,7 @@ func (r *TalosConfigReconciler) Reconcile(ctx context.Context, req ctrl.Request)
254
254
}
255
255
256
256
if err = r .reconcileGenerate (ctx , tcScope ); err != nil {
257
- conditions .MarkFalse (config , bootstrapv1alpha3 .DataSecretAvailableCondition , bootstrapv1alpha3 .DataSecretGenerationFailedReason , capiv1 .ConditionSeverityError , err .Error ())
257
+ conditions .MarkFalse (config , bootstrapv1alpha3 .DataSecretAvailableCondition , bootstrapv1alpha3 .DataSecretGenerationFailedReason , capiv1 .ConditionSeverityError , "%s" , err .Error ())
258
258
259
259
return ctrl.Result {}, err
260
260
}
@@ -380,7 +380,7 @@ func (r *TalosConfigReconciler) reconcileGenerate(ctx context.Context, tcScope *
380
380
return nil
381
381
}
382
382
383
- func (r * TalosConfigReconciler ) reconcileDelete (ctx context. Context , config * bootstrapv1alpha3.TalosConfig ) (ctrl.Result , error ) {
383
+ func (r * TalosConfigReconciler ) reconcileDelete (config * bootstrapv1alpha3.TalosConfig ) (ctrl.Result , error ) {
384
384
controllerutil .RemoveFinalizer (config , bootstrapv1alpha3 .ConfigFinalizer )
385
385
386
386
return ctrl.Result {}, nil
@@ -499,6 +499,11 @@ func (r *TalosConfigReconciler) genConfigs(ctx context.Context, scope *TalosConf
499
499
500
500
genOptions = append (genOptions , generate .WithSecretsBundle (secretBundle ))
501
501
502
+ // Talos dropped support for version contracts <= 0.14, but we still need to support old secret bundles
503
+ if versionContract != nil && versionContract .Major < 1 && versionContract .Minor < 14 {
504
+ genOptions = append (genOptions , generate .WithClusterDiscovery (false ))
505
+ }
506
+
502
507
APIEndpointPort := strconv .Itoa (int (scope .Cluster .Spec .ControlPlaneEndpoint .Port ))
503
508
504
509
input , err := generate .NewInput (
0 commit comments