Skip to content

Commit

Permalink
Update kubelet system overrides on unlock
Browse files Browse the repository at this point in the history
Add logic to the platform::kubernetes::configuration method
to generate the kubelet's systemd override file. This
change ensures the file is generated every time a host is
unlocked. This facilitates delivery of systemd service changes
via patches to existing installs.

This change is needed by bug 2027810 to ensure that the
orphan volume cleanup script is executed as part of the systemd
ExecStartPre kubelet service override.

This bug is an update for the this reverted commit:
https://review.opendev.org/c/starlingx/stx-puppet/+/895364

Test Plan:

Pass:  - Update the kube-stx-override.conf.erb file
       - Lock the AIO-SX host
       - Unlock the AIO-SX host
       - Verify that kube-stx-override.conf has been updated
       - Verify AIO-SX fresh install
       - Verify Standard Duplex lock/unlock and
         verify that kube-stx-override.conf has been updated
       - Verify Standard Duplex Install

Partial-Bug: 2027810
Change-Id: I4e47bce634c21396acb2e5f1540cac0be3ed34ec
Signed-off-by: Gleb Aronsky <[email protected]>
  • Loading branch information
Gleb Aronsky committed Oct 10, 2023
1 parent ffd09b2 commit f426f5c
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions puppet-manifests/src/modules/platform/manifests/kubernetes.pp
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,15 @@
mode => '0644',
}

# Add kubelet service override
file { '/etc/systemd/system/kubelet.service.d/kube-stx-override.conf':
ensure => file,
content => template('platform/kube-stx-override.conf.erb'),
owner => 'root',
group => 'root',
mode => '0644',
}

if ($::personality == 'controller') {
# Cron job to cleanup stale CNI cache files that are more than
# 1 day old and are not associated with any currently running pod.
Expand Down

0 comments on commit f426f5c

Please sign in to comment.