This change fixes an error log occurring in sysinv due to an
architectural incompatibility between sysinv and the kubevirt app.
Basically, kubevirt is installed using only one helmrelease
configured in the kube-system namespace, which in turn provides a
helm chart and has resources installed in two other namespaces:
kubevirt and cdi. So far, everything is as expected.
The issue occurs when a configuration is made that allows two rows
to be added to the helm_override table in the sysinv database:
| id | name | namespace | system_overrides
| 24 | kubevirt-app | kubevirt | {"enabled": true}
| 25 | kubevirt-app | cdi | {"enabled": true}
Sysinv cannot find any charts in the kubevirt and cdi namespaces and
logs an error. The commands "helm list -n cdi" and "helm list -n
kubevirt" return nothing. The chart is only present in the kube-system
namespace, the same namespace specified in the helmrelease.
This change adjusts this database to add an extra namespace to account
for kube-system:
| id | name | namespace | system_overrides
| 24 | kubevirt-app | kube-system | {"enabled": true}
| 25 | kubevirt-app | kubevirt | {"enabled": true}
| 26 | kubevirt-app | cdi | {"enabled": true}
By adding the namespace "kube-system" conductor is able to see
kubervirt has charts enabled and stops throwing the "too few charts"
error during apply.
Test Plan:
PASS: build-pkgs && build-image
PASS: upload, apply, remove and delete kubevirt app
PASS: update kubevirt from a old version
PASS: run the command "system helm-override-update kubevirt-app
kubevirt-app kubevirt --set replicas=3". After
reapplying kubevirt, the resource changes under the kubevirt
namespace are successfully changed.
PASS: run the command "system helm-override-update kubevirt-app
kubevirt-app cdi --set replicas=3". After
reapplying kubevirt, the resource changes under the cdi
namespace are successfully changed.
Closes-bug: 2127213
Change-Id: I68c4061f1bd70ab4c3230a1c66850c560faeb40d
Co-Authored-By: David Bastos <david.barbosabastos@windriver.com>
Signed-off-by: Eduardo dos Santos França <Eduardo.dosSantosFranca@windriver.com>