feat: set default NTP server to time.cloudflare.com

Fixes #8396

Pros:

* IPv6
* good CDN, small RTT

Cons:

* not community-run

Signed-off-by: Andrey Smirnov <andrey.smirnov@siderolabs.com>
This commit is contained in:
Andrey Smirnov 2024-03-11 16:28:34 +04:00
parent 32e0877607
commit e3c2a63981
No known key found for this signature in database
GPG Key ID: FE042E3D4085A811
7 changed files with 17 additions and 13 deletions

View File

@ -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]

View File

@ -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",

View File

@ -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.

View File

@ -1195,7 +1195,7 @@ func (TimeConfig) Doc() *encoder.Doc {
Name: "servers",
Type: "[]string",
Note: "",
Description: "Specifies time (NTP) servers to use for setting the system time.\nDefaults to `pool.ntp.org`",
Description: "Specifies time (NTP) servers to use for setting the system time.\nDefaults to `time.cloudflare.com`.",
Comments: [3]string{"" /* encoder.HeadComment */, "Specifies time (NTP) servers to use for setting the system time." /* encoder.LineComment */, "" /* encoder.FootComment */},
},
{

View File

@ -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"

View File

@ -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> | |

View File

@ -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",