Correction to metrics-server failing to apply

When adding the lifecycle_metrics_server.py file to the plugin and not
calling the super class that inherits lifecycle's default behavior,
this creates a side effect and means that the namespace is not created
before the command "kubectl apply -k <fluxcd-directory>".

To solve the problem, the super class is added to the
app_lifecycle_actions function and the application is able to
apply correctly again.

Test Plan:
PASS: build-pkgs -c -p metrics-server-helm
PASS: build-pkgs -c -p python3-k8sapp-metrics-server
PASS: build-pkgs -c -p stx-metrics-server-helm
PASS: upload/apply/remove/delete metrics-server

Closes-Bug: 2047175

Change-Id: I52580894f5d5283a989fb03a573089916dfe7b8c
Signed-off-by: David Bastos <david.barbosabastos@windriver.com>
This commit is contained in:
dbarbosa 2024-01-04 20:53:31 -03:00 committed by David Barbosa Bastos
parent e6e0266610
commit d354bd40e0

View File

@ -25,3 +25,7 @@ class MetricsServerAppLifecycleOperator(base.AppLifecycleOperator):
:param app: AppOperator.Application object :param app: AppOperator.Application object
:param hook_info: LifecycleHookInfo object :param hook_info: LifecycleHookInfo object
""" """
# Use the default behaviour for other hooks
super(MetricsServerAppLifecycleOperator, self).app_lifecycle_actions(
context, conductor_obj, app_op, app, hook_info)