Skip to content

Commit

Permalink
fix(controller): handle error for invalid osp (#396)
Browse files Browse the repository at this point in the history
Signed-off-by: Oliver Bähler <oliverbaehler@hotmail.com>
  • Loading branch information
oliverbaehler committed Jun 11, 2024
1 parent 97990a7 commit 57e5476
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions pkg/controllers/osc/osc_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -267,17 +267,16 @@ func (r *Reconciler) reconcileOperatingSystemConfigs(ctx context.Context, md *cl
r.containerRuntimeConfig,
r.kubeletFeatureGates,
)
if err != nil {
return fmt.Errorf("failed to generate %s osc: %w", oscName, err)
}

if osc.Spec.CloudProvider.Name == "edge" {
if err := r.generateEdgeScript(ctx, md, token, bootstrapKubeconfig); err != nil {
return fmt.Errorf("failed to generate edge provider bootstrap script: %w", err)
}
}

if err != nil {
return fmt.Errorf("failed to generate %s osc: %w", oscName, err)
}

// Add machine deployment revision to OSC
revision := md.Annotations[machinecontrollerutil.RevisionAnnotation]
osc.Annotations = addMachineDeploymentRevision(revision, osc.Annotations)
Expand Down

0 comments on commit 57e5476

Please sign in to comment.