-
Notifications
You must be signed in to change notification settings - Fork 54
Update configuring date and timezone.md #489
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
aab315f
3442871
5b46111
c2c3aae
8b12516
985a21f
e7c43c2
4c82425
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -71,7 +71,49 @@ NTP synchronized: yes | |
| Sun 2015-11-01 01:00:00 EST | ||
| ``` | ||
|
|
||
| ## Time synchronization | ||
| ### Setting the time zone via Ignition | ||
|
|
||
| If you are aware of the downsides to setting a system time zone that is different from the default UTC time zone, you can set a different system time zone by setting the local time zone configuration file,[`/etc/localtime`][localtime], to be an absolute or relative symlink to a `tzfile` entry under `/usr/share/zoneinfo/`. | ||
| It is recommended that you set the same time zone across all your machines in the cluster. | ||
|
|
||
| For example, you can set the time zone to `America/New_York` by using a Butane config like the following: | ||
|
|
||
| ```shell | ||
| variant: flatcar | ||
| version: 1.1.0 | ||
| storage: | ||
| links: | ||
| - path: /etc/localtime | ||
| target: ../usr/share/zoneinfo/America/New_York | ||
| ``` | ||
| `"overwrite": true` | ||
| <details> | ||
|
|
||
| <summary>Remark to other references </summary> | ||
|
|
||
| If you come accross https://github.com/flatcar/Flatcar/issues/491#issuecomment-908316042 and wondering whether you have to use the fields `"overwrite": true` and `"filesystem": "root"` unlike in Fedora Core OS? | ||
| Here is the ansser: https://github.com/flatcar/Flatcar/issues/1836#issuecomment-3175310460 | ||
|
|
||
| </details> | ||
|
Comment on lines
+90
to
+97
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This whole thing can be dropped. FCOS is not using Ignition 2 since years now, so no need to mention the
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. That's how the journey began. If you start googling (or asking AI), you get a mix of old and up-to-date answers. I want to clarify things here. It always helps to give some histroical context for users not follwing a project cloelsys to keep track of such hchanges |
||
|
|
||
|
|
||
|
|
||
| ## Time synchronization to HOST | ||
|
|
||
| To keep in sync with the host's timezone, you can mount the timezone configuration file to Flatcar Container Linux. | ||
| You add the following to your mount configuration section | ||
|
|
||
| ```yaml | ||
| volumeMounts: | ||
| - name: localtime | ||
| mountPath: /etc/localtime | ||
| volumes: | ||
| - name: localtime | ||
| hostPath: | ||
| path: /etc/localtime | ||
| ``` | ||
|
|
||
| ## Time synchronization to NTP | ||
|
|
||
| Flatcar Container Linux clusters use NTP to synchronize the clocks of member nodes, and all machines start an NTP client at boot. The operating system uses [`systemd-timesyncd(8)`][systemd-timesyncd] as the default NTP client. Use `systemctl` to check which service is running: | ||
|
|
||
|
|
@@ -208,9 +250,11 @@ storage: | |
| restrict [::1] | ||
| ``` | ||
|
|
||
| [localtime]: https://www.freedesktop.org/software/systemd/man/localtime.html | ||
| [timedatectl]: http://www.freedesktop.org/software/systemd/man/timedatectl.html | ||
| [ntp.org]: http://ntp.org/ | ||
| [systemd-timesyncd]: http://www.freedesktop.org/software/systemd/man/systemd-timesyncd.service.html | ||
| [systemd.network]: http://www.freedesktop.org/software/systemd/man/systemd.network.html | ||
| [timesyncd.conf]: http://www.freedesktop.org/software/systemd/man/timesyncd.conf.html | ||
| [butane-configs]: ../../provisioning/config-transpiler | ||
| [issuecomment-908316042]: https://github.com/flatcar/Flatcar/issues/491#issuecomment-908316042 | ||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What' s the intention here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I assume this is necessary if a default time zone has already been set.
I'm not sure exactly, as I use existing examples as templates.