Skip to content

Commit

Permalink
Minor fix getters
Browse files Browse the repository at this point in the history
  • Loading branch information
fra98 committed Dec 18, 2023
1 parent ca27c28 commit f6876d9
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -97,12 +97,12 @@ func (r *ConfigurationReconciler) Reconcile(ctx context.Context, req ctrl.Reques

func (r *ConfigurationReconciler) defaultLocalNetwork(ctx context.Context, cfg *networkingv1alpha1.Configuration) error {
if r.localCIDR == nil {
podCIDR, err := ipamutils.RetrievePodCIDR(ctx, r.Client)
podCIDR, err := ipamutils.GetPodCIDR(ctx, r.Client)
if err != nil {
return fmt.Errorf("unable to retrieve the podCIDR: %w", err)
}

externalCIDR, err := ipamutils.RetrieveExternalCIDR(ctx, r.Client)
externalCIDR, err := ipamutils.GetExternalCIDR(ctx, r.Client)
if err != nil {
return fmt.Errorf("unable to retrieve the externalCIDR: %w", err)
}
Expand Down
2 changes: 1 addition & 1 deletion pkg/liqo-controller-manager/ip-controller/ip_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ func (r *IPReconciler) Reconcile(ctx context.Context, req ctrl.Request) (ctrl.Re

if !r.externalCIDRSet {
// Retrieve the externalCIDR of the local cluster
_, err := ipamutils.RetrieveExternalCIDR(ctx, r.Client)
_, err := ipamutils.GetExternalCIDR(ctx, r.Client)
if apierrors.IsNotFound(err) {
klog.Errorf("ExternalCIDR is not set yet. Configure it to correctly handle IP mappings")
return ctrl.Result{}, err
Expand Down
4 changes: 2 additions & 2 deletions pkg/liqoctl/rest/configuration/utils.go
Original file line number Diff line number Diff line change
Expand Up @@ -70,12 +70,12 @@ func ForgeConfigurationForRemoteCluster(ctx context.Context, cl client.Client,
return nil, fmt.Errorf("unable to get cluster identity: %w", err)
}

podCIDR, err := ipamutils.RetrievePodCIDR(ctx, cl)
podCIDR, err := ipamutils.GetPodCIDR(ctx, cl)
if err != nil {
return nil, fmt.Errorf("unable to retrieve pod CIDR: %w", err)
}

externalCIDR, err := ipamutils.RetrieveExternalCIDR(ctx, cl)
externalCIDR, err := ipamutils.GetExternalCIDR(ctx, cl)
if err != nil {
return nil, fmt.Errorf("unable to retrieve external CIDR: %w", err)
}
Expand Down

0 comments on commit f6876d9

Please sign in to comment.