From 5a72dd467cb15f1d6606525bc07c5dae0fd73de4 Mon Sep 17 00:00:00 2001 From: Luiz Felipe Kina Date: Wed, 8 May 2024 10:20:35 -0300 Subject: [PATCH] Auto-increment chart versions Enable auto-versioning of helm charts to ensure the FluxCD helm controller recognizes chart changes for rook-ceph. The structure of custom and upstream is following the template created on the oid-auth-armada-app (https://review.opendev.org/c/starlingx/oidc-auth-armada-app/+/909914). Test Plan: PASS: Build all packages generating an application tarball verifying all versions on the charts and application make sense. PASS: Introduce temporary chart changes and ensure that the versions increment as expected (rook-ceph-1.7.11+STX.4.tgz and rook-ceph-cluster-1.7.11+STX.4.tgz charts inside rook-ceph-migration package). PASS: Validate basic application lifecycle operations: upload/apply/remove/delete PASS: Create a volume using PVC through cephfs and test read/write on the corresponding pools at SX plaforms. Story: 2010929 Task: 50063 Change-Id: I8cae4c09da7686fbdc3279c3478f5ce30a47b76a Signed-off-by: Luiz Felipe Kina --- debian_pkg_dirs | 4 +- .../debian/deb_folder/changelog | 5 +++ .../debian/deb_folder/control | 16 +++++++ .../debian/deb_folder/copyright | 42 +++++++++++++++++++ ...gration-rook-ceph-provisioner-helm.install | 2 + .../debian/deb_folder/rules | 28 +++++++++++++ .../debian/deb_folder/source/format | 2 + .../debian/meta_data.yaml | 9 ++++ .../Makefile | 3 +- .../.helmignore | 0 .../Chart.yaml | 0 .../templates/NOTES.txt | 0 .../templates/_helpers.tpl | 0 .../templates/clusterrole.yaml | 0 .../templates/clusterrolebinding.yaml | 0 .../templates/configmap.yaml | 0 .../deployment-stx-ceph-manager.yaml | 0 .../templates/job-ceph-mon-audit.yaml | 0 .../templates/job-ceph-osd-audit.yaml | 0 .../templates/job-stx-ceph-mgr-provision.yaml | 0 .../post-install-host-provision.yaml | 0 .../post-install-rook-provision.yaml | 0 .../pre-delete-rook-provisioner-cleanup.yaml | 0 .../templates/role.yaml | 0 .../templates/rolebinding.yaml | 0 .../templates/serviceaccount.yaml | 0 .../values.yaml | 0 .../debian/deb_folder/changelog | 0 .../debian/deb_folder/control | 4 +- .../debian/deb_folder/copyright | 0 .../migration-rook-ceph-helm.install | 0 ...jectstore.yaml-from-templates-folder.patch | 0 ...ct-version-to-rook_ceph-and-rook_cep.patch | 0 .../patches/0003-Removing-unnecessary-0.patch | 0 ...4-Added-chart-for-duplex-preparation.patch | 0 .../debian/deb_folder/patches/series | 0 .../debian/deb_folder/rules | 10 ++++- .../debian/deb_folder/source/format | 0 .../debian/meta_data.yaml | 4 +- .../migration-rook-ceph-helm/files}/Makefile | 6 +-- .../debian/deb_folder/control | 1 + .../debian/deb_folder/rules | 27 +++++++----- .../rook-ceph/helmrelease.yaml | 2 +- .../rook-ceph-provisioner/requirements.yaml | 5 --- 44 files changed, 142 insertions(+), 28 deletions(-) create mode 100644 helm-charts/custom/migration-rook-ceph-provisioner-helm/debian/deb_folder/changelog create mode 100644 helm-charts/custom/migration-rook-ceph-provisioner-helm/debian/deb_folder/control create mode 100644 helm-charts/custom/migration-rook-ceph-provisioner-helm/debian/deb_folder/copyright create mode 100644 helm-charts/custom/migration-rook-ceph-provisioner-helm/debian/deb_folder/migration-rook-ceph-provisioner-helm.install create mode 100755 helm-charts/custom/migration-rook-ceph-provisioner-helm/debian/deb_folder/rules create mode 100644 helm-charts/custom/migration-rook-ceph-provisioner-helm/debian/deb_folder/source/format create mode 100644 helm-charts/custom/migration-rook-ceph-provisioner-helm/debian/meta_data.yaml rename {migration-rook-ceph-helm/migration-rook-ceph-helm/files => helm-charts/custom/migration-rook-ceph-provisioner-helm/migration-rook-ceph-provisioner-helm}/Makefile (92%) rename {stx-migration-rook-ceph-helm/stx-migration-rook-ceph-helm/helm-charts/rook-ceph-provisioner => helm-charts/custom/migration-rook-ceph-provisioner-helm/migration-rook-ceph-provisioner-helm/migration-rook-ceph-provisioner}/.helmignore (100%) rename {stx-migration-rook-ceph-helm/stx-migration-rook-ceph-helm/helm-charts/rook-ceph-provisioner => helm-charts/custom/migration-rook-ceph-provisioner-helm/migration-rook-ceph-provisioner-helm/migration-rook-ceph-provisioner}/Chart.yaml (100%) rename {stx-migration-rook-ceph-helm/stx-migration-rook-ceph-helm/helm-charts/rook-ceph-provisioner => helm-charts/custom/migration-rook-ceph-provisioner-helm/migration-rook-ceph-provisioner-helm/migration-rook-ceph-provisioner}/templates/NOTES.txt (100%) rename {stx-migration-rook-ceph-helm/stx-migration-rook-ceph-helm/helm-charts/rook-ceph-provisioner => helm-charts/custom/migration-rook-ceph-provisioner-helm/migration-rook-ceph-provisioner-helm/migration-rook-ceph-provisioner}/templates/_helpers.tpl (100%) rename {stx-migration-rook-ceph-helm/stx-migration-rook-ceph-helm/helm-charts/rook-ceph-provisioner => helm-charts/custom/migration-rook-ceph-provisioner-helm/migration-rook-ceph-provisioner-helm/migration-rook-ceph-provisioner}/templates/clusterrole.yaml (100%) rename {stx-migration-rook-ceph-helm/stx-migration-rook-ceph-helm/helm-charts/rook-ceph-provisioner => helm-charts/custom/migration-rook-ceph-provisioner-helm/migration-rook-ceph-provisioner-helm/migration-rook-ceph-provisioner}/templates/clusterrolebinding.yaml (100%) rename {stx-migration-rook-ceph-helm/stx-migration-rook-ceph-helm/helm-charts/rook-ceph-provisioner => helm-charts/custom/migration-rook-ceph-provisioner-helm/migration-rook-ceph-provisioner-helm/migration-rook-ceph-provisioner}/templates/configmap.yaml (100%) rename {stx-migration-rook-ceph-helm/stx-migration-rook-ceph-helm/helm-charts/rook-ceph-provisioner => helm-charts/custom/migration-rook-ceph-provisioner-helm/migration-rook-ceph-provisioner-helm/migration-rook-ceph-provisioner}/templates/deployment-stx-ceph-manager.yaml (100%) rename {stx-migration-rook-ceph-helm/stx-migration-rook-ceph-helm/helm-charts/rook-ceph-provisioner => helm-charts/custom/migration-rook-ceph-provisioner-helm/migration-rook-ceph-provisioner-helm/migration-rook-ceph-provisioner}/templates/job-ceph-mon-audit.yaml (100%) rename {stx-migration-rook-ceph-helm/stx-migration-rook-ceph-helm/helm-charts/rook-ceph-provisioner => helm-charts/custom/migration-rook-ceph-provisioner-helm/migration-rook-ceph-provisioner-helm/migration-rook-ceph-provisioner}/templates/job-ceph-osd-audit.yaml (100%) rename {stx-migration-rook-ceph-helm/stx-migration-rook-ceph-helm/helm-charts/rook-ceph-provisioner => helm-charts/custom/migration-rook-ceph-provisioner-helm/migration-rook-ceph-provisioner-helm/migration-rook-ceph-provisioner}/templates/job-stx-ceph-mgr-provision.yaml (100%) rename {stx-migration-rook-ceph-helm/stx-migration-rook-ceph-helm/helm-charts/rook-ceph-provisioner => helm-charts/custom/migration-rook-ceph-provisioner-helm/migration-rook-ceph-provisioner-helm/migration-rook-ceph-provisioner}/templates/post-install-host-provision.yaml (100%) rename {stx-migration-rook-ceph-helm/stx-migration-rook-ceph-helm/helm-charts/rook-ceph-provisioner => helm-charts/custom/migration-rook-ceph-provisioner-helm/migration-rook-ceph-provisioner-helm/migration-rook-ceph-provisioner}/templates/post-install-rook-provision.yaml (100%) rename {stx-migration-rook-ceph-helm/stx-migration-rook-ceph-helm/helm-charts/rook-ceph-provisioner => helm-charts/custom/migration-rook-ceph-provisioner-helm/migration-rook-ceph-provisioner-helm/migration-rook-ceph-provisioner}/templates/pre-delete-rook-provisioner-cleanup.yaml (100%) rename {stx-migration-rook-ceph-helm/stx-migration-rook-ceph-helm/helm-charts/rook-ceph-provisioner => helm-charts/custom/migration-rook-ceph-provisioner-helm/migration-rook-ceph-provisioner-helm/migration-rook-ceph-provisioner}/templates/role.yaml (100%) rename {stx-migration-rook-ceph-helm/stx-migration-rook-ceph-helm/helm-charts/rook-ceph-provisioner => helm-charts/custom/migration-rook-ceph-provisioner-helm/migration-rook-ceph-provisioner-helm/migration-rook-ceph-provisioner}/templates/rolebinding.yaml (100%) rename {stx-migration-rook-ceph-helm/stx-migration-rook-ceph-helm/helm-charts/rook-ceph-provisioner => helm-charts/custom/migration-rook-ceph-provisioner-helm/migration-rook-ceph-provisioner-helm/migration-rook-ceph-provisioner}/templates/serviceaccount.yaml (100%) rename {stx-migration-rook-ceph-helm/stx-migration-rook-ceph-helm/helm-charts/rook-ceph-provisioner => helm-charts/custom/migration-rook-ceph-provisioner-helm/migration-rook-ceph-provisioner-helm/migration-rook-ceph-provisioner}/values.yaml (100%) rename {migration-rook-ceph-helm => helm-charts/upstream/migration-rook-ceph-helm}/debian/deb_folder/changelog (100%) rename {migration-rook-ceph-helm => helm-charts/upstream/migration-rook-ceph-helm}/debian/deb_folder/control (71%) rename {migration-rook-ceph-helm => helm-charts/upstream/migration-rook-ceph-helm}/debian/deb_folder/copyright (100%) rename {migration-rook-ceph-helm => helm-charts/upstream/migration-rook-ceph-helm}/debian/deb_folder/migration-rook-ceph-helm.install (100%) rename {migration-rook-ceph-helm => helm-charts/upstream/migration-rook-ceph-helm}/debian/deb_folder/patches/0001-Removed-cephobjectstore.yaml-from-templates-folder.patch (100%) rename {migration-rook-ceph-helm => helm-charts/upstream/migration-rook-ceph-helm}/debian/deb_folder/patches/0002-Adding-the-correct-version-to-rook_ceph-and-rook_cep.patch (100%) rename {migration-rook-ceph-helm => helm-charts/upstream/migration-rook-ceph-helm}/debian/deb_folder/patches/0003-Removing-unnecessary-0.patch (100%) rename {migration-rook-ceph-helm => helm-charts/upstream/migration-rook-ceph-helm}/debian/deb_folder/patches/0004-Added-chart-for-duplex-preparation.patch (100%) rename {migration-rook-ceph-helm => helm-charts/upstream/migration-rook-ceph-helm}/debian/deb_folder/patches/series (100%) rename {migration-rook-ceph-helm => helm-charts/upstream/migration-rook-ceph-helm}/debian/deb_folder/rules (53%) rename {migration-rook-ceph-helm => helm-charts/upstream/migration-rook-ceph-helm}/debian/deb_folder/source/format (100%) rename {migration-rook-ceph-helm => helm-charts/upstream/migration-rook-ceph-helm}/debian/meta_data.yaml (68%) rename {stx-migration-rook-ceph-helm/stx-migration-rook-ceph-helm/helm-charts => helm-charts/upstream/migration-rook-ceph-helm/migration-rook-ceph-helm/files}/Makefile (79%) delete mode 100644 stx-migration-rook-ceph-helm/stx-migration-rook-ceph-helm/helm-charts/rook-ceph-provisioner/requirements.yaml diff --git a/debian_pkg_dirs b/debian_pkg_dirs index 7b393c3..cde647c 100644 --- a/debian_pkg_dirs +++ b/debian_pkg_dirs @@ -1,3 +1,5 @@ -migration-rook-ceph-helm +helm-charts/custom/migration-rook-ceph-provisioner-helm +helm-charts/upstream/migration-rook-ceph-helm python3-k8sapp-migration-rook-ceph stx-migration-rook-ceph-helm + diff --git a/helm-charts/custom/migration-rook-ceph-provisioner-helm/debian/deb_folder/changelog b/helm-charts/custom/migration-rook-ceph-provisioner-helm/debian/deb_folder/changelog new file mode 100644 index 0000000..6f16688 --- /dev/null +++ b/helm-charts/custom/migration-rook-ceph-provisioner-helm/debian/deb_folder/changelog @@ -0,0 +1,5 @@ +migration-rook-ceph-provisioner-helm (1.1-0) unstable; urgency=medium + + * Initial release. + + -- Luiz Felipe Kina Tue, 14 May 2024 10:45:00 +0000 diff --git a/helm-charts/custom/migration-rook-ceph-provisioner-helm/debian/deb_folder/control b/helm-charts/custom/migration-rook-ceph-provisioner-helm/debian/deb_folder/control new file mode 100644 index 0000000..b872392 --- /dev/null +++ b/helm-charts/custom/migration-rook-ceph-provisioner-helm/debian/deb_folder/control @@ -0,0 +1,16 @@ +Source: migration-rook-ceph-provisioner-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: migration-rook-ceph-provisioner-helm +Section: libs +Architecture: any +Depends: ${misc:Depends} +Description: StarlingX Platform Migration Rook Ceph provisioner helm chart + This package contains integrations and audits for Migration Rook Ceph StarlingX app. + diff --git a/helm-charts/custom/migration-rook-ceph-provisioner-helm/debian/deb_folder/copyright b/helm-charts/custom/migration-rook-ceph-provisioner-helm/debian/deb_folder/copyright new file mode 100644 index 0000000..9ab561b --- /dev/null +++ b/helm-charts/custom/migration-rook-ceph-provisioner-helm/debian/deb_folder/copyright @@ -0,0 +1,42 @@ +Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ +Upstream-Name: migration-rook-ceph-provisioner-helm +Source: https://opendev.org/starlingx/platform-armada-app/ + +Files: * +Copyright: (c) 2024 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: 2024 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/migration-rook-ceph-provisioner-helm/debian/deb_folder/migration-rook-ceph-provisioner-helm.install b/helm-charts/custom/migration-rook-ceph-provisioner-helm/debian/deb_folder/migration-rook-ceph-provisioner-helm.install new file mode 100644 index 0000000..f6c8684 --- /dev/null +++ b/helm-charts/custom/migration-rook-ceph-provisioner-helm/debian/deb_folder/migration-rook-ceph-provisioner-helm.install @@ -0,0 +1,2 @@ +usr/lib/helm/* + diff --git a/helm-charts/custom/migration-rook-ceph-provisioner-helm/debian/deb_folder/rules b/helm-charts/custom/migration-rook-ceph-provisioner-helm/debian/deb_folder/rules new file mode 100755 index 0000000..43e9409 --- /dev/null +++ b/helm-charts/custom/migration-rook-ceph-provisioner-helm/debian/deb_folder/rules @@ -0,0 +1,28 @@ +#!/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 PATCH_VERSION = $(shell echo $(DEB_VERSION) | cut -f 4 -d '.') +export CHART_BASE_VERSION = $(shell echo $(DEB_VERSION) | sed 's/-/./' | cut -d '.' -f 1-3) +export CHART_VERSION = $(CHART_BASE_VERSION) + +%: + dh $@ + +override_dh_auto_build: + # Stage the chart for building + mkdir -p build + mv Makefile migration-rook-ceph-provisioner build + + # Build the chart + cd build && make CHART_VERSION=$(CHART_VERSION) migration-rook-ceph-provisioner + +override_dh_auto_install: + install -d -m 755 $(APP_FOLDER) + install -p -D -m 755 build/rook-ceph-provisioner*.tgz $(APP_FOLDER) + +override_dh_auto_test: + diff --git a/helm-charts/custom/migration-rook-ceph-provisioner-helm/debian/deb_folder/source/format b/helm-charts/custom/migration-rook-ceph-provisioner-helm/debian/deb_folder/source/format new file mode 100644 index 0000000..c3d9f24 --- /dev/null +++ b/helm-charts/custom/migration-rook-ceph-provisioner-helm/debian/deb_folder/source/format @@ -0,0 +1,2 @@ +3.0 (quilt) + diff --git a/helm-charts/custom/migration-rook-ceph-provisioner-helm/debian/meta_data.yaml b/helm-charts/custom/migration-rook-ceph-provisioner-helm/debian/meta_data.yaml new file mode 100644 index 0000000..0874f43 --- /dev/null +++ b/helm-charts/custom/migration-rook-ceph-provisioner-helm/debian/meta_data.yaml @@ -0,0 +1,9 @@ +--- +debname: migration-rook-ceph-provisioner-helm +debver: 1.1-0 +src_path: migration-rook-ceph-provisioner-helm +revision: + dist: $STX_DIST + GITREVCOUNT: + SRC_DIR: ${MY_REPO}/stx/rook-ceph/helm-charts/custom/migration-rook-ceph-provisioner-helm/migration-rook-ceph-provisioner-helm + BASE_SRCREV: 340492c793197d5a3ceb77cbe1087c3aaea2450a diff --git a/migration-rook-ceph-helm/migration-rook-ceph-helm/files/Makefile b/helm-charts/custom/migration-rook-ceph-provisioner-helm/migration-rook-ceph-provisioner-helm/Makefile similarity index 92% rename from migration-rook-ceph-helm/migration-rook-ceph-helm/files/Makefile rename to helm-charts/custom/migration-rook-ceph-provisioner-helm/migration-rook-ceph-provisioner-helm/Makefile index 3fbf4dc..a9b44e4 100644 --- a/migration-rook-ceph-helm/migration-rook-ceph-helm/files/Makefile +++ b/helm-charts/custom/migration-rook-ceph-provisioner-helm/migration-rook-ceph-provisioner-helm/Makefile @@ -30,12 +30,11 @@ lint-%: init-% if [ -d $* ]; then helm lint $*; fi 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 rm -rf */charts */tmpcharts %: diff --git a/stx-migration-rook-ceph-helm/stx-migration-rook-ceph-helm/helm-charts/rook-ceph-provisioner/.helmignore b/helm-charts/custom/migration-rook-ceph-provisioner-helm/migration-rook-ceph-provisioner-helm/migration-rook-ceph-provisioner/.helmignore similarity index 100% rename from stx-migration-rook-ceph-helm/stx-migration-rook-ceph-helm/helm-charts/rook-ceph-provisioner/.helmignore rename to helm-charts/custom/migration-rook-ceph-provisioner-helm/migration-rook-ceph-provisioner-helm/migration-rook-ceph-provisioner/.helmignore diff --git a/stx-migration-rook-ceph-helm/stx-migration-rook-ceph-helm/helm-charts/rook-ceph-provisioner/Chart.yaml b/helm-charts/custom/migration-rook-ceph-provisioner-helm/migration-rook-ceph-provisioner-helm/migration-rook-ceph-provisioner/Chart.yaml similarity index 100% rename from stx-migration-rook-ceph-helm/stx-migration-rook-ceph-helm/helm-charts/rook-ceph-provisioner/Chart.yaml rename to helm-charts/custom/migration-rook-ceph-provisioner-helm/migration-rook-ceph-provisioner-helm/migration-rook-ceph-provisioner/Chart.yaml diff --git a/stx-migration-rook-ceph-helm/stx-migration-rook-ceph-helm/helm-charts/rook-ceph-provisioner/templates/NOTES.txt b/helm-charts/custom/migration-rook-ceph-provisioner-helm/migration-rook-ceph-provisioner-helm/migration-rook-ceph-provisioner/templates/NOTES.txt similarity index 100% rename from stx-migration-rook-ceph-helm/stx-migration-rook-ceph-helm/helm-charts/rook-ceph-provisioner/templates/NOTES.txt rename to helm-charts/custom/migration-rook-ceph-provisioner-helm/migration-rook-ceph-provisioner-helm/migration-rook-ceph-provisioner/templates/NOTES.txt diff --git a/stx-migration-rook-ceph-helm/stx-migration-rook-ceph-helm/helm-charts/rook-ceph-provisioner/templates/_helpers.tpl b/helm-charts/custom/migration-rook-ceph-provisioner-helm/migration-rook-ceph-provisioner-helm/migration-rook-ceph-provisioner/templates/_helpers.tpl similarity index 100% rename from stx-migration-rook-ceph-helm/stx-migration-rook-ceph-helm/helm-charts/rook-ceph-provisioner/templates/_helpers.tpl rename to helm-charts/custom/migration-rook-ceph-provisioner-helm/migration-rook-ceph-provisioner-helm/migration-rook-ceph-provisioner/templates/_helpers.tpl diff --git a/stx-migration-rook-ceph-helm/stx-migration-rook-ceph-helm/helm-charts/rook-ceph-provisioner/templates/clusterrole.yaml b/helm-charts/custom/migration-rook-ceph-provisioner-helm/migration-rook-ceph-provisioner-helm/migration-rook-ceph-provisioner/templates/clusterrole.yaml similarity index 100% rename from stx-migration-rook-ceph-helm/stx-migration-rook-ceph-helm/helm-charts/rook-ceph-provisioner/templates/clusterrole.yaml rename to helm-charts/custom/migration-rook-ceph-provisioner-helm/migration-rook-ceph-provisioner-helm/migration-rook-ceph-provisioner/templates/clusterrole.yaml diff --git a/stx-migration-rook-ceph-helm/stx-migration-rook-ceph-helm/helm-charts/rook-ceph-provisioner/templates/clusterrolebinding.yaml b/helm-charts/custom/migration-rook-ceph-provisioner-helm/migration-rook-ceph-provisioner-helm/migration-rook-ceph-provisioner/templates/clusterrolebinding.yaml similarity index 100% rename from stx-migration-rook-ceph-helm/stx-migration-rook-ceph-helm/helm-charts/rook-ceph-provisioner/templates/clusterrolebinding.yaml rename to helm-charts/custom/migration-rook-ceph-provisioner-helm/migration-rook-ceph-provisioner-helm/migration-rook-ceph-provisioner/templates/clusterrolebinding.yaml diff --git a/stx-migration-rook-ceph-helm/stx-migration-rook-ceph-helm/helm-charts/rook-ceph-provisioner/templates/configmap.yaml b/helm-charts/custom/migration-rook-ceph-provisioner-helm/migration-rook-ceph-provisioner-helm/migration-rook-ceph-provisioner/templates/configmap.yaml similarity index 100% rename from stx-migration-rook-ceph-helm/stx-migration-rook-ceph-helm/helm-charts/rook-ceph-provisioner/templates/configmap.yaml rename to helm-charts/custom/migration-rook-ceph-provisioner-helm/migration-rook-ceph-provisioner-helm/migration-rook-ceph-provisioner/templates/configmap.yaml diff --git a/stx-migration-rook-ceph-helm/stx-migration-rook-ceph-helm/helm-charts/rook-ceph-provisioner/templates/deployment-stx-ceph-manager.yaml b/helm-charts/custom/migration-rook-ceph-provisioner-helm/migration-rook-ceph-provisioner-helm/migration-rook-ceph-provisioner/templates/deployment-stx-ceph-manager.yaml similarity index 100% rename from stx-migration-rook-ceph-helm/stx-migration-rook-ceph-helm/helm-charts/rook-ceph-provisioner/templates/deployment-stx-ceph-manager.yaml rename to helm-charts/custom/migration-rook-ceph-provisioner-helm/migration-rook-ceph-provisioner-helm/migration-rook-ceph-provisioner/templates/deployment-stx-ceph-manager.yaml diff --git a/stx-migration-rook-ceph-helm/stx-migration-rook-ceph-helm/helm-charts/rook-ceph-provisioner/templates/job-ceph-mon-audit.yaml b/helm-charts/custom/migration-rook-ceph-provisioner-helm/migration-rook-ceph-provisioner-helm/migration-rook-ceph-provisioner/templates/job-ceph-mon-audit.yaml similarity index 100% rename from stx-migration-rook-ceph-helm/stx-migration-rook-ceph-helm/helm-charts/rook-ceph-provisioner/templates/job-ceph-mon-audit.yaml rename to helm-charts/custom/migration-rook-ceph-provisioner-helm/migration-rook-ceph-provisioner-helm/migration-rook-ceph-provisioner/templates/job-ceph-mon-audit.yaml diff --git a/stx-migration-rook-ceph-helm/stx-migration-rook-ceph-helm/helm-charts/rook-ceph-provisioner/templates/job-ceph-osd-audit.yaml b/helm-charts/custom/migration-rook-ceph-provisioner-helm/migration-rook-ceph-provisioner-helm/migration-rook-ceph-provisioner/templates/job-ceph-osd-audit.yaml similarity index 100% rename from stx-migration-rook-ceph-helm/stx-migration-rook-ceph-helm/helm-charts/rook-ceph-provisioner/templates/job-ceph-osd-audit.yaml rename to helm-charts/custom/migration-rook-ceph-provisioner-helm/migration-rook-ceph-provisioner-helm/migration-rook-ceph-provisioner/templates/job-ceph-osd-audit.yaml diff --git a/stx-migration-rook-ceph-helm/stx-migration-rook-ceph-helm/helm-charts/rook-ceph-provisioner/templates/job-stx-ceph-mgr-provision.yaml b/helm-charts/custom/migration-rook-ceph-provisioner-helm/migration-rook-ceph-provisioner-helm/migration-rook-ceph-provisioner/templates/job-stx-ceph-mgr-provision.yaml similarity index 100% rename from stx-migration-rook-ceph-helm/stx-migration-rook-ceph-helm/helm-charts/rook-ceph-provisioner/templates/job-stx-ceph-mgr-provision.yaml rename to helm-charts/custom/migration-rook-ceph-provisioner-helm/migration-rook-ceph-provisioner-helm/migration-rook-ceph-provisioner/templates/job-stx-ceph-mgr-provision.yaml diff --git a/stx-migration-rook-ceph-helm/stx-migration-rook-ceph-helm/helm-charts/rook-ceph-provisioner/templates/post-install-host-provision.yaml b/helm-charts/custom/migration-rook-ceph-provisioner-helm/migration-rook-ceph-provisioner-helm/migration-rook-ceph-provisioner/templates/post-install-host-provision.yaml similarity index 100% rename from stx-migration-rook-ceph-helm/stx-migration-rook-ceph-helm/helm-charts/rook-ceph-provisioner/templates/post-install-host-provision.yaml rename to helm-charts/custom/migration-rook-ceph-provisioner-helm/migration-rook-ceph-provisioner-helm/migration-rook-ceph-provisioner/templates/post-install-host-provision.yaml diff --git a/stx-migration-rook-ceph-helm/stx-migration-rook-ceph-helm/helm-charts/rook-ceph-provisioner/templates/post-install-rook-provision.yaml b/helm-charts/custom/migration-rook-ceph-provisioner-helm/migration-rook-ceph-provisioner-helm/migration-rook-ceph-provisioner/templates/post-install-rook-provision.yaml similarity index 100% rename from stx-migration-rook-ceph-helm/stx-migration-rook-ceph-helm/helm-charts/rook-ceph-provisioner/templates/post-install-rook-provision.yaml rename to helm-charts/custom/migration-rook-ceph-provisioner-helm/migration-rook-ceph-provisioner-helm/migration-rook-ceph-provisioner/templates/post-install-rook-provision.yaml diff --git a/stx-migration-rook-ceph-helm/stx-migration-rook-ceph-helm/helm-charts/rook-ceph-provisioner/templates/pre-delete-rook-provisioner-cleanup.yaml b/helm-charts/custom/migration-rook-ceph-provisioner-helm/migration-rook-ceph-provisioner-helm/migration-rook-ceph-provisioner/templates/pre-delete-rook-provisioner-cleanup.yaml similarity index 100% rename from stx-migration-rook-ceph-helm/stx-migration-rook-ceph-helm/helm-charts/rook-ceph-provisioner/templates/pre-delete-rook-provisioner-cleanup.yaml rename to helm-charts/custom/migration-rook-ceph-provisioner-helm/migration-rook-ceph-provisioner-helm/migration-rook-ceph-provisioner/templates/pre-delete-rook-provisioner-cleanup.yaml diff --git a/stx-migration-rook-ceph-helm/stx-migration-rook-ceph-helm/helm-charts/rook-ceph-provisioner/templates/role.yaml b/helm-charts/custom/migration-rook-ceph-provisioner-helm/migration-rook-ceph-provisioner-helm/migration-rook-ceph-provisioner/templates/role.yaml similarity index 100% rename from stx-migration-rook-ceph-helm/stx-migration-rook-ceph-helm/helm-charts/rook-ceph-provisioner/templates/role.yaml rename to helm-charts/custom/migration-rook-ceph-provisioner-helm/migration-rook-ceph-provisioner-helm/migration-rook-ceph-provisioner/templates/role.yaml diff --git a/stx-migration-rook-ceph-helm/stx-migration-rook-ceph-helm/helm-charts/rook-ceph-provisioner/templates/rolebinding.yaml b/helm-charts/custom/migration-rook-ceph-provisioner-helm/migration-rook-ceph-provisioner-helm/migration-rook-ceph-provisioner/templates/rolebinding.yaml similarity index 100% rename from stx-migration-rook-ceph-helm/stx-migration-rook-ceph-helm/helm-charts/rook-ceph-provisioner/templates/rolebinding.yaml rename to helm-charts/custom/migration-rook-ceph-provisioner-helm/migration-rook-ceph-provisioner-helm/migration-rook-ceph-provisioner/templates/rolebinding.yaml diff --git a/stx-migration-rook-ceph-helm/stx-migration-rook-ceph-helm/helm-charts/rook-ceph-provisioner/templates/serviceaccount.yaml b/helm-charts/custom/migration-rook-ceph-provisioner-helm/migration-rook-ceph-provisioner-helm/migration-rook-ceph-provisioner/templates/serviceaccount.yaml similarity index 100% rename from stx-migration-rook-ceph-helm/stx-migration-rook-ceph-helm/helm-charts/rook-ceph-provisioner/templates/serviceaccount.yaml rename to helm-charts/custom/migration-rook-ceph-provisioner-helm/migration-rook-ceph-provisioner-helm/migration-rook-ceph-provisioner/templates/serviceaccount.yaml diff --git a/stx-migration-rook-ceph-helm/stx-migration-rook-ceph-helm/helm-charts/rook-ceph-provisioner/values.yaml b/helm-charts/custom/migration-rook-ceph-provisioner-helm/migration-rook-ceph-provisioner-helm/migration-rook-ceph-provisioner/values.yaml similarity index 100% rename from stx-migration-rook-ceph-helm/stx-migration-rook-ceph-helm/helm-charts/rook-ceph-provisioner/values.yaml rename to helm-charts/custom/migration-rook-ceph-provisioner-helm/migration-rook-ceph-provisioner-helm/migration-rook-ceph-provisioner/values.yaml diff --git a/migration-rook-ceph-helm/debian/deb_folder/changelog b/helm-charts/upstream/migration-rook-ceph-helm/debian/deb_folder/changelog similarity index 100% rename from migration-rook-ceph-helm/debian/deb_folder/changelog rename to helm-charts/upstream/migration-rook-ceph-helm/debian/deb_folder/changelog diff --git a/migration-rook-ceph-helm/debian/deb_folder/control b/helm-charts/upstream/migration-rook-ceph-helm/debian/deb_folder/control similarity index 71% rename from migration-rook-ceph-helm/debian/deb_folder/control rename to helm-charts/upstream/migration-rook-ceph-helm/debian/deb_folder/control index 3f6f58b..65510d3 100644 --- a/migration-rook-ceph-helm/debian/deb_folder/control +++ b/helm-charts/upstream/migration-rook-ceph-helm/debian/deb_folder/control @@ -11,5 +11,5 @@ Package: migration-rook-ceph-helm Section: libs Architecture: any Depends: ${misc:Depends} -Description: StarlingX Rook-Ceph Helm Charts - This package contains helm charts for the Rook-Ceph application. \ No newline at end of file +Description: StarlingX Migration Rook-Ceph Helm Charts + This package contains helm charts for the Migration Rook-Ceph application. diff --git a/migration-rook-ceph-helm/debian/deb_folder/copyright b/helm-charts/upstream/migration-rook-ceph-helm/debian/deb_folder/copyright similarity index 100% rename from migration-rook-ceph-helm/debian/deb_folder/copyright rename to helm-charts/upstream/migration-rook-ceph-helm/debian/deb_folder/copyright diff --git a/migration-rook-ceph-helm/debian/deb_folder/migration-rook-ceph-helm.install b/helm-charts/upstream/migration-rook-ceph-helm/debian/deb_folder/migration-rook-ceph-helm.install similarity index 100% rename from migration-rook-ceph-helm/debian/deb_folder/migration-rook-ceph-helm.install rename to helm-charts/upstream/migration-rook-ceph-helm/debian/deb_folder/migration-rook-ceph-helm.install diff --git a/migration-rook-ceph-helm/debian/deb_folder/patches/0001-Removed-cephobjectstore.yaml-from-templates-folder.patch b/helm-charts/upstream/migration-rook-ceph-helm/debian/deb_folder/patches/0001-Removed-cephobjectstore.yaml-from-templates-folder.patch similarity index 100% rename from migration-rook-ceph-helm/debian/deb_folder/patches/0001-Removed-cephobjectstore.yaml-from-templates-folder.patch rename to helm-charts/upstream/migration-rook-ceph-helm/debian/deb_folder/patches/0001-Removed-cephobjectstore.yaml-from-templates-folder.patch diff --git a/migration-rook-ceph-helm/debian/deb_folder/patches/0002-Adding-the-correct-version-to-rook_ceph-and-rook_cep.patch b/helm-charts/upstream/migration-rook-ceph-helm/debian/deb_folder/patches/0002-Adding-the-correct-version-to-rook_ceph-and-rook_cep.patch similarity index 100% rename from migration-rook-ceph-helm/debian/deb_folder/patches/0002-Adding-the-correct-version-to-rook_ceph-and-rook_cep.patch rename to helm-charts/upstream/migration-rook-ceph-helm/debian/deb_folder/patches/0002-Adding-the-correct-version-to-rook_ceph-and-rook_cep.patch diff --git a/migration-rook-ceph-helm/debian/deb_folder/patches/0003-Removing-unnecessary-0.patch b/helm-charts/upstream/migration-rook-ceph-helm/debian/deb_folder/patches/0003-Removing-unnecessary-0.patch similarity index 100% rename from migration-rook-ceph-helm/debian/deb_folder/patches/0003-Removing-unnecessary-0.patch rename to helm-charts/upstream/migration-rook-ceph-helm/debian/deb_folder/patches/0003-Removing-unnecessary-0.patch diff --git a/migration-rook-ceph-helm/debian/deb_folder/patches/0004-Added-chart-for-duplex-preparation.patch b/helm-charts/upstream/migration-rook-ceph-helm/debian/deb_folder/patches/0004-Added-chart-for-duplex-preparation.patch similarity index 100% rename from migration-rook-ceph-helm/debian/deb_folder/patches/0004-Added-chart-for-duplex-preparation.patch rename to helm-charts/upstream/migration-rook-ceph-helm/debian/deb_folder/patches/0004-Added-chart-for-duplex-preparation.patch diff --git a/migration-rook-ceph-helm/debian/deb_folder/patches/series b/helm-charts/upstream/migration-rook-ceph-helm/debian/deb_folder/patches/series similarity index 100% rename from migration-rook-ceph-helm/debian/deb_folder/patches/series rename to helm-charts/upstream/migration-rook-ceph-helm/debian/deb_folder/patches/series diff --git a/migration-rook-ceph-helm/debian/deb_folder/rules b/helm-charts/upstream/migration-rook-ceph-helm/debian/deb_folder/rules similarity index 53% rename from migration-rook-ceph-helm/debian/deb_folder/rules rename to helm-charts/upstream/migration-rook-ceph-helm/debian/deb_folder/rules index 760477f..841a54e 100755 --- a/migration-rook-ceph-helm/debian/deb_folder/rules +++ b/helm-charts/upstream/migration-rook-ceph-helm/debian/deb_folder/rules @@ -1,6 +1,11 @@ #!/usr/bin/make -f 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 = $(shell echo $(DEB_VERSION) | sed 's/-/./' | cut -d '.' -f 1-3) +export CHART_VERSION = $(CHART_BASE_VERSION)+STX.$(PATCH_VERSION) + export ROOT = debian/tmp export APP_FOLDER = $(ROOT)/usr/lib/helm @@ -14,8 +19,9 @@ override_dh_auto_build: cp -r cluster/charts/* migration-rook-ceph-helm cp Makefile migration-rook-ceph-helm - cd migration-rook-ceph-helm && make rook-ceph - cd migration-rook-ceph-helm && make rook-ceph-cluster +# Create the tgz file + cd migration-rook-ceph-helm && make CHART_VERSION=$(CHART_VERSION) rook-ceph + cd migration-rook-ceph-helm && make CHART_VERSION=$(CHART_VERSION) rook-ceph-cluster override_dh_auto_install: # Install the app tar file. diff --git a/migration-rook-ceph-helm/debian/deb_folder/source/format b/helm-charts/upstream/migration-rook-ceph-helm/debian/deb_folder/source/format similarity index 100% rename from migration-rook-ceph-helm/debian/deb_folder/source/format rename to helm-charts/upstream/migration-rook-ceph-helm/debian/deb_folder/source/format diff --git a/migration-rook-ceph-helm/debian/meta_data.yaml b/helm-charts/upstream/migration-rook-ceph-helm/debian/meta_data.yaml similarity index 68% rename from migration-rook-ceph-helm/debian/meta_data.yaml rename to helm-charts/upstream/migration-rook-ceph-helm/debian/meta_data.yaml index 64941f5..40114de 100644 --- a/migration-rook-ceph-helm/debian/meta_data.yaml +++ b/helm-charts/upstream/migration-rook-ceph-helm/debian/meta_data.yaml @@ -9,5 +9,7 @@ src_files: - migration-rook-ceph-helm/files/Makefile revision: dist: $STX_DIST + stx_patch: 3 GITREVCOUNT: - BASE_SRCREV: 10c623509a68acad945d4e0c06a86b3e8486ad5b + BASE_SRCREV: 340492c793197d5a3ceb77cbe1087c3aaea2450a + SRC_DIR: ${MY_REPO}/stx/rook-ceph/helm-charts/upstream/migration-rook-ceph-helm diff --git a/stx-migration-rook-ceph-helm/stx-migration-rook-ceph-helm/helm-charts/Makefile b/helm-charts/upstream/migration-rook-ceph-helm/migration-rook-ceph-helm/files/Makefile similarity index 79% rename from stx-migration-rook-ceph-helm/stx-migration-rook-ceph-helm/helm-charts/Makefile rename to helm-charts/upstream/migration-rook-ceph-helm/migration-rook-ceph-helm/files/Makefile index 293ca3c..a9b44e4 100644 --- a/stx-migration-rook-ceph-helm/stx-migration-rook-ceph-helm/helm-charts/Makefile +++ b/helm-charts/upstream/migration-rook-ceph-helm/migration-rook-ceph-helm/files/Makefile @@ -1,7 +1,7 @@ # # Copyright 2017 The Openstack-Helm Authors. # -# Copyright (c) 2019-2024 Wind River Systems, Inc. +# Copyright (c) 2024 Wind River Systems, Inc. # # SPDX-License-Identifier: Apache-2.0 # @@ -25,18 +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 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-migration-rook-ceph-helm/debian/deb_folder/control b/stx-migration-rook-ceph-helm/debian/deb_folder/control index 7378d26..9461c66 100644 --- a/stx-migration-rook-ceph-helm/debian/deb_folder/control +++ b/stx-migration-rook-ceph-helm/debian/deb_folder/control @@ -5,6 +5,7 @@ Maintainer: StarlingX Developers Build-Depends: debhelper-compat (= 13), helm, migration-rook-ceph-helm, + migration-rook-ceph-provisioner-helm, python3-k8sapp-migration-rook-ceph-wheels, Standards-Version: 4.1.2 Homepage: https://www.starlingx.io diff --git a/stx-migration-rook-ceph-helm/debian/deb_folder/rules b/stx-migration-rook-ceph-helm/debian/deb_folder/rules index 18ebe2f..b86c886 100755 --- a/stx-migration-rook-ceph-helm/debian/deb_folder/rules +++ b/stx-migration-rook-ceph-helm/debian/deb_folder/rules @@ -11,29 +11,36 @@ export REVISION = $(shell echo $(DEB_VERSION) | cut -f 4 -d '.') export APP_NAME = rook-ceph-migration export APP_VERSION = $(RELEASE)-$(REVISION) -export APP_TARBALL_FLUXCD = $(APP_NAME)-$(APP_VERSION).tgz +export APP_TARBALL = $(APP_NAME)-$(APP_VERSION).tgz export HELM_REPO = stx-platform export HELM_FOLDER = /usr/lib/helm -export STAGING = staging-fluxcd +export STAGING = staging %: dh $@ override_dh_auto_build: -# Create the TGZ file. - cd helm-charts && make rook-ceph-provisioner - # Setup staging mkdir -p $(STAGING) cp files/metadata.yaml $(STAGING) cp -Rv fluxcd-manifests $(STAGING) - mkdir -p $(STAGING)/charts - cp helm-charts/*.tgz $(STAGING)/charts - cp $(HELM_FOLDER)/rook-ceph*.tgz $(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:.*$$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)/metadata.yaml @@ -47,7 +54,7 @@ override_dh_auto_build: # Package it up cd $(STAGING) find . -type f ! -name '*.md5' -print0 | xargs -0 md5sum > checksum.md5 - tar -zcf $(APP_TARBALL_FLUXCD) -C $(STAGING)/ . + tar -zcf $(APP_TARBALL) -C $(STAGING)/ . # Cleanup staging rm -fr $(STAGING) @@ -56,7 +63,7 @@ override_dh_auto_install: # Install the app tar file install -d -m 755 $(APP_FOLDER) install -d -m 755 $(INITRD_DIR) - install -p -D -m 755 $(APP_TARBALL_FLUXCD) $(APP_FOLDER) + install -p -D -m 755 $(APP_TARBALL) $(APP_FOLDER) install -m 750 files/rook-mon-exit.sh $(INITRD_DIR)/rook-mon-exit # Prevents dh_fixperms from changing the permissions defined in this file diff --git a/stx-migration-rook-ceph-helm/stx-migration-rook-ceph-helm/fluxcd-manifests/rook-ceph/helmrelease.yaml b/stx-migration-rook-ceph-helm/stx-migration-rook-ceph-helm/fluxcd-manifests/rook-ceph/helmrelease.yaml index b81c97c..e732c29 100644 --- a/stx-migration-rook-ceph-helm/stx-migration-rook-ceph-helm/fluxcd-manifests/rook-ceph/helmrelease.yaml +++ b/stx-migration-rook-ceph-helm/stx-migration-rook-ceph-helm/fluxcd-manifests/rook-ceph/helmrelease.yaml @@ -15,7 +15,7 @@ spec: chart: spec: chart: rook-ceph - version: 1.7.11 + version: REPLACE_HELM_CHART_VERSION sourceRef: kind: HelmRepository name: stx-platform diff --git a/stx-migration-rook-ceph-helm/stx-migration-rook-ceph-helm/helm-charts/rook-ceph-provisioner/requirements.yaml b/stx-migration-rook-ceph-helm/stx-migration-rook-ceph-helm/helm-charts/rook-ceph-provisioner/requirements.yaml deleted file mode 100644 index 718ff84..0000000 --- a/stx-migration-rook-ceph-helm/stx-migration-rook-ceph-helm/helm-charts/rook-ceph-provisioner/requirements.yaml +++ /dev/null @@ -1,5 +0,0 @@ -dependencies: - # - name: rook-ceph - #repository: http://localhost:8879 - #version: 0.1.0 - #alias: rook-operator