Revert "Add chrony config"

This reverts commit bf7c04d13f.

Reason for revert: We just realized that passing NTP and chrony.conf both is not needed so reverting this changes.

Change-Id: Ifa3ee40316871addb05cd8196baf9e4daa5eb8a6
This commit is contained in:
Jagan Mohan Kavva 2021-06-22 15:11:20 +00:00
parent bf7c04d13f
commit d808e37c64
6 changed files with 6 additions and 227 deletions

View File

@ -49,44 +49,3 @@ replacements:
name: ephemeral-bmc-secret
kind: Secret
fieldrefs: ["stringData.userData%REPLACEMENT_POD_CIDR%"]
# Replace the k8s controlplane NTP servers
- source:
objref:
kind: NetworkCatalogue
name: networking
fieldref: spec.ntp.servers[0]
target:
objref:
name: ephemeral-bmc-secret
kind: Secret
fieldrefs: ["stringData.userData%REPLACEMENT_NTP_SERVER1%"]
- source:
objref:
kind: NetworkCatalogue
name: networking
fieldref: spec.ntp.servers[1]
target:
objref:
name: ephemeral-bmc-secret
kind: Secret
fieldrefs: ["stringData.userData%REPLACEMENT_NTP_SERVER2%"]
- source:
objref:
kind: NetworkCatalogue
name: networking
fieldref: spec.ntp.servers[2]
target:
objref:
name: ephemeral-bmc-secret
kind: Secret
fieldrefs: ["stringData.userData%REPLACEMENT_NTP_SERVER3%"]
- source:
objref:
kind: NetworkCatalogue
name: networking
fieldref: spec.ntp.servers[3]
target:
objref:
name: ephemeral-bmc-secret
kind: Secret
fieldrefs: ["stringData.userData%REPLACEMENT_NTP_SERVER4%"]

View File

@ -34,43 +34,6 @@ stringData:
- kubeadm init --config /tmp/kubeadm.yaml
- mkdir -p /opt/metal3-dev-env/ironic/html/images
write_files:
- path: "/etc/chrony/chrony.conf"
permissions: '0644'
owner: root:root
content: |
# This directive specify the location of the file containing ID/key pairs for
# NTP authentication.
keyfile /etc/chrony/chrony.keys
# This directive specify the file into which chronyd will store the rate
# information.
driftfile /var/lib/chrony/chrony.drift
# Uncomment the following line to turn logging on.
#log tracking measurements statistics
# Log files location.
logdir /var/log/chrony
# Stop bad estimates upsetting machine clock.
maxupdateskew 100.0
# This directive enables kernel synchronisation (every 11 minutes) of the
# real-time clock. Note that it can’t be used along with the 'rtcfile' directive.
rtcsync
# Step the system clock instead of slewing it if the adjustment is larger than
# one second, but only in the first three clock updates.
makestep 1 3
server REPLACEMENT_NTP_SERVER1 iburst
server REPLACEMENT_NTP_SERVER2 iburst
server REPLACEMENT_NTP_SERVER3 iburst
server REPLACEMENT_NTP_SERVER4 iburst
#Enable Chrony to operate as an NTP server for local applications e.g. Prometheus.
allow 127.0.0.0/8
- path: /etc/systemd/system/docker.service.d/http-proxy.conf
permissions: '0644'
owner: root:root

View File

@ -24,40 +24,6 @@ spec:
# any adjustments and settings for docker anymore. However, if for
# some reason docker has to be presented in the system, we need to
# create http-proxy.conf.
- path: "/etc/chrony/chrony.conf"
content: |
# This directive specify the location of the file containing ID/key pairs for
# NTP authentication.
keyfile /etc/chrony/chrony.keys
# This directive specify the file into which chronyd will store the rate
# information.
driftfile /var/lib/chrony/chrony.drift
# Uncomment the following line to turn logging on.
#log tracking measurements statistics
# Log files location.
logdir /var/log/chrony
# Stop bad estimates upsetting machine clock.
maxupdateskew 100.0
# This directive enables kernel synchronisation (every 11 minutes) of the
# real-time clock. Note that it can’t be used along with the 'rtcfile' directive.
rtcsync
# Step the system clock instead of slewing it if the adjustment is larger than
# one second, but only in the first three clock updates.
makestep 1 3
server REPLACEMENT_NTP_SERVER1 iburst
server REPLACEMENT_NTP_SERVER2 iburst
server REPLACEMENT_NTP_SERVER3 iburst
server REPLACEMENT_NTP_SERVER4 iburst
#Enable Chrony to operate as an NTP server for local applications e.g. Prometheus.
allow 127.0.0.0/8
# TODO: add download sources to the versions catalogue
preKubeadmCommands:
# Restart docker to apply any proxy settings
@ -66,8 +32,6 @@ spec:
- containerd config default | sed -r -e '/\[plugins."io.containerd.grpc.v1.cri".containerd.runtimes.runc\]$/a\ SystemdCgroup = true' | tee /etc/containerd/config.toml
- systemctl daemon-reload
- systemctl restart containerd
- systemctl restart chrony.service
- systemctl is-active --quiet chrony.service && echo "Chrony service was restarted!"
initConfiguration:
nodeRegistration:
name: '{{ ds.meta_data.local_hostname }}'
@ -85,7 +49,12 @@ spec:
cgroup-driver: "systemd"
container-runtime: remote
criSocket: "unix:///run/containerd/containerd.sock"
ntp:
servers:
- 0.pool.ntp.org
- 1.pool.ntp.org
- 2.pool.ntp.org
- 3.pool.ntp.org
users:
- name: deployer
sshAuthorizedKeys:

View File

@ -54,39 +54,3 @@ replacements:
objref:
kind: KubeadmControlPlane
fieldrefs: ["spec.kubeadmConfigSpec.ntp"]
- source:
objref:
kind: NetworkCatalogue
name: networking
fieldref: spec.ntp.servers[0]
target:
objref:
kind: KubeadmControlPlane
fieldrefs: ["spec.kubeadmConfigSpec.files[*].content%REPLACEMENT_NTP_SERVER1%"]
- source:
objref:
kind: NetworkCatalogue
name: networking
fieldref: spec.ntp.servers[1]
target:
objref:
kind: KubeadmControlPlane
fieldrefs: ["spec.kubeadmConfigSpec.files[*].content%REPLACEMENT_NTP_SERVER2%"]
- source:
objref:
kind: NetworkCatalogue
name: networking
fieldref: spec.ntp.servers[2]
target:
objref:
kind: KubeadmControlPlane
fieldrefs: ["spec.kubeadmConfigSpec.files[*].content%REPLACEMENT_NTP_SERVER3%"]
- source:
objref:
kind: NetworkCatalogue
name: networking
fieldref: spec.ntp.servers[3]
target:
objref:
kind: KubeadmControlPlane
fieldrefs: ["spec.kubeadmConfigSpec.files[*].content%REPLACEMENT_NTP_SERVER4%"]

View File

@ -26,40 +26,6 @@ spec:
# any adjustments and settings for docker anymore. However, if for
# some reason docker has to be presented in the system, we need to
# create http-proxy.conf.
- path: "/etc/chrony/chrony.conf"
content: |
# This directive specify the location of the file containing ID/key pairs for
# NTP authentication.
keyfile /etc/chrony/chrony.keys
# This directive specify the file into which chronyd will store the rate
# information.
driftfile /var/lib/chrony/chrony.drift
# Uncomment the following line to turn logging on.
#log tracking measurements statistics
# Log files location.
logdir /var/log/chrony
# Stop bad estimates upsetting machine clock.
maxupdateskew 100.0
# This directive enables kernel synchronisation (every 11 minutes) of the
# real-time clock. Note that it can’t be used along with the 'rtcfile' directive.
rtcsync
# Step the system clock instead of slewing it if the adjustment is larger than
# one second, but only in the first three clock updates.
makestep 1 3
server REPLACEMENT_NTP_SERVER1 iburst
server REPLACEMENT_NTP_SERVER2 iburst
server REPLACEMENT_NTP_SERVER3 iburst
server REPLACEMENT_NTP_SERVER4 iburst
#Enable Chrony to operate as an NTP server for local applications e.g. Prometheus.
allow 127.0.0.0/8
preKubeadmCommands:
# Restart docker and containerd to apply any proxy settings
- export HOME=/root
@ -67,8 +33,6 @@ spec:
- containerd config default | sed -r -e '/\[plugins."io.containerd.grpc.v1.cri".containerd.runtimes.runc\]$/a\ SystemdCgroup = true' | tee /etc/containerd/config.toml
- systemctl daemon-reload
- systemctl restart containerd
- systemctl restart chrony.service
- systemctl is-active --quiet chrony.service && echo "Chrony service was restarted!"
users:
- name: deployer
sshAuthorizedKeys:

View File

@ -17,43 +17,3 @@ replacements:
kind: KubeadmConfigTemplate
name: worker-1
fieldrefs: ["spec.template.spec.ntp"]
- source:
objref:
kind: NetworkCatalogue
name: networking
fieldref: spec.ntp.servers[0]
target:
objref:
kind: KubeadmConfigTemplate
name: worker-1
fieldrefs: ["spec.template.spec.files[*].content%REPLACEMENT_NTP_SERVER1%"]
- source:
objref:
kind: NetworkCatalogue
name: networking
fieldref: spec.ntp.servers[1]
target:
objref:
kind: KubeadmConfigTemplate
name: worker-1
fieldrefs: ["spec.template.spec.files[*].content%REPLACEMENT_NTP_SERVER2%"]
- source:
objref:
kind: NetworkCatalogue
name: networking
fieldref: spec.ntp.servers[2]
target:
objref:
kind: KubeadmConfigTemplate
name: worker-1
fieldrefs: ["spec.template.spec.files[*].content%REPLACEMENT_NTP_SERVER3%"]
- source:
objref:
kind: NetworkCatalogue
name: networking
fieldref: spec.ntp.servers[3]
target:
objref:
kind: KubeadmConfigTemplate
name: worker-1
fieldrefs: ["spec.template.spec.files[*].content%REPLACEMENT_NTP_SERVER4%"]