Skip to content

Commit

Permalink
feat: set default NTP server to time.cloudflare.com
Browse files Browse the repository at this point in the history
Fixes #8396

Pros:

* IPv6
* good CDN, small RTT

Cons:

* not community-run

Signed-off-by: Andrey Smirnov <andrey.smirnov@siderolabs.com>
  • Loading branch information
smira committed Mar 12, 2024
1 parent 32e0877 commit e3c2a63
Show file tree
Hide file tree
Showing 7 changed files with 17 additions and 13 deletions.
7 changes: 7 additions & 0 deletions hack/release.toml
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,13 @@ The receiver can mostly parse both RFC3164 and RFC5424 messages and writes them
The logs can be viewed via `talosctl logs syslogd`.
This is mostly implemented for extension services that log to syslog.
"""

[notes.ntp]
title = "NTP"
description = """\
Default NTP server was updated to be `time.cloudflare.com` instead of `pool.ntp.org`.
Default server is only used if the user does not specify any NTP servers in the configuration.
"""

[make_deps]
Expand Down
6 changes: 3 additions & 3 deletions pkg/machinery/config/schemas/config.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -3132,9 +3132,9 @@
},
"type": "array",
"title": "servers",
"description": "Specifies time (NTP) servers to use for setting the system time.\nDefaults to pool.ntp.org\n",
"markdownDescription": "Specifies time (NTP) servers to use for setting the system time.\nDefaults to `pool.ntp.org`",
"x-intellij-html-description": "\u003cp\u003eSpecifies time (NTP) servers to use for setting the system time.\nDefaults to \u003ccode\u003epool.ntp.org\u003c/code\u003e\u003c/p\u003e\n"
"description": "Specifies time (NTP) servers to use for setting the system time.\nDefaults to time.cloudflare.com.\n",
"markdownDescription": "Specifies time (NTP) servers to use for setting the system time.\nDefaults to `time.cloudflare.com`.",
"x-intellij-html-description": "\u003cp\u003eSpecifies time (NTP) servers to use for setting the system time.\nDefaults to \u003ccode\u003etime.cloudflare.com\u003c/code\u003e.\u003c/p\u003e\n"
},
"bootTimeout": {
"type": "string",
Expand Down
2 changes: 1 addition & 1 deletion pkg/machinery/config/types/v1alpha1/v1alpha1_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -968,7 +968,7 @@ type TimeConfig struct {
TimeDisabled *bool `yaml:"disabled,omitempty"`
// description: |
// Specifies time (NTP) servers to use for setting the system time.
// Defaults to `pool.ntp.org`
// Defaults to `time.cloudflare.com`.
TimeServers []string `yaml:"servers,omitempty"`
// description: |
// Specifies the timeout when the node time is considered to be in sync unlocking the boot sequence.
Expand Down
2 changes: 1 addition & 1 deletion pkg/machinery/config/types/v1alpha1/v1alpha1_types_doc.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 1 addition & 4 deletions pkg/machinery/constants/constants.go
Original file line number Diff line number Diff line change
Expand Up @@ -744,10 +744,7 @@ const (
AnnotationOwnedTaints = "talos.dev/owned-taints"

// DefaultNTPServer is the NTP server to use if not configured explicitly.
//
// TODO: Once we get naming sorted we need to apply for a project specific address
// https://manage.ntppool.org/manage/vendor
DefaultNTPServer = "pool.ntp.org"
DefaultNTPServer = "time.cloudflare.com"

// DefaultPrimaryResolver is the default primary DNS server.
DefaultPrimaryResolver = "1.1.1.1"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1994,7 +1994,7 @@ machine:
| Field | Type | Description | Value(s) |
|-------|------|-------------|----------|
|`disabled` |bool |<details><summary>Indicates if the time service is disabled for the machine.</summary>Defaults to `false`.</details> | |
|`servers` |[]string |<details><summary>Specifies time (NTP) servers to use for setting the system time.</summary>Defaults to `pool.ntp.org`</details> | |
|`servers` |[]string |<details><summary>Specifies time (NTP) servers to use for setting the system time.</summary>Defaults to `time.cloudflare.com`.</details> | |
|`bootTimeout` |Duration |<details><summary>Specifies the timeout when the node time is considered to be in sync unlocking the boot sequence.</summary>NTP sync will be still running in the background.<br />Defaults to "infinity" (waiting forever for time sync)</details> | |


Expand Down
6 changes: 3 additions & 3 deletions website/content/v1.7/schemas/config.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -3132,9 +3132,9 @@
},
"type": "array",
"title": "servers",
"description": "Specifies time (NTP) servers to use for setting the system time.\nDefaults to pool.ntp.org\n",
"markdownDescription": "Specifies time (NTP) servers to use for setting the system time.\nDefaults to `pool.ntp.org`",
"x-intellij-html-description": "\u003cp\u003eSpecifies time (NTP) servers to use for setting the system time.\nDefaults to \u003ccode\u003epool.ntp.org\u003c/code\u003e\u003c/p\u003e\n"
"description": "Specifies time (NTP) servers to use for setting the system time.\nDefaults to time.cloudflare.com.\n",
"markdownDescription": "Specifies time (NTP) servers to use for setting the system time.\nDefaults to `time.cloudflare.com`.",
"x-intellij-html-description": "\u003cp\u003eSpecifies time (NTP) servers to use for setting the system time.\nDefaults to \u003ccode\u003etime.cloudflare.com\u003c/code\u003e.\u003c/p\u003e\n"
},
"bootTimeout": {
"type": "string",
Expand Down

0 comments on commit e3c2a63

Please sign in to comment.