config/sysinv/sysinv/sysinv/sysinv/common
Igor Soares ea00765271 Introduce support for multiple application bundles
Parse the metadata of all application bundles under the helm application
folder and save to the kube_app_bundle table. This is done during sysinv
startup and when a new ostree commit is deployed.

The auto update logic was changed to enable retrieving metadata from
the database for all available bundles of a given app and compute which
bundle should be used to carry out the upgrade.

The bundle choice is done based on the minimum and maximum Kubernetes
versions supported by the application. If multiple bundles fit that
criteria then the application with the highest version number is chosen.

The 65-k8s-app-upgrade.sh script also takes into account multiple
bundles during the platform upgrade activation step, prioritizing
lowest versions available to ensure compatibility with the Kubernetes
version carried over from the N release. A follow-up change will improve
this mechanism to discover specific app versions.

When platform patches are applied and the ostree is changed then the
content of the helm application folder is reevaluated and the database
updated accordingly if there are new or removed bundles.

Test plan:
PASS: build-pkgs -a & build-image
PASS: Fresh AIO-SX install.
PASS: Fresh AIO-DX install.
PASS: Manually place multiple tarballs of one application with
      different versions under /usr/local/share/applications/helm/
      and check if the app is updated correctly.
PASS: Build a reboot required patch that removes the istio
      bundle and adds a new metrics-server version.
      Apply the reboot required patch.
      Check if istio was removed from the kube_app_bundle table.
      Check if the metrics-server previous version was removed from the
      kube_app_bundle table.
      Check if the metrics-server new version was added to the
      kube_app_bundle table.
      Check if metrics-server was updated to the new version added
      to the database.
PASS: Build a no reboot required patch that does not restart
      sysinv, removes the istio bundle and adds a new metrics-server
      version.
      Apply the no reboot required patch.
      Check if istio was removed from the kube_app_bundle table.
      Check if the metrics-server previous version was removed from the
      kube_app_bundle table.
      Check if the metrics-server new version was added to the
      kube_app_bundle table.
      Check if metrics-server was updated to the new version added
      to the database.
PASS: Build a no reboot required patch that restarts sysinv,
      removes the istio bundle and adds a new metrics-server version.
      Apply the no reboot required patch.
      Check if istio was removed from the kube_app_bundle table.
      Check if the metrics-server previous version was removed from the
      kube_app_bundle table.
      Check if the metrics-server new version was added to the
      kube_app_bundle table and was updated.
      Check if metrics-server was updated to the new version added
      to the database.
PASS: Install power-metrics on stx-8.
      Run platform upgrade from stx-8 placing two different versions of
      metrics-server under /usr/local/share/applications/helm/.
      Check if default apps and metrics-server were properly updated
      during upgrade-activate step.
      Check if power-metrics was auto updated after upgrade-complete
      step.

Story: 2010929
Task: 49097

Change-Id: I46f7cb6ebc59ad49157e9044a4937a406313671e
Signed-off-by: Igor Soares <Igor.PiresSoares@windriver.com>
2024-01-15 17:49:29 -03:00
..
__init__.py StarlingX open source release updates 2018-05-31 07:35:52 -07:00
app_metadata.py Introduce support for multiple application bundles 2024-01-15 17:49:29 -03:00
ceph.py Additional mechanism for unsafe force 2023-10-27 17:12:04 -03:00
config.py Deprecate sysinv.openstack.common.db in favor of oslo_db 2020-02-07 11:55:49 -06:00
configp.py StarlingX open source release updates 2018-05-31 07:35:52 -07:00
constants.py Introduce support for multiple application bundles 2024-01-15 17:49:29 -03:00
context.py Replace openstack/context library by oslo_context 2023-02-24 16:17:30 -03:00
dc_api.py Update license file with a detailed open source license 2022-06-02 12:08:16 -04:00
device.py Added the support of ACC200 device 2022-11-17 15:32:52 +00:00
disk_utils.py Replace parted and sgdisk with sfdisk in sysinv 2022-12-05 21:37:41 +00:00
etcd.py Backup control-plane during k8s network upgrade 2023-05-05 23:00:44 +00:00
exception.py Create kube_app_bundle table 2024-01-08 16:53:40 -03:00
extension_manager.py Deprecate sysinv.openstack.common.log 2019-11-05 15:29:20 -06:00
fernet.py Unsupported 'message' Exception attribute in PY3 2021-06-23 12:47:23 -04:00
fm.py Only use required fault management endpoint 2022-12-09 18:52:56 +00:00
fpga_constants.py Merge sysinv_fpga_agent with sysinv_agent 2022-10-03 14:12:28 -04:00
health.py Add pod health status to kube rootca check 2023-11-17 17:19:42 -03:00
image_service.py Deprecate the sysinv.openstack.common utils files 2019-12-04 10:58:39 -06:00
images.py Deprecate the sysinv.openstack.common utils files 2019-12-04 10:58:39 -06:00
inotify.py Introduce support for multiple application bundles 2024-01-15 17:49:29 -03:00
interface.py Fix mention of python-k8sapp-openstack in sysinv 2023-03-08 09:45:24 -03:00
kubernetes.py remove support for versions of K8s lower than 1.24 2023-12-15 03:20:27 +00:00
paths.py StarlingX open source release updates 2018-05-31 07:35:52 -07:00
platform_firewall.py Correct typo for PTP's UDP ports in the OAM firewall 2023-10-12 10:01:24 -03:00
policy.py Deprecate old policy engine and restrict access 2022-08-10 11:18:38 -03:00
rest_api.py Fix SSL certificate error for rehomed subcloud 2022-12-06 10:44:01 -05:00
retrying.py Re-enable important py3k checks for sysinv 2021-11-10 11:08:12 -03:00
service.py Replace openstack/context library by oslo_context 2023-02-24 16:17:30 -03:00
service_parameter.py Update dns hostname validation for host-records 2024-01-05 00:03:46 -05:00
states.py Fix word and statement errors in comments 2018-11-14 10:04:51 +08:00
storage_backend_conf.py Preserve ceph monitor order for overrides 2022-11-01 16:17:09 +02:00
utils.py Introduce support for multiple application bundles 2024-01-15 17:49:29 -03:00
wsgi_service.py Use FQDN for MGMT network 2023-10-31 20:45:40 -04:00