487f1fde697045f6193772245439c2ff2037d796
This commit establishes stricter rules for validating Kubernetes
version fields in applications' metadata files. The general rule that
such fields should be strings was maintained. Now, in addition to that,
they should follow specific string formats. This targets both "minimum"
and "maximum" fields under the "supported_k8s_version" section.
Allowed formats and examples for "supported_k8s_version:minimum" and
"supported_k8s_version:maximum" fields:
* major.minor.patch (e.g. 1.29.2)
* vmajor.minor.patch (e.g. v1.29.2)
* vmajor.minor (e.g. v1.29 - this is interpreted as 1.29.0)
Examples of unsupported formats:
* major (e.g. 1)
* vmajor (e.g. v1)
* major.minor (e.g. 1.29)
* major.minor. (e.g. 1.29.)
* vmajor.minor. (e.g. v1.29.)
Test Plan
PASS: build-pkgs -a && build-image
PASS: AIO-SX fresh install
PASS: Upload/apply platform-integ-apps.
Confirm that no errors were reported.
Check if default values were correctly saved to the database.
PASS: Edit platform-integ-apps metadata to contain
"supported_k8s_version:minimum: 1.24.4" and
"supported_k8s_version:maximum: 1.29.2".
Upload/apply platform-integ-apps.
Confirm that no errors were reported.
Check if values were correctly saved to the database.
PASS: Edit platform-integ-apps metadata to contain
"supported_k8s_version:minimum: v1.24.4" and
"supported_k8s_version:maximum: v1.29.2".
Upload/apply platform-integ-apps.
Confirm that no errors were reported.
Check if values were correctly saved to the database.
PASS: Edit platform-integ-apps metadata to contain
"supported_k8s_version:minimum: v1.24" and
"supported_k8s_version:maximum: v1.29".
Upload/apply platform-integ-apps.
Confirm that no errors were reported.
Check if values were saved as 1.24.0 and 1.29.0 in the database.
PASS: Edit platform-integ-apps metadata to contain
"supported_k8s_version:minimum: 1.24" and
"supported_k8s_version:maximum: 1.29".
Upload/apply platform-integ-apps.
Confirm that the upload was rejected.
PASS: Edit platform-integ-apps metadata to contain
"supported_k8s_version:minimum: 1.24." and
"supported_k8s_version:maximum: 1.29.".
Upload platform platform-integ-apps.
Confirm that the upload was rejected.
PASS: Edit platform-integ-apps metadata to contain
"supported_k8s_version:minimum: 1.24.4.." and
"supported_k8s_version:maximum: 1.29.2.".
Confirm that the upload was rejected.
PASS: Edit platform-integ-apps metadata to contain
"supported_k8s_version:minimum: v1" and
"supported_k8s_version:maximum: v2".
Confirm that the upload was rejected.
PASS: Edit platform-integ-apps metadata to contain
"supported_k8s_version:minimum: 1" and
"supported_k8s_version:maximum: 2".
Confirm that the upload was rejected.
Story: 2010929
Task: 50179
Change-Id: I1acb6706c11f12d2eeb6ea855e69d332192a805d
Signed-off-by: Igor Soares <Igor.PiresSoares@windriver.com>
config
The starlingx/config repository handles the StarlingX configuration management services.
Its key component is the System Inventory Service (Sysinv), which provides the system command-line interface (CLI)1.
This repository is not intended to be developed standalone, but rather as part of the StarlingX Source System, which is defined by the StarlingX manifest2.
References
Description
Languages
Python
98%
Shell
1.6%
CSS
0.2%