mirror of https://github.com/kubernetes/kops.git
Merge pull request #12587 from justinsb/chrony_on_ubuntu_gce
GCE: use chrony on Ubuntu + GCE
This commit is contained in:
commit
03044b79a6
|
@ -668,3 +668,8 @@ func (c *NodeupModelContext) InstallNvidiaRuntime() bool {
|
|||
fi.BoolValue(c.NodeupConfig.NvidiaGPU.Enabled) &&
|
||||
c.GPUVendor == architectures.GPUVendorNvidia
|
||||
}
|
||||
|
||||
// RunningOnGCE returns true if we are running on GCE
|
||||
func (c *NodeupModelContext) RunningOnGCE() bool {
|
||||
return kops.CloudProviderID(c.Cluster.Spec.CloudProvider) == kops.CloudProviderGCE
|
||||
}
|
||||
|
|
|
@ -59,7 +59,8 @@ func (b *NTPBuilder) Build(c *fi.ModelBuilderContext) error {
|
|||
}
|
||||
|
||||
if b.Distribution.IsDebianFamily() {
|
||||
if b.Distribution.IsUbuntu() {
|
||||
// Ubuntu recommends systemd-timesyncd, but on ubuntu on GCE systemd-timesyncd is blocked (in favor of chrony)
|
||||
if b.Distribution.IsUbuntu() && !b.RunningOnGCE() {
|
||||
if ntpHost != "" {
|
||||
c.AddTask(b.buildTimesyncdConf("/etc/systemd/timesyncd.conf", ntpHost))
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue