Skip to content

Commit

Permalink
smee: toDHCPData() from CRD's TimeServers to DHCP NTPServers (#434)
Browse files Browse the repository at this point in the history
## Description

smee: toDHCPData() from CRD's TimeServers to DHCP NTPServers
  • Loading branch information
mergify[bot] authored Apr 22, 2024
2 parents e63d11d + 16ed5e3 commit dc885d5
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions internal/backend/kube/kube.go
Original file line number Diff line number Diff line change
Expand Up @@ -228,6 +228,15 @@ func toDHCPData(h *v1alpha1.DHCP) (*data.DHCP, error) {
d.NameServers = append(d.NameServers, ip)
}

// timeservers, optional
for _, s := range h.TimeServers {
ip := net.ParseIP(s)
if ip == nil {
break
}
d.NTPServers = append(d.NTPServers, ip)
}

// hostname, optional
d.Hostname = h.Hostname

Expand Down

0 comments on commit dc885d5

Please sign in to comment.