Skip to content

Commit

Permalink
PCP 734 fix typo (#78)
Browse files Browse the repository at this point in the history
  • Loading branch information
sadysnaat authored May 17, 2023
1 parent f11d6e2 commit df23fb0
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions pkg/maas/scope/cluster.go
Original file line number Diff line number Diff line change
Expand Up @@ -179,19 +179,19 @@ const (
)

func (s *ClusterScope) GetPreferredSubnets() ([]string, error) {
maasPreferredSubent := &v1.ConfigMap{}
maasPreferredSubnet := &v1.ConfigMap{}
err := s.client.Get(context.Background(), types.NamespacedName{
Namespace: s.Cluster.GetNamespace(),
Name: maasPreferredSubnetConfigmap,
}, maasPreferredSubent)
}, maasPreferredSubnet)
switch {
case err != nil && !apierrors.IsNotFound(err):
return nil, err
case err != nil && apierrors.IsNotFound(err):
return nil, nil
}

subnetsString := maasPreferredSubent.Data[preferredSubnetKey]
subnetsString := maasPreferredSubnet.Data[preferredSubnetKey]
var result []string
for _, subnet := range strings.Split(subnetsString, ",") {
result = append(result, strings.TrimSpace(subnet))
Expand Down

0 comments on commit df23fb0

Please sign in to comment.