Skip to content

Commit

Permalink
rename function
Browse files Browse the repository at this point in the history
  • Loading branch information
eaudetcobello committed Oct 8, 2024
1 parent faede9c commit ad31524
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions bootstrap/controllers/ck8sconfig_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -258,7 +258,7 @@ func (r *CK8sConfigReconciler) joinControlplane(ctx context.Context, scope *Scop
return err
}

snapInstallData := r.setSnapInstallDataFromSpec(scope.Config.Spec)
snapInstallData := r.getSnapInstallDataFromSpec(scope.Config.Spec)

inPlaceInstallData := r.resolveInPlaceUpgradeRelease(machine)

Expand Down Expand Up @@ -346,7 +346,7 @@ func (r *CK8sConfigReconciler) joinWorker(ctx context.Context, scope *Scope) err
return err
}

snapInstallData := r.setSnapInstallDataFromSpec(scope.Config.Spec)
snapInstallData := r.getSnapInstallDataFromSpec(scope.Config.Spec)

// If the machine has an in-place upgrade annotation, use it to set the snap install data
inPlaceInstallData := r.resolveInPlaceUpgradeRelease(machine)
Expand Down Expand Up @@ -442,7 +442,7 @@ func (r *CK8sConfigReconciler) resolveInPlaceUpgradeRelease(machine *clusterv1.M
return cloudinit.SnapInstallData{}
}

func (r *CK8sConfigReconciler) setSnapInstallDataFromSpec(spec bootstrapv1.CK8sConfigSpec) cloudinit.SnapInstallData {
func (r *CK8sConfigReconciler) getSnapInstallDataFromSpec(spec bootstrapv1.CK8sConfigSpec) cloudinit.SnapInstallData {
switch {
case spec.Channel != "":
return cloudinit.SnapInstallData{
Expand Down Expand Up @@ -602,7 +602,7 @@ func (r *CK8sConfigReconciler) handleClusterNotInitialized(ctx context.Context,
return ctrl.Result{}, fmt.Errorf("failed to render k8sd-proxy daemonset: %w", err)
}

snapInstallData := r.setSnapInstallDataFromSpec(scope.Config.Spec)
snapInstallData := r.getSnapInstallDataFromSpec(scope.Config.Spec)

inPlaceInstallData := r.resolveInPlaceUpgradeRelease(machine)

Expand Down

0 comments on commit ad31524

Please sign in to comment.