Skip to content
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

Move control plane certs renewal "spread out" into the systemd timer #10596

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions roles/kubernetes/control-plane/defaults/main/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -222,8 +222,7 @@ event_ttl_duration: "1h0m0s"
## Automatically renew K8S control plane certificates on first Monday of each month
auto_renew_certificates: false
# First Monday of each month
auto_renew_certificates_systemd_calendar: "{{ 'Mon *-*-1,2,3,4,5,6,7 03:' ~
groups['kube_control_plane'].index(inventory_hostname) ~ '0:00' }}"
auto_renew_certificates_systemd_calendar: "Mon *-*-1,2,3,4,5,6,7 03:00:00"
# kubeadm renews all the certificates during control plane upgrade.
# If we have requirement like without renewing certs upgrade the cluster,
# we can opt out from the default behavior by setting kubeadm_upgrade_auto_cert_renewal to false
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@ Description=Timer to renew K8S control plane certificates

[Timer]
OnCalendar={{ auto_renew_certificates_systemd_calendar }}
RandomizedDelaySec={{ 10 * (groups['kube_control_plane'] | length) }}min
FixedRandomDelay=yes
Persistent=yes

[Install]
WantedBy=multi-user.target