Skip to content

Commit 84b9cdc

Browse files
committed
change spec peering value to provided const
1 parent f7c56f6 commit 84b9cdc

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

pkg/liqoctl/inband/cluster.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -913,7 +913,7 @@ func (c *Cluster) DisablePeering(ctx context.Context, remoteClusterID *discovery
913913
// Set incoming peering to no and return if flag is set
914914
if incoming {
915915
if _, err = controllerutil.CreateOrUpdate(ctx, c.local.CRClient, fc, func() error {
916-
fc.Spec.IncomingPeeringEnabled = "No"
916+
fc.Spec.IncomingPeeringEnabled = discoveryv1alpha1.PeeringEnabledNo
917917
return nil
918918
}); err != nil {
919919
return fmt.Errorf("an error occurred while disabling incoming peering for remote cluster %q: %w", remName, err)
@@ -924,7 +924,7 @@ func (c *Cluster) DisablePeering(ctx context.Context, remoteClusterID *discovery
924924

925925
// Set outgoing peering to no.
926926
if _, err = controllerutil.CreateOrUpdate(ctx, c.local.CRClient, fc, func() error {
927-
fc.Spec.OutgoingPeeringEnabled = "No"
927+
fc.Spec.OutgoingPeeringEnabled = discoveryv1alpha1.PeeringEnabledNo
928928
return nil
929929
}); err != nil {
930930
return fmt.Errorf("an error occurred while disabling peering for remote cluster %q: %w", remName, err)

0 commit comments

Comments
 (0)