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.
We only want to update on lock and unlock, so we need to
check that the flag is_initial_k8s_config is not
set before creating the resource in platform::kubernetes::configuration.
This ensures that the file is only regenerated on host unlock and
not during the initial installation, which is currently handled
in platform::kubernetes::master::init.
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.
Test Plan:
PASS - Verify successful installation from an ISO on AIO-SX with
the controller unlocked.
PASS - Verify successful installation from an ISO on AIO-DX with
the controllers unlocked.
PASS - Verify successful installation from an ISO on STANDARD with
the controllers unlocked.
PASS - Verify that kube-stx-override.conf is updated on AIO-SX:
- Update the kube-stx-override.conf.erb file.
- Lock/Unlock the AIO-SX host.
- Verify that kube-stx-override.conf has been updated.
PASS - Verify that kube-stx-override.conf is updated on STANDARD:
- Update the kube-stx-override.conf.erb file on compute-0.
- Lock/Unlock compute-0 and verify that kube-stx-override.conf
is updated.
Reviewed: https:/ /review. opendev. org/c/starlingx /stx-puppet/ +/898972 /opendev. org/starlingx/ stx-puppet/ commit/ 88f8f06d393646f f310813ae9542ec 4769c9647d
Committed: https:/
Submitter: "Zuul (22348)"
Branch: master
commit 88f8f06d393646f f310813ae9542ec 4769c9647d
Author: Gleb Aronsky <email address hidden>
Date: Fri Oct 20 08:56:44 2023 -0700
Update kubelet system overrides on unlock
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.
We only want to update on lock and unlock, so we need to k8s_config is not :kubernetes: :configuration. :kubernetes: :master: :init.
check that the flag is_initial_
set before creating the resource in platform:
This ensures that the file is only regenerated on host unlock and
not during the initial installation, which is currently handled
in platform:
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 this reverted commit: /review. opendev. org/c/starlingx /stx-puppet/ +/896154
https:/
Test Plan: override. conf is updated on AIO-SX: override. conf.erb file. override. conf has been updated. override. conf is updated on STANDARD: override. conf.erb file on compute-0. override. conf
PASS - Verify successful installation from an ISO on AIO-SX with
the controller unlocked.
PASS - Verify successful installation from an ISO on AIO-DX with
the controllers unlocked.
PASS - Verify successful installation from an ISO on STANDARD with
the controllers unlocked.
PASS - Verify that kube-stx-
- Update the kube-stx-
- Lock/Unlock the AIO-SX host.
- Verify that kube-stx-
PASS - Verify that kube-stx-
- Update the kube-stx-
- Lock/Unlock compute-0 and verify that kube-stx-
is updated.
Partial-Bug: 2027810 1e9d1e3fdd707bc 3e9e36688b1
Change-Id: Id473fd0e2c807d
Signed-off-by: Gleb Aronsky <email address hidden>