diff --git a/debian_pkg_dirs b/debian_pkg_dirs index dceef59..9654b71 100644 --- a/debian_pkg_dirs +++ b/debian_pkg_dirs @@ -1,3 +1,4 @@ -platform-helm +helm-charts/custom/ceph-pools-audit-helm +helm-charts/upstream/platform-helm python3-k8sapp-platform stx-platform-helm diff --git a/platform-helm/platform-helm/files/Makefile b/helm-charts/custom/ceph-pools-audit-helm/ceph-pools-audit-helm/Makefile similarity index 77% rename from platform-helm/platform-helm/files/Makefile rename to helm-charts/custom/ceph-pools-audit-helm/ceph-pools-audit-helm/Makefile index c97560f..7e25c72 100644 --- a/platform-helm/platform-helm/files/Makefile +++ b/helm-charts/custom/ceph-pools-audit-helm/ceph-pools-audit-helm/Makefile @@ -25,20 +25,16 @@ $(CHARTS): init-%: if [ -f $*/Makefile ]; then make -C $*; fi - if [ -f $*/requirements.yaml ]; then helm dep up $*; fi lint-%: init-% if [ -d $* ]; then helm lint $*; fi - @echo "Clobber dependencies from packaging" - rm -v -f $*/requirements.lock $*/requirements.yaml build-%: lint-% - if [ -d $* ]; then helm package $*; fi + if [ -d $* ]; then helm package --version $(CHART_VERSION) $*; fi clean: @echo "Clean all build artifacts" rm -f */templates/_partials.tpl */templates/_globals.tpl - rm -f *tgz */charts/*tgz */requirements.lock rm -rf */charts */tmpcharts %: diff --git a/stx-platform-helm/stx-platform-helm/helm-charts/ceph-pools-audit/Chart.yaml b/helm-charts/custom/ceph-pools-audit-helm/ceph-pools-audit-helm/ceph-pools-audit/Chart.yaml similarity index 100% rename from stx-platform-helm/stx-platform-helm/helm-charts/ceph-pools-audit/Chart.yaml rename to helm-charts/custom/ceph-pools-audit-helm/ceph-pools-audit-helm/ceph-pools-audit/Chart.yaml diff --git a/stx-platform-helm/stx-platform-helm/helm-charts/ceph-pools-audit/templates/configmap-ceph-etc.yaml b/helm-charts/custom/ceph-pools-audit-helm/ceph-pools-audit-helm/ceph-pools-audit/templates/configmap-ceph-etc.yaml similarity index 100% rename from stx-platform-helm/stx-platform-helm/helm-charts/ceph-pools-audit/templates/configmap-ceph-etc.yaml rename to helm-charts/custom/ceph-pools-audit-helm/ceph-pools-audit-helm/ceph-pools-audit/templates/configmap-ceph-etc.yaml diff --git a/stx-platform-helm/stx-platform-helm/helm-charts/ceph-pools-audit/templates/confimap-bin.yaml b/helm-charts/custom/ceph-pools-audit-helm/ceph-pools-audit-helm/ceph-pools-audit/templates/confimap-bin.yaml similarity index 100% rename from stx-platform-helm/stx-platform-helm/helm-charts/ceph-pools-audit/templates/confimap-bin.yaml rename to helm-charts/custom/ceph-pools-audit-helm/ceph-pools-audit-helm/ceph-pools-audit/templates/confimap-bin.yaml diff --git a/stx-platform-helm/stx-platform-helm/helm-charts/ceph-pools-audit/templates/job-ceph-pools-audit.yaml b/helm-charts/custom/ceph-pools-audit-helm/ceph-pools-audit-helm/ceph-pools-audit/templates/job-ceph-pools-audit.yaml similarity index 100% rename from stx-platform-helm/stx-platform-helm/helm-charts/ceph-pools-audit/templates/job-ceph-pools-audit.yaml rename to helm-charts/custom/ceph-pools-audit-helm/ceph-pools-audit-helm/ceph-pools-audit/templates/job-ceph-pools-audit.yaml diff --git a/stx-platform-helm/stx-platform-helm/helm-charts/ceph-pools-audit/values.yaml b/helm-charts/custom/ceph-pools-audit-helm/ceph-pools-audit-helm/ceph-pools-audit/values.yaml similarity index 100% rename from stx-platform-helm/stx-platform-helm/helm-charts/ceph-pools-audit/values.yaml rename to helm-charts/custom/ceph-pools-audit-helm/ceph-pools-audit-helm/ceph-pools-audit/values.yaml diff --git a/platform-helm/debian/deb_folder/platform-helm.install b/helm-charts/custom/ceph-pools-audit-helm/debian/deb_folder/ceph-pools-audit-helm.install similarity index 100% rename from platform-helm/debian/deb_folder/platform-helm.install rename to helm-charts/custom/ceph-pools-audit-helm/debian/deb_folder/ceph-pools-audit-helm.install diff --git a/helm-charts/custom/ceph-pools-audit-helm/debian/deb_folder/changelog b/helm-charts/custom/ceph-pools-audit-helm/debian/deb_folder/changelog new file mode 100644 index 0000000..c5f8990 --- /dev/null +++ b/helm-charts/custom/ceph-pools-audit-helm/debian/deb_folder/changelog @@ -0,0 +1,5 @@ +ceph-pools-audit-helm (0.1-0) unstable; urgency=medium + + * Initial release. + + -- Robert Church Fri, 29 Dec 2023 20:07:42 +0000 diff --git a/helm-charts/custom/ceph-pools-audit-helm/debian/deb_folder/control b/helm-charts/custom/ceph-pools-audit-helm/debian/deb_folder/control new file mode 100644 index 0000000..07b5451 --- /dev/null +++ b/helm-charts/custom/ceph-pools-audit-helm/debian/deb_folder/control @@ -0,0 +1,15 @@ +Source: ceph-pools-audit-helm +Section: libs +Priority: optional +Maintainer: StarlingX Developers +Build-Depends: debhelper-compat (= 13), + helm, +Standards-Version: 4.5.1 +Homepage: https://www.starlingx.io + +Package: ceph-pools-audit-helm +Section: libs +Architecture: any +Depends: ${misc:Depends} +Description: StarlingX Platform Ceph pool auditor helm chart + This package contains a helm chart to audit the replication factor of Ceph pools. diff --git a/helm-charts/custom/ceph-pools-audit-helm/debian/deb_folder/copyright b/helm-charts/custom/ceph-pools-audit-helm/debian/deb_folder/copyright new file mode 100644 index 0000000..6283d56 --- /dev/null +++ b/helm-charts/custom/ceph-pools-audit-helm/debian/deb_folder/copyright @@ -0,0 +1,41 @@ +Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ +Upstream-Name: ceph-pools-audit-helm +Source: https://opendev.org/starlingx/platform-armada-app/ + +Files: * +Copyright: (c) 2019-2023 Wind River Systems, Inc +License: Apache-2 + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + . + https://www.apache.org/licenses/LICENSE-2.0 + . + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + . + On Debian-based systems the full text of the Apache version 2.0 license + can be found in `/usr/share/common-licenses/Apache-2.0'. + +# If you want to use GPL v2 or later for the /debian/* files use +# the following clauses, or change it to suit. Delete these two lines +Files: debian/* +Copyright: 2023 Wind River Systems, Inc +License: Apache-2 + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + . + https://www.apache.org/licenses/LICENSE-2.0 + . + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + . + On Debian-based systems the full text of the Apache version 2.0 license + can be found in `/usr/share/common-licenses/Apache-2.0'. diff --git a/helm-charts/custom/ceph-pools-audit-helm/debian/deb_folder/rules b/helm-charts/custom/ceph-pools-audit-helm/debian/deb_folder/rules new file mode 100755 index 0000000..c855606 --- /dev/null +++ b/helm-charts/custom/ceph-pools-audit-helm/debian/deb_folder/rules @@ -0,0 +1,27 @@ +#!/usr/bin/make -f +# export DH_VERBOSE = 1 + +export ROOT = debian/tmp +export APP_FOLDER = $(ROOT)/usr/lib/helm + +export DEB_VERSION = $(shell dpkg-parsechangelog | egrep '^Version:' | cut -f 2 -d ' ') +export RELEASE = $(shell echo $(DEB_VERSION) | cut -f 1 -d '-') +export REVISION = $(shell echo $(DEB_VERSION) | cut -f 4 -d '.') +export CHART_VERSION = $(RELEASE).$(REVISION) + +%: + dh $@ + +override_dh_auto_build: + # Stage the chart for building + mkdir -p build + mv Makefile ceph-pools-audit build + + # Build the chart + cd build && make CHART_VERSION=$(CHART_VERSION) ceph-pools-audit + +override_dh_auto_install: + install -d -m 755 $(APP_FOLDER) + install -p -D -m 755 build/ceph-pools-audit*.tgz $(APP_FOLDER) + +override_dh_auto_test: diff --git a/platform-helm/debian/deb_folder/source/format b/helm-charts/custom/ceph-pools-audit-helm/debian/deb_folder/source/format similarity index 100% rename from platform-helm/debian/deb_folder/source/format rename to helm-charts/custom/ceph-pools-audit-helm/debian/deb_folder/source/format diff --git a/helm-charts/custom/ceph-pools-audit-helm/debian/meta_data.yaml b/helm-charts/custom/ceph-pools-audit-helm/debian/meta_data.yaml new file mode 100644 index 0000000..68e56e1 --- /dev/null +++ b/helm-charts/custom/ceph-pools-audit-helm/debian/meta_data.yaml @@ -0,0 +1,10 @@ +--- +debname: ceph-pools-audit-helm +debver: 0.1-0 +src_path: ceph-pools-audit-helm +revision: + dist: $STX_DIST + stx_patch: 19 + GITREVCOUNT: + SRC_DIR: ${MY_REPO}/stx/platform-armada-app/helm-charts/custom/ceph-pools-audit-helm/ceph-pools-audit-helm/ceph-pools-audit + BASE_SRCREV: 301e310b67f608c309a34c7431848f680e2ea827 diff --git a/platform-helm/debian/deb_folder/changelog b/helm-charts/upstream/platform-helm/debian/deb_folder/changelog similarity index 74% rename from platform-helm/debian/deb_folder/changelog rename to helm-charts/upstream/platform-helm/debian/deb_folder/changelog index 78db296..976bb3d 100644 --- a/platform-helm/debian/deb_folder/changelog +++ b/helm-charts/upstream/platform-helm/debian/deb_folder/changelog @@ -2,13 +2,13 @@ platform-helm (3.9-0) unstable; urgency=medium * New upstream release. --- Gabriel de Araújo Cabral Fri, 21 Jul 2023 08:30:00 +0000 + -- Gabriel de Araújo Cabral Fri, 21 Jul 2023 08:30:00 +0000 platform-helm (3.8-0) unstable; urgency=medium * New upstream release. - -- Erickson Silva de Oliveira Wed, 17 May 2023 08:35:00 +0000 + -- Erickson Silva de Oliveira Wed, 17 May 2023 08:35:00 +0000 platform-helm (1.0-1) unstable; urgency=medium diff --git a/platform-helm/debian/deb_folder/control b/helm-charts/upstream/platform-helm/debian/deb_folder/control similarity index 100% rename from platform-helm/debian/deb_folder/control rename to helm-charts/upstream/platform-helm/debian/deb_folder/control diff --git a/platform-helm/debian/deb_folder/copyright b/helm-charts/upstream/platform-helm/debian/deb_folder/copyright similarity index 100% rename from platform-helm/debian/deb_folder/copyright rename to helm-charts/upstream/platform-helm/debian/deb_folder/copyright diff --git a/platform-helm/debian/deb_folder/patches/0001-ceph-csi-cephfs-replace-appVersion-version.patch b/helm-charts/upstream/platform-helm/debian/deb_folder/patches/0001-ceph-csi-cephfs-replace-appVersion-version.patch similarity index 100% rename from platform-helm/debian/deb_folder/patches/0001-ceph-csi-cephfs-replace-appVersion-version.patch rename to helm-charts/upstream/platform-helm/debian/deb_folder/patches/0001-ceph-csi-cephfs-replace-appVersion-version.patch diff --git a/platform-helm/debian/deb_folder/patches/0002-ceph-csi-cephfs-add-default-fields-to-values.yaml.patch b/helm-charts/upstream/platform-helm/debian/deb_folder/patches/0002-ceph-csi-cephfs-add-default-fields-to-values.yaml.patch similarity index 100% rename from platform-helm/debian/deb_folder/patches/0002-ceph-csi-cephfs-add-default-fields-to-values.yaml.patch rename to helm-charts/upstream/platform-helm/debian/deb_folder/patches/0002-ceph-csi-cephfs-add-default-fields-to-values.yaml.patch diff --git a/platform-helm/debian/deb_folder/patches/0003-ceph-csi-cephfs-add-storage-init.yaml.patch b/helm-charts/upstream/platform-helm/debian/deb_folder/patches/0003-ceph-csi-cephfs-add-storage-init.yaml.patch similarity index 100% rename from platform-helm/debian/deb_folder/patches/0003-ceph-csi-cephfs-add-storage-init.yaml.patch rename to helm-charts/upstream/platform-helm/debian/deb_folder/patches/0003-ceph-csi-cephfs-add-storage-init.yaml.patch diff --git a/platform-helm/debian/deb_folder/patches/0004-ceph-csi-cephfs-add-imagePullSecrets-to-ServiceAccount.patch b/helm-charts/upstream/platform-helm/debian/deb_folder/patches/0004-ceph-csi-cephfs-add-imagePullSecrets-to-ServiceAccount.patch similarity index 100% rename from platform-helm/debian/deb_folder/patches/0004-ceph-csi-cephfs-add-imagePullSecrets-to-ServiceAccount.patch rename to helm-charts/upstream/platform-helm/debian/deb_folder/patches/0004-ceph-csi-cephfs-add-imagePullSecrets-to-ServiceAccount.patch diff --git a/platform-helm/debian/deb_folder/patches/0005-ceph-csi-cephfs-add-annotations-to-provisioner-deployment.patch b/helm-charts/upstream/platform-helm/debian/deb_folder/patches/0005-ceph-csi-cephfs-add-annotations-to-provisioner-deployment.patch similarity index 100% rename from platform-helm/debian/deb_folder/patches/0005-ceph-csi-cephfs-add-annotations-to-provisioner-deployment.patch rename to helm-charts/upstream/platform-helm/debian/deb_folder/patches/0005-ceph-csi-cephfs-add-annotations-to-provisioner-deployment.patch diff --git a/platform-helm/debian/deb_folder/patches/0006-ceph-csi-rbd-replace-appVersion-version.patch b/helm-charts/upstream/platform-helm/debian/deb_folder/patches/0006-ceph-csi-rbd-replace-appVersion-version.patch similarity index 100% rename from platform-helm/debian/deb_folder/patches/0006-ceph-csi-rbd-replace-appVersion-version.patch rename to helm-charts/upstream/platform-helm/debian/deb_folder/patches/0006-ceph-csi-rbd-replace-appVersion-version.patch diff --git a/platform-helm/debian/deb_folder/patches/0007-ceph-csi-rbd-add-default-fields-to-values.yaml.patch b/helm-charts/upstream/platform-helm/debian/deb_folder/patches/0007-ceph-csi-rbd-add-default-fields-to-values.yaml.patch similarity index 100% rename from platform-helm/debian/deb_folder/patches/0007-ceph-csi-rbd-add-default-fields-to-values.yaml.patch rename to helm-charts/upstream/platform-helm/debian/deb_folder/patches/0007-ceph-csi-rbd-add-default-fields-to-values.yaml.patch diff --git a/platform-helm/debian/deb_folder/patches/0008-ceph-csi-rbd-add-storage-init.yaml.patch b/helm-charts/upstream/platform-helm/debian/deb_folder/patches/0008-ceph-csi-rbd-add-storage-init.yaml.patch similarity index 100% rename from platform-helm/debian/deb_folder/patches/0008-ceph-csi-rbd-add-storage-init.yaml.patch rename to helm-charts/upstream/platform-helm/debian/deb_folder/patches/0008-ceph-csi-rbd-add-storage-init.yaml.patch diff --git a/platform-helm/debian/deb_folder/patches/0009-ceph-csi-rbd-add-imagePullSecrets-to-ServiceAccount.patch b/helm-charts/upstream/platform-helm/debian/deb_folder/patches/0009-ceph-csi-rbd-add-imagePullSecrets-to-ServiceAccount.patch similarity index 100% rename from platform-helm/debian/deb_folder/patches/0009-ceph-csi-rbd-add-imagePullSecrets-to-ServiceAccount.patch rename to helm-charts/upstream/platform-helm/debian/deb_folder/patches/0009-ceph-csi-rbd-add-imagePullSecrets-to-ServiceAccount.patch diff --git a/platform-helm/debian/deb_folder/patches/0010-ceph-csi-rbd-add-annotations-to-provisioner-deployment.patch b/helm-charts/upstream/platform-helm/debian/deb_folder/patches/0010-ceph-csi-rbd-add-annotations-to-provisioner-deployment.patch similarity index 100% rename from platform-helm/debian/deb_folder/patches/0010-ceph-csi-rbd-add-annotations-to-provisioner-deployment.patch rename to helm-charts/upstream/platform-helm/debian/deb_folder/patches/0010-ceph-csi-rbd-add-annotations-to-provisioner-deployment.patch diff --git a/platform-helm/debian/deb_folder/patches/0011-ceph-csi-rbd-update-storageclass.patch b/helm-charts/upstream/platform-helm/debian/deb_folder/patches/0011-ceph-csi-rbd-update-storageclass.patch similarity index 100% rename from platform-helm/debian/deb_folder/patches/0011-ceph-csi-rbd-update-storageclass.patch rename to helm-charts/upstream/platform-helm/debian/deb_folder/patches/0011-ceph-csi-rbd-update-storageclass.patch diff --git a/platform-helm/debian/deb_folder/patches/0012-ceph-csi-cephfs-update-storageclass.patch b/helm-charts/upstream/platform-helm/debian/deb_folder/patches/0012-ceph-csi-cephfs-update-storageclass.patch similarity index 100% rename from platform-helm/debian/deb_folder/patches/0012-ceph-csi-cephfs-update-storageclass.patch rename to helm-charts/upstream/platform-helm/debian/deb_folder/patches/0012-ceph-csi-cephfs-update-storageclass.patch diff --git a/platform-helm/debian/deb_folder/patches/0013-ceph-csi-rbd-add-annotations-to-nodeplugin-daemonset.patch b/helm-charts/upstream/platform-helm/debian/deb_folder/patches/0013-ceph-csi-rbd-add-annotations-to-nodeplugin-daemonset.patch similarity index 100% rename from platform-helm/debian/deb_folder/patches/0013-ceph-csi-rbd-add-annotations-to-nodeplugin-daemonset.patch rename to helm-charts/upstream/platform-helm/debian/deb_folder/patches/0013-ceph-csi-rbd-add-annotations-to-nodeplugin-daemonset.patch diff --git a/platform-helm/debian/deb_folder/patches/0014-ceph-csi-cephfs-add-annotations-to-nodeplugin-daemonset.patch b/helm-charts/upstream/platform-helm/debian/deb_folder/patches/0014-ceph-csi-cephfs-add-annotations-to-nodeplugin-daemonset.patch similarity index 100% rename from platform-helm/debian/deb_folder/patches/0014-ceph-csi-cephfs-add-annotations-to-nodeplugin-daemonset.patch rename to helm-charts/upstream/platform-helm/debian/deb_folder/patches/0014-ceph-csi-cephfs-add-annotations-to-nodeplugin-daemonset.patch diff --git a/platform-helm/debian/deb_folder/patches/0015-ceph-csi-cephfs-add-snapshotclass.patch b/helm-charts/upstream/platform-helm/debian/deb_folder/patches/0015-ceph-csi-cephfs-add-snapshotclass.patch similarity index 100% rename from platform-helm/debian/deb_folder/patches/0015-ceph-csi-cephfs-add-snapshotclass.patch rename to helm-charts/upstream/platform-helm/debian/deb_folder/patches/0015-ceph-csi-cephfs-add-snapshotclass.patch diff --git a/platform-helm/debian/deb_folder/patches/0016-ceph-csi-rbd-add-snapshotclass.patch b/helm-charts/upstream/platform-helm/debian/deb_folder/patches/0016-ceph-csi-rbd-add-snapshotclass.patch similarity index 100% rename from platform-helm/debian/deb_folder/patches/0016-ceph-csi-rbd-add-snapshotclass.patch rename to helm-charts/upstream/platform-helm/debian/deb_folder/patches/0016-ceph-csi-rbd-add-snapshotclass.patch diff --git a/platform-helm/debian/deb_folder/patches/0017-ceph-csi-cephfs-remove-mountoptions-debug-on-pvs.patch b/helm-charts/upstream/platform-helm/debian/deb_folder/patches/0017-ceph-csi-cephfs-remove-mountoptions-debug-on-pvs.patch similarity index 100% rename from platform-helm/debian/deb_folder/patches/0017-ceph-csi-cephfs-remove-mountoptions-debug-on-pvs.patch rename to helm-charts/upstream/platform-helm/debian/deb_folder/patches/0017-ceph-csi-cephfs-remove-mountoptions-debug-on-pvs.patch diff --git a/helm-charts/upstream/platform-helm/debian/deb_folder/patches/0018-Fix-chart-label-for-rbd-storage-init-Job.patch b/helm-charts/upstream/platform-helm/debian/deb_folder/patches/0018-Fix-chart-label-for-rbd-storage-init-Job.patch new file mode 100644 index 0000000..00df331 --- /dev/null +++ b/helm-charts/upstream/platform-helm/debian/deb_folder/patches/0018-Fix-chart-label-for-rbd-storage-init-Job.patch @@ -0,0 +1,30 @@ +From: Robert Church +Date: Sun, 31 Dec 2023 12:49:27 -0600 +Subject: Fix chart label for rbd-storage-init Job + +Update the chart label on the rbd-storage-init Job to align with all the +other chart labels used throughout the chart. + +This one-off implementation resulted in an invalid +label (ceph-csi-rbd-3.9.0+STX.14) based on the new chart auto-versioning +scheme. Using the common include mechanism provides a valid +label (ceph-csi-rbd-3.9.0_STX.14). + +Signed-off-by: Robert Church +--- + charts/ceph-csi-rbd/templates/storage-init.yaml | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/charts/ceph-csi-rbd/templates/storage-init.yaml b/charts/ceph-csi-rbd/templates/storage-init.yaml +index 6abd8ec..0b36c58 100644 +--- a/charts/ceph-csi-rbd/templates/storage-init.yaml ++++ b/charts/ceph-csi-rbd/templates/storage-init.yaml +@@ -344,7 +344,7 @@ spec: + labels: + heritage: {{ .Release.Service | quote }} + release: {{ .Release.Name | quote }} +- chart: "{{ .Chart.Name }}-{{- .Chart.Version }}" ++ chart: {{ include "ceph-csi-rbd.chart" . }} + spec: + serviceAccountName: {{ include "ceph-csi-rbd.serviceAccountName.provisioner" . }} + restartPolicy: OnFailure diff --git a/platform-helm/debian/deb_folder/patches/series b/helm-charts/upstream/platform-helm/debian/deb_folder/patches/series similarity index 94% rename from platform-helm/debian/deb_folder/patches/series rename to helm-charts/upstream/platform-helm/debian/deb_folder/patches/series index 1b14b30..496b052 100644 --- a/platform-helm/debian/deb_folder/patches/series +++ b/helm-charts/upstream/platform-helm/debian/deb_folder/patches/series @@ -15,3 +15,4 @@ 0015-ceph-csi-cephfs-add-snapshotclass.patch 0016-ceph-csi-rbd-add-snapshotclass.patch 0017-ceph-csi-cephfs-remove-mountoptions-debug-on-pvs.patch +0018-Fix-chart-label-for-rbd-storage-init-Job.patch diff --git a/helm-charts/upstream/platform-helm/debian/deb_folder/platform-helm.install b/helm-charts/upstream/platform-helm/debian/deb_folder/platform-helm.install new file mode 100644 index 0000000..8a0c6de --- /dev/null +++ b/helm-charts/upstream/platform-helm/debian/deb_folder/platform-helm.install @@ -0,0 +1 @@ +usr/lib/helm/* diff --git a/platform-helm/debian/deb_folder/rules b/helm-charts/upstream/platform-helm/debian/deb_folder/rules similarity index 52% rename from platform-helm/debian/deb_folder/rules rename to helm-charts/upstream/platform-helm/debian/deb_folder/rules index 0fad388..958abd3 100644 --- a/platform-helm/debian/deb_folder/rules +++ b/helm-charts/upstream/platform-helm/debian/deb_folder/rules @@ -1,5 +1,10 @@ #!/usr/bin/make -f -export DH_VERBOSE = 1 +# export DH_VERBOSE = 1 + +export DEB_VERSION = $(shell dpkg-parsechangelog | egrep '^Version:' | cut -f 2 -d ' ') +export PATCH_VERSION = $(shell echo $(DEB_VERSION) | cut -f 4 -d '.') +export CHART_BASE_VERSION = "3.9.0" +export CHART_VERSION = $(CHART_BASE_VERSION)+STX.$(PATCH_VERSION) export ROOT = debian/tmp export APP_FOLDER = $(ROOT)/usr/lib/helm @@ -8,7 +13,6 @@ export APP_FOLDER = $(ROOT)/usr/lib/helm dh $@ override_dh_auto_build: - mkdir -p ceph-csi # Copy ceph-csi charts @@ -16,8 +20,8 @@ override_dh_auto_build: cp Makefile ceph-csi - cd ceph-csi && make ceph-csi-rbd - cd ceph-csi && make ceph-csi-cephfs + cd ceph-csi && make CHART_VERSION=$(CHART_VERSION) ceph-csi-rbd + cd ceph-csi && make CHART_VERSION=$(CHART_VERSION) ceph-csi-cephfs override_dh_auto_install: # Install the app tar file. diff --git a/helm-charts/upstream/platform-helm/debian/deb_folder/source/format b/helm-charts/upstream/platform-helm/debian/deb_folder/source/format new file mode 100644 index 0000000..163aaf8 --- /dev/null +++ b/helm-charts/upstream/platform-helm/debian/deb_folder/source/format @@ -0,0 +1 @@ +3.0 (quilt) diff --git a/platform-helm/debian/meta_data.yaml b/helm-charts/upstream/platform-helm/debian/meta_data.yaml similarity index 76% rename from platform-helm/debian/meta_data.yaml rename to helm-charts/upstream/platform-helm/debian/meta_data.yaml index 125d3ad..7da57ba 100644 --- a/platform-helm/debian/meta_data.yaml +++ b/helm-charts/upstream/platform-helm/debian/meta_data.yaml @@ -9,6 +9,7 @@ src_files: - platform-helm/files/Makefile revision: dist: $STX_DIST + stx_patch: 16 GITREVCOUNT: BASE_SRCREV: 69c37e9978d45dd928537523eda905e34e034b73 - SRC_DIR: ${MY_REPO}/stx/platform-armada-app/platform-helm + SRC_DIR: ${MY_REPO}/stx/platform-armada-app/helm-charts/upstream/platform-helm diff --git a/stx-platform-helm/stx-platform-helm/helm-charts/Makefile b/helm-charts/upstream/platform-helm/platform-helm/files/Makefile similarity index 77% rename from stx-platform-helm/stx-platform-helm/helm-charts/Makefile rename to helm-charts/upstream/platform-helm/platform-helm/files/Makefile index c97560f..7e25c72 100644 --- a/stx-platform-helm/stx-platform-helm/helm-charts/Makefile +++ b/helm-charts/upstream/platform-helm/platform-helm/files/Makefile @@ -25,20 +25,16 @@ $(CHARTS): init-%: if [ -f $*/Makefile ]; then make -C $*; fi - if [ -f $*/requirements.yaml ]; then helm dep up $*; fi lint-%: init-% if [ -d $* ]; then helm lint $*; fi - @echo "Clobber dependencies from packaging" - rm -v -f $*/requirements.lock $*/requirements.yaml build-%: lint-% - if [ -d $* ]; then helm package $*; fi + if [ -d $* ]; then helm package --version $(CHART_VERSION) $*; fi clean: @echo "Clean all build artifacts" rm -f */templates/_partials.tpl */templates/_globals.tpl - rm -f *tgz */charts/*tgz */requirements.lock rm -rf */charts */tmpcharts %: diff --git a/platform-helm/platform-helm/README b/platform-helm/platform-helm/README deleted file mode 100644 index b773ef4..0000000 --- a/platform-helm/platform-helm/README +++ /dev/null @@ -1,5 +0,0 @@ -This directory contains all StarlingX charts that need to be built for this -application. Some charts are common across applications. These common charts -reside in the stx-config/kubernetes/helm-charts directory. To include these in -this application update the build_srpm.data file and use the COPY_LIST_TO_TAR -mechanism to populate these common charts. diff --git a/stx-platform-helm/debian/deb_folder/changelog b/stx-platform-helm/debian/deb_folder/changelog index 9d11bae..83f518b 100644 --- a/stx-platform-helm/debian/deb_folder/changelog +++ b/stx-platform-helm/debian/deb_folder/changelog @@ -2,13 +2,13 @@ stx-platform-helm (1.2-0) unstable; urgency=medium * New upstream release. --- Gabriel de Araújo Cabral Fri, 21 Jul 2023 08:40:00 +0000 + -- Gabriel de Araújo Cabral Fri, 21 Jul 2023 08:40:00 +0000 stx-platform-helm (1.1-0) unstable; urgency=medium * New upstream release. - -- Erickson Silva de Oliveira Wed, 17 May 2023 08:45:00 +0000 + -- Erickson Silva de Oliveira Wed, 17 May 2023 08:45:00 +0000 stx-platform-helm (1.0-1) unstable; urgency=medium diff --git a/stx-platform-helm/debian/deb_folder/control b/stx-platform-helm/debian/deb_folder/control index 9377fc8..0a5da8f 100644 --- a/stx-platform-helm/debian/deb_folder/control +++ b/stx-platform-helm/debian/deb_folder/control @@ -3,11 +3,11 @@ Section: libs Priority: optional Maintainer: StarlingX Developers Build-Depends: debhelper-compat (= 13), - helm, - python3-k8sapp-platform, - python3-k8sapp-platform-wheels, + build-info, + ceph-pools-audit-helm, platform-helm, - build-info + python3-k8sapp-platform, + python3-k8sapp-platform-wheels Standards-Version: 4.5.1 Homepage: https://www.starlingx.io @@ -16,4 +16,4 @@ Section: libs Architecture: any Depends: ${misc:Depends} Description: StarlingX Platform FluxCD Helm Charts - This package contains FluxCD helm charts for the platform applications. + This package contains FluxCD manifests for the platform applications. diff --git a/stx-platform-helm/debian/deb_folder/rules b/stx-platform-helm/debian/deb_folder/rules index 14b38ef..91360ce 100755 --- a/stx-platform-helm/debian/deb_folder/rules +++ b/stx-platform-helm/debian/deb_folder/rules @@ -10,46 +10,54 @@ export REVISION = $(shell echo $(DEB_VERSION) | cut -f 4 -d '.') export APP_NAME = platform-integ-apps export APP_VERSION = $(RELEASE)-$(REVISION) -export APP_TARBALL_FLUXCD = $(APP_NAME)-$(APP_VERSION).tgz +export APP_TARBALL = $(APP_NAME)-$(APP_VERSION).tgz export HELM_FOLDER = /usr/lib/helm export HELM_REPO = stx-platform -export STAGING_FLUXCD = staging-fluxcd +export STAGING = staging %: dh $@ override_dh_auto_build: - # Create the TGZ file. - cd helm-charts && make ceph-pools-audit - # Setup the staging directory. - mkdir -p $(STAGING_FLUXCD) - cp files/metadata.yaml $(STAGING_FLUXCD) - cp -Rv fluxcd-manifests $(STAGING_FLUXCD) - mkdir -p $(STAGING_FLUXCD)/charts - cp helm-charts/*.tgz $(STAGING_FLUXCD)/charts - cp /usr/lib/helm/ceph-csi-*.tgz $(STAGING_FLUXCD)/charts + mkdir -p $(STAGING) + cp files/metadata.yaml $(STAGING) + cp -Rv fluxcd-manifests $(STAGING) + mkdir -p $(STAGING)/charts + cp /usr/lib/helm/*.tgz $(STAGING)/charts + + # Adjust the helmrelease yamls based on the chart versions + for c in $(STAGING)/charts/*; do \ + chart=$$(basename $$c .tgz); \ + chart_name=$${chart%-*}; \ + chart_version=$${chart##*-}; \ + echo "Found $$chart; name: $$chart_name, version: $$chart_version"; \ + chart_manifest=$$(find $(STAGING)/fluxcd-manifests -name helmrelease.yaml -exec grep -q $$chart_name {} \; -print); \ + echo "Updating manifest: $$chart_manifest"; \ + sed -i "s/REPLACE_HELM_CHART_VERSION/$$chart_version/g" $$chart_manifest; \ + grep version $$chart_manifest; \ + done # Populate metadata. - sed -i 's/APP_REPLACE_NAME/$(APP_NAME)/g' $(STAGING_FLUXCD)/metadata.yaml - sed -i 's/APP_REPLACE_VERSION/$(APP_VERSION)/g' $(STAGING_FLUXCD)/metadata.yaml - sed -i 's/HELM_REPLACE_REPO/$(HELM_REPO)/g' $(STAGING_FLUXCD)/metadata.yaml + sed -i 's/APP_REPLACE_NAME/$(APP_NAME)/g' $(STAGING)/metadata.yaml + sed -i 's/APP_REPLACE_VERSION/$(APP_VERSION)/g' $(STAGING)/metadata.yaml + sed -i 's/HELM_REPLACE_REPO/$(HELM_REPO)/g' $(STAGING)/metadata.yaml # Copy the plugins: installed in the buildroot - mkdir -p $(STAGING_FLUXCD)/plugins - cp /plugins/*.whl $(STAGING_FLUXCD)/plugins + mkdir -p $(STAGING)/plugins + cp /plugins/*.whl $(STAGING)/plugins # Create the app package. - cd $(STAGING_FLUXCD) && find . -type f ! -name '*.md5' -print0 | xargs -0 md5sum > checksum.md5 - tar cfz $(APP_TARBALL_FLUXCD) -C $(STAGING_FLUXCD)/ . + cd $(STAGING) && find . -type f ! -name '*.md5' -print0 | xargs -0 md5sum > checksum.md5 + tar cfz $(APP_TARBALL) -C $(STAGING)/ . # Cleanup staging - rm -rf $(STAGING_FLUXCD) + rm -rf $(STAGING) override_dh_auto_install: # Install the app tar file. install -d -m 755 $(APP_FOLDER) - install -p -D -m 755 $(APP_TARBALL_FLUXCD) $(APP_FOLDER) + install -p -D -m 755 $(APP_TARBALL) $(APP_FOLDER) override_dh_auto_test: diff --git a/stx-platform-helm/stx-platform-helm/README b/stx-platform-helm/stx-platform-helm/README deleted file mode 100644 index 969f888..0000000 --- a/stx-platform-helm/stx-platform-helm/README +++ /dev/null @@ -1,6 +0,0 @@ -This directory contains all StarlingX charts that need to be built to support -platform integration immediately after installation. Some charts are common -across applications. These common charts reside in the -stx-config/kubernetes/helm-charts directory. To include these in this -application update the build_srpm.data file and use the COPY_LIST_TO_TAR -mechanism to populate these commom charts. diff --git a/stx-platform-helm/stx-platform-helm/fluxcd-manifests/ceph-pools-audit/helmrelease.yaml b/stx-platform-helm/stx-platform-helm/fluxcd-manifests/ceph-pools-audit/helmrelease.yaml index 709d937..89f3d6e 100644 --- a/stx-platform-helm/stx-platform-helm/fluxcd-manifests/ceph-pools-audit/helmrelease.yaml +++ b/stx-platform-helm/stx-platform-helm/fluxcd-manifests/ceph-pools-audit/helmrelease.yaml @@ -15,7 +15,7 @@ spec: chart: spec: chart: ceph-pools-audit - version: 0.1.0 + version: REPLACE_HELM_CHART_VERSION sourceRef: kind: HelmRepository name: stx-platform diff --git a/stx-platform-helm/stx-platform-helm/fluxcd-manifests/cephfs-provisioner/helmrelease.yaml b/stx-platform-helm/stx-platform-helm/fluxcd-manifests/cephfs-provisioner/helmrelease.yaml index df26bef..6f4eeaa 100644 --- a/stx-platform-helm/stx-platform-helm/fluxcd-manifests/cephfs-provisioner/helmrelease.yaml +++ b/stx-platform-helm/stx-platform-helm/fluxcd-manifests/cephfs-provisioner/helmrelease.yaml @@ -15,7 +15,7 @@ spec: chart: spec: chart: ceph-csi-cephfs - version: 3.9.0 + version: REPLACE_HELM_CHART_VERSION sourceRef: kind: HelmRepository name: stx-platform diff --git a/stx-platform-helm/stx-platform-helm/fluxcd-manifests/rbd-provisioner/helmrelease.yaml b/stx-platform-helm/stx-platform-helm/fluxcd-manifests/rbd-provisioner/helmrelease.yaml index f7667d2..8fd8ab6 100644 --- a/stx-platform-helm/stx-platform-helm/fluxcd-manifests/rbd-provisioner/helmrelease.yaml +++ b/stx-platform-helm/stx-platform-helm/fluxcd-manifests/rbd-provisioner/helmrelease.yaml @@ -15,7 +15,7 @@ spec: chart: spec: chart: ceph-csi-rbd - version: 3.9.0 + version: REPLACE_HELM_CHART_VERSION sourceRef: kind: HelmRepository name: stx-platform