StarlingX OpenStack Armada App
Go to file
Luan Nunes Utimura 4c238a8063 clients: Make working dir. dyn. and improve chart
In the current state of the `clients` helm chart, the OpenStack clients'
working directory path is *static* and located at `/var/opt/openstack`.

While this directory is suitable for uploading small files -- such as
small Glance images -- it can quickly run out of space, as its maximum
capacity is, approximately, 20GB. This might not be enough for a single
user, and even worse, it wouldn't be for multiple users.

Therefore, the OpenStack clients' working directory needs to be
*dynamic*, which is the primary goal of this change.

With this change, the system administrator can change the default
clients' working directory by simply performing a helm override and
reapplying the app, such as:

  $ system helm-override-update stx-openstack clients openstack \
    --reuse-values --set workingDirectoryPath=/var/opt/another-directory

  $ system application-apply stx-openstack

During the re-apply, if the default working directory didn't contain
additional files in user subdirectories, it's removed to avoid leftovers
(in the same way as after removing the application).

For custom working directories, however, the handling is different.

They are *never* removed by the application, even during re-applies or
after application removal. The reason we don't remove it is because this
custom directory might be shared with other users and/or applications,
and, therefore, potentially have important files that must be preserved.

This change also improves the overall quality of the helm chart, by:
  * Fixing minor bugs;
  * Improving in-code documentation;
  * Raising exceptions on critical failures;
  * Removing functions and modules that are no longer needed;
  * Replacing None-returning functions with Boolean-returning functions,
    to better indicate success or failure status.

Test Plan:

PASS - Build python3-k8sapp-openstack package
PASS - Build stx-openstack-helm-fluxcd package
PASS - Build stx-openstack helm charts

Without exceptions:
-------------------
  PASS - Upload/apply stx-openstack
  PASS - Verify that the working directory was created at
         /var/opt/openstack
  PASS - Perform a helm override:
         $ system helm-override-update stx-openstack clients openstack \
           --reuse-values --set \
           workingDirectoryPath=/var/opt/another-directory
  PASS - Verify that the working directory was created at
        /var/opt/another-directory

With exceptions:
----------------
  PASS - Upload *faulty* stx-openstack
         This faulty version of the application raises, on purpose,
         a KubeAppApplyFailure exception during the creation of
         application specific resources
  PASS - Try to apply stx-openstack and verify that it immediately
         fails and goes to "apply-failed" state

PASS - Remove/delete stx-openstack

Story: 2010774
Task: 48410

Change-Id: Ieb06a93c669d362ecd30bff79947ee4c015cf2b4
Signed-off-by: Luan Nunes Utimura <LuanNunes.Utimura@windriver.com>
2023-08-04 23:32:55 -03:00
enhanced-policies Update on enhanced-policies README 2021-12-02 16:53:10 +00:00
openstack-helm Upversion base openstack-helm (0a02cb8f) 2023-07-25 11:49:37 -03:00
openstack-helm-infra Upversion base openstack-helm-infra (6b6ca9e2) 2023-07-24 14:30:11 -03:00
python3-k8sapp-openstack clients: Make working dir. dyn. and improve chart 2023-08-04 23:32:55 -03:00
stx-openstack-helm-fluxcd clients: Make working dir. dyn. and improve chart 2023-08-04 23:32:55 -03:00
upstream/openstack Add UPGRADE_PIP_PACKAGES parameter to Images 2023-07-24 10:02:55 -03:00
.gitignore Network Resources Cleanup before OpenStack Removal 2022-06-22 11:08:10 -03:00
.gitreview Add a .gitreview file to the new repo 2019-09-09 08:42:46 -05:00
.zuul.yaml Fix github mirroring for this repo 2023-04-28 12:38:52 -04:00
bindep.txt Add python3.9 support 2021-09-09 11:27:54 -04:00
debian_build_layer.cfg Add debian_build_layer.cfg file 2021-10-05 14:10:38 -04:00
debian_helm.inc Update .inc files to use FluxCD related pkgs 2022-10-25 16:37:54 -03:00
debian_iso_image.inc Remove armada related code from the repo 2023-04-26 12:38:43 -03:00
debian_pkg_dirs Creating folder structure for STX-O upversion 2023-06-15 12:35:11 -03:00
debian_stable_docker_images.inc Creating folder structure for STX-O upversion 2023-06-15 12:35:11 -03:00
requirements.txt Attempting to add zuul jobs to new repo 2019-09-09 12:25:17 -05:00
test-requirements.txt Attempting to add zuul jobs to new repo 2019-09-09 12:25:17 -05:00
tox.ini Update tox.ini to work with tox 4 2022-12-23 15:53:55 +00:00