Rename app plugin to conform with app framework requirements
Recent changes in the system application framework have resulted in ptp-notification failing to apply. This is because the plugin defined in python3-k8sapp-ptp-notification does not exactly match the app name. This change re-names the ptp-plugin from "ptp_notification" to "ptp-notification" and allows the application to apply correctly. It also adds required constances and a get_overrides() function to the ptp-notification plugin so that helm overrides can work properly. This logic has been implmented in the same way as other stx platform apps. The app framework change that revealed this issue is: https://review.opendev.org/c/starlingx/config/+/915377 Test-plan: Pass: Verify ptp-notification build Pass: Build and install iso Pass: Verify ptp-notification app apply/remove/override Story: 2011090 Task: 50183 Signed-off-by: Cole Walker <cole.walker@windriver.com> Change-Id: Ia366eeb4c54aaccea65a9e568afaf8992bd825d5
This commit is contained in:
parent
9b8a023e25
commit
750a2f41c2
@ -1,5 +1,5 @@
|
|||||||
#
|
#
|
||||||
# Copyright (c) 2021 Wind River Systems, Inc.
|
# Copyright (c) 2021-2024 Wind River Systems, Inc.
|
||||||
#
|
#
|
||||||
# SPDX-License-Identifier: Apache-2.0
|
# SPDX-License-Identifier: Apache-2.0
|
||||||
#
|
#
|
||||||
@ -7,3 +7,4 @@
|
|||||||
# Helm: Supported charts:
|
# Helm: Supported charts:
|
||||||
# These values match the names in the chart package's Chart.yaml
|
# These values match the names in the chart package's Chart.yaml
|
||||||
HELM_CHART_PTP_NOTIFICATION = 'ptp-notification'
|
HELM_CHART_PTP_NOTIFICATION = 'ptp-notification'
|
||||||
|
HELM_CHART_NS_NOTIFICATION = 'notification'
|
||||||
|
@ -1,16 +1,21 @@
|
|||||||
#
|
#
|
||||||
# Copyright (c) 2021 Wind River Systems, Inc.
|
# Copyright (c) 2021-2024 Wind River Systems, Inc.
|
||||||
#
|
#
|
||||||
# SPDX-License-Identifier: Apache-2.0
|
# SPDX-License-Identifier: Apache-2.0
|
||||||
#
|
#
|
||||||
|
|
||||||
from k8sapp_ptp_notification.common import constants as app_constants
|
from k8sapp_ptp_notification.common import constants as app_constants
|
||||||
|
|
||||||
|
from oslo_log import log as logging
|
||||||
|
|
||||||
from sysinv.common import constants
|
from sysinv.common import constants
|
||||||
|
from sysinv.common import exception
|
||||||
|
|
||||||
from sysinv.helm import base
|
from sysinv.helm import base
|
||||||
from sysinv.helm import common
|
from sysinv.helm import common
|
||||||
|
|
||||||
|
LOG = logging.getLogger(__name__)
|
||||||
|
|
||||||
|
|
||||||
class PTPNotificationHelm(base.BaseHelm):
|
class PTPNotificationHelm(base.BaseHelm):
|
||||||
"""Class to encapsulate helm operations for the ptp notification chart"""
|
"""Class to encapsulate helm operations for the ptp notification chart"""
|
||||||
@ -28,3 +33,16 @@ class PTPNotificationHelm(base.BaseHelm):
|
|||||||
|
|
||||||
def get_namespaces(self):
|
def get_namespaces(self):
|
||||||
return self.SUPPORTED_NAMESPACES
|
return self.SUPPORTED_NAMESPACES
|
||||||
|
|
||||||
|
def get_overrides(self, namespace=None):
|
||||||
|
overrides = {
|
||||||
|
app_constants.HELM_CHART_NS_NOTIFICATION: {}
|
||||||
|
}
|
||||||
|
|
||||||
|
if namespace in self.SUPPORTED_NAMESPACES:
|
||||||
|
return overrides[namespace]
|
||||||
|
elif namespace:
|
||||||
|
raise exception.InvalidHelmNamespace(chart=self.CHART,
|
||||||
|
namespace=namespace)
|
||||||
|
else:
|
||||||
|
return overrides
|
||||||
|
@ -30,10 +30,10 @@ setup-hooks =
|
|||||||
|
|
||||||
[entry_points]
|
[entry_points]
|
||||||
systemconfig.helm_applications =
|
systemconfig.helm_applications =
|
||||||
ptp_notification = systemconfig.helm_plugins.ptp_notification
|
ptp-notification = systemconfig.helm_plugins.ptp_notification
|
||||||
|
|
||||||
systemconfig.helm_plugins.ptp_notification =
|
systemconfig.helm_plugins.ptp_notification =
|
||||||
001_ptp_notification = k8sapp_ptp_notification.helm.ptp_notification:PTPNotificationHelm
|
001_ptp-notification = k8sapp_ptp_notification.helm.ptp_notification:PTPNotificationHelm
|
||||||
|
|
||||||
[bdist_wheel]
|
[bdist_wheel]
|
||||||
universal = 1
|
universal = 1
|
||||||
|
Loading…
Reference in New Issue
Block a user