diff --git a/python3-k8sapp-ptp-notification/k8sapp_ptp_notification/k8sapp_ptp_notification/common/constants.py b/python3-k8sapp-ptp-notification/k8sapp_ptp_notification/k8sapp_ptp_notification/common/constants.py index 4f41771..c83524a 100644 --- a/python3-k8sapp-ptp-notification/k8sapp_ptp_notification/k8sapp_ptp_notification/common/constants.py +++ b/python3-k8sapp-ptp-notification/k8sapp_ptp_notification/k8sapp_ptp_notification/common/constants.py @@ -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 # @@ -7,3 +7,4 @@ # Helm: Supported charts: # These values match the names in the chart package's Chart.yaml HELM_CHART_PTP_NOTIFICATION = 'ptp-notification' +HELM_CHART_NS_NOTIFICATION = 'notification' diff --git a/python3-k8sapp-ptp-notification/k8sapp_ptp_notification/k8sapp_ptp_notification/helm/ptp_notification.py b/python3-k8sapp-ptp-notification/k8sapp_ptp_notification/k8sapp_ptp_notification/helm/ptp_notification.py index 0946e57..94aa8ec 100644 --- a/python3-k8sapp-ptp-notification/k8sapp_ptp_notification/k8sapp_ptp_notification/helm/ptp_notification.py +++ b/python3-k8sapp-ptp-notification/k8sapp_ptp_notification/k8sapp_ptp_notification/helm/ptp_notification.py @@ -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 # 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 exception from sysinv.helm import base from sysinv.helm import common +LOG = logging.getLogger(__name__) + class PTPNotificationHelm(base.BaseHelm): """Class to encapsulate helm operations for the ptp notification chart""" @@ -28,3 +33,16 @@ class PTPNotificationHelm(base.BaseHelm): def get_namespaces(self): 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 diff --git a/python3-k8sapp-ptp-notification/k8sapp_ptp_notification/setup.cfg b/python3-k8sapp-ptp-notification/k8sapp_ptp_notification/setup.cfg index 5c532e2..2907341 100644 --- a/python3-k8sapp-ptp-notification/k8sapp_ptp_notification/setup.cfg +++ b/python3-k8sapp-ptp-notification/k8sapp_ptp_notification/setup.cfg @@ -30,10 +30,10 @@ setup-hooks = [entry_points] systemconfig.helm_applications = - ptp_notification = systemconfig.helm_plugins.ptp_notification + 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] universal = 1