From 178914b535d071d7a6dad8467b44ff5b7a2c6266 Mon Sep 17 00:00:00 2001 From: Rahul Roshan Kachchap Date: Sat, 1 Apr 2023 03:01:42 -0400 Subject: [PATCH] Remove psp-rolebinding from ptp-notification-armada-app Removed the psp-rolebinding helm chart from being packaged as part of ptp-notification-armada-app. PASS: Build pkgs PASS: system-application apply ptp-notification PASS: application pkg doesn't consist psp-rolebinding helm chart Story: 2010590 Task: 47769 Signed-off-by: Rahul Roshan Kachchap Change-Id: I15fb26a11d2bba4c51e0144e4c4435e7f27f9e52 --- .../common/constants.py | 1 - .../helm/psp_rolebinding.py | 43 ------------------- .../k8sapp_ptp_notification/setup.cfg | 1 - .../debian/deb_folder/rules | 1 - .../debian/meta_data.yaml | 2 - .../fluxcd-manifests/kustomization.yaml | 1 - .../helmrelease.yaml | 35 --------------- .../kustomization.yaml | 17 -------- ...tion-psp-rolebinding-static-overrides.yaml | 7 --- ...tion-psp-rolebinding-system-overrides.yaml | 5 --- 10 files changed, 113 deletions(-) delete mode 100644 python3-k8sapp-ptp-notification/k8sapp_ptp_notification/k8sapp_ptp_notification/helm/psp_rolebinding.py delete mode 100644 stx-ptp-notification-helm/stx-ptp-notification-helm/fluxcd-manifests/ptp-notification-psp-rolebinding/helmrelease.yaml delete mode 100644 stx-ptp-notification-helm/stx-ptp-notification-helm/fluxcd-manifests/ptp-notification-psp-rolebinding/kustomization.yaml delete mode 100644 stx-ptp-notification-helm/stx-ptp-notification-helm/fluxcd-manifests/ptp-notification-psp-rolebinding/ptp-notification-psp-rolebinding-static-overrides.yaml delete mode 100644 stx-ptp-notification-helm/stx-ptp-notification-helm/fluxcd-manifests/ptp-notification-psp-rolebinding/ptp-notification-psp-rolebinding-system-overrides.yaml 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 e008bf7..4f41771 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 @@ -7,4 +7,3 @@ # Helm: Supported charts: # These values match the names in the chart package's Chart.yaml HELM_CHART_PTP_NOTIFICATION = 'ptp-notification' -HELM_CHART_PSP_ROLEBINDING = 'ptp-notification-psp-rolebinding' diff --git a/python3-k8sapp-ptp-notification/k8sapp_ptp_notification/k8sapp_ptp_notification/helm/psp_rolebinding.py b/python3-k8sapp-ptp-notification/k8sapp_ptp_notification/k8sapp_ptp_notification/helm/psp_rolebinding.py deleted file mode 100644 index 3660516..0000000 --- a/python3-k8sapp-ptp-notification/k8sapp_ptp_notification/k8sapp_ptp_notification/helm/psp_rolebinding.py +++ /dev/null @@ -1,43 +0,0 @@ -# -# Copyright (c) 2021 Wind River Systems, Inc. -# -# SPDX-License-Identifier: Apache-2.0 -# - -from k8sapp_ptp_notification.common import constants as app_constants - -from sysinv.common import constants -from sysinv.common import exception - -from sysinv.helm import base -from sysinv.helm import common - - -class PSPRolebindingHelm(base.BaseHelm): - """Class to encapsulate helm operations for the psp rolebinding chart""" - - SUPPORTED_NAMESPACES = base.BaseHelm.SUPPORTED_NAMESPACES + \ - [common.HELM_NS_NOTIFICATION] - SUPPORTED_APP_NAMESPACES = { - constants.HELM_APP_PTP_NOTIFICATION: - base.BaseHelm.SUPPORTED_NAMESPACES + [common.HELM_NS_NOTIFICATION], - } - - CHART = app_constants.HELM_CHART_PSP_ROLEBINDING - SERVICE_NAME = 'psp-rolebinding' - - def get_namespaces(self): - return self.SUPPORTED_NAMESPACES - - def get_overrides(self, namespace=None): - overrides = { - common.HELM_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 aa94565..5c532e2 100644 --- a/python3-k8sapp-ptp-notification/k8sapp_ptp_notification/setup.cfg +++ b/python3-k8sapp-ptp-notification/k8sapp_ptp_notification/setup.cfg @@ -34,7 +34,6 @@ systemconfig.helm_applications = systemconfig.helm_plugins.ptp_notification = 001_ptp_notification = k8sapp_ptp_notification.helm.ptp_notification:PTPNotificationHelm - 002_ptp_notification-psp-rolebinding = k8sapp_ptp_notification.helm.psp_rolebinding:PSPRolebindingHelm [bdist_wheel] universal = 1 diff --git a/stx-ptp-notification-helm/debian/deb_folder/rules b/stx-ptp-notification-helm/debian/deb_folder/rules index 72f7da0..b082d0d 100755 --- a/stx-ptp-notification-helm/debian/deb_folder/rules +++ b/stx-ptp-notification-helm/debian/deb_folder/rules @@ -27,7 +27,6 @@ override_dh_auto_build: # Create the TGZ file. cd helm-charts && make ptp-notification - cd helm-charts && make psp-rolebinding # Terminate the helm chart server. pkill chartmuseum diff --git a/stx-ptp-notification-helm/debian/meta_data.yaml b/stx-ptp-notification-helm/debian/meta_data.yaml index 4c76de9..260b299 100644 --- a/stx-ptp-notification-helm/debian/meta_data.yaml +++ b/stx-ptp-notification-helm/debian/meta_data.yaml @@ -2,8 +2,6 @@ debname: stx-ptp-notification-helm debver: 1.0-1 src_path: stx-ptp-notification-helm -src_files: - - ${MY_REPO}/stx/helm-charts/psp-rolebinding/psp-rolebinding revision: dist: $STX_DIST GITREVCOUNT: diff --git a/stx-ptp-notification-helm/stx-ptp-notification-helm/fluxcd-manifests/kustomization.yaml b/stx-ptp-notification-helm/stx-ptp-notification-helm/fluxcd-manifests/kustomization.yaml index f9927c0..6cbc3f5 100644 --- a/stx-ptp-notification-helm/stx-ptp-notification-helm/fluxcd-manifests/kustomization.yaml +++ b/stx-ptp-notification-helm/stx-ptp-notification-helm/fluxcd-manifests/kustomization.yaml @@ -9,4 +9,3 @@ namespace: notification resources: - base - ptp-notification - - ptp-notification-psp-rolebinding diff --git a/stx-ptp-notification-helm/stx-ptp-notification-helm/fluxcd-manifests/ptp-notification-psp-rolebinding/helmrelease.yaml b/stx-ptp-notification-helm/stx-ptp-notification-helm/fluxcd-manifests/ptp-notification-psp-rolebinding/helmrelease.yaml deleted file mode 100644 index af510b0..0000000 --- a/stx-ptp-notification-helm/stx-ptp-notification-helm/fluxcd-manifests/ptp-notification-psp-rolebinding/helmrelease.yaml +++ /dev/null @@ -1,35 +0,0 @@ -# -# Copyright (c) 2022 Wind River Systems, Inc. -# -# SPDX-License-Identifier: Apache-2.0 -# -apiVersion: "helm.toolkit.fluxcd.io/v2beta1" -kind: HelmRelease -metadata: - name: ptp-notification-psp-rolebinding - labels: - chart_group: ptp-notification -spec: - releaseName: ptp-ptp-notification-psp-rolebinding - chart: - spec: - chart: psp-rolebinding - version: 0.1.0 - sourceRef: - kind: HelmRepository - name: stx-platform - interval: 1m - timeout: 30m - test: - enable: false - install: - disableHooks: false - upgrade: - disableHooks: false - valuesFrom: - - kind: Secret - name: ptp-notification-psp-rolebinding-static-overrides - valuesKey: ptp-notification-psp-rolebinding-static-overrides.yaml - - kind: Secret - name: ptp-notification-psp-rolebinding-system-overrides - valuesKey: ptp-notification-psp-rolebinding-system-overrides.yaml \ No newline at end of file diff --git a/stx-ptp-notification-helm/stx-ptp-notification-helm/fluxcd-manifests/ptp-notification-psp-rolebinding/kustomization.yaml b/stx-ptp-notification-helm/stx-ptp-notification-helm/fluxcd-manifests/ptp-notification-psp-rolebinding/kustomization.yaml deleted file mode 100644 index 2f1525d..0000000 --- a/stx-ptp-notification-helm/stx-ptp-notification-helm/fluxcd-manifests/ptp-notification-psp-rolebinding/kustomization.yaml +++ /dev/null @@ -1,17 +0,0 @@ -# -# Copyright (c) 2022 Wind River Systems, Inc. -# -# SPDX-License-Identifier: Apache-2.0 -# -namespace: notification -resources: - - helmrelease.yaml -secretGenerator: - - name: ptp-notification-psp-rolebinding-static-overrides - files: - - ptp-notification-psp-rolebinding-static-overrides.yaml - - name: ptp-notification-psp-rolebinding-system-overrides - files: - - ptp-notification-psp-rolebinding-system-overrides.yaml -generatorOptions: - disableNameSuffixHash: true diff --git a/stx-ptp-notification-helm/stx-ptp-notification-helm/fluxcd-manifests/ptp-notification-psp-rolebinding/ptp-notification-psp-rolebinding-static-overrides.yaml b/stx-ptp-notification-helm/stx-ptp-notification-helm/fluxcd-manifests/ptp-notification-psp-rolebinding/ptp-notification-psp-rolebinding-static-overrides.yaml deleted file mode 100644 index c9d289f..0000000 --- a/stx-ptp-notification-helm/stx-ptp-notification-helm/fluxcd-manifests/ptp-notification-psp-rolebinding/ptp-notification-psp-rolebinding-static-overrides.yaml +++ /dev/null @@ -1,7 +0,0 @@ -# -# Copyright (c) 2022 Wind River Systems, Inc. -# -# SPDX-License-Identifier: Apache-2.0 -# -rolebindingNamespace: notification -serviceAccount: notification diff --git a/stx-ptp-notification-helm/stx-ptp-notification-helm/fluxcd-manifests/ptp-notification-psp-rolebinding/ptp-notification-psp-rolebinding-system-overrides.yaml b/stx-ptp-notification-helm/stx-ptp-notification-helm/fluxcd-manifests/ptp-notification-psp-rolebinding/ptp-notification-psp-rolebinding-system-overrides.yaml deleted file mode 100644 index 12f4606..0000000 --- a/stx-ptp-notification-helm/stx-ptp-notification-helm/fluxcd-manifests/ptp-notification-psp-rolebinding/ptp-notification-psp-rolebinding-system-overrides.yaml +++ /dev/null @@ -1,5 +0,0 @@ -# -# Copyright (c) 2022 Wind River Systems, Inc. -# -# SPDX-License-Identifier: Apache-2.0 -#