Skip to content

Commit

Permalink
return system resolver for sending requests to KubeAPI (#407)
Browse files Browse the repository at this point in the history
Co-authored-by: Константин Ревенко <[email protected]>
  • Loading branch information
consolere and Константин Ревенко authored Dec 21, 2024
1 parent 2e8d251 commit d3c2dde
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions pkg/dhcp/dhcp.go
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,8 @@ func NewDHCPManager(client corev1.ConfigMapInterface, namespace string) *Manager
// InitDHCP
// TODO optimize dhcp, using mac address, ip and deadline as unit
func (m *Manager) InitDHCP(ctx context.Context) error {
net.DefaultResolver.PreferGo = false

cm, err := m.client.Get(ctx, config.ConfigMapPodTrafficManager, metav1.GetOptions{})
if err != nil && !apierrors.IsNotFound(err) {
return fmt.Errorf("failed to get configmap %s, err: %v", config.ConfigMapPodTrafficManager, err)
Expand Down

0 comments on commit d3c2dde

Please sign in to comment.