From d3472dab95896833276eaac9441a5148959282e9 Mon Sep 17 00:00:00 2001 From: Hediberto Cavalcante da Silva Date: Wed, 7 Jun 2023 21:35:17 +0000 Subject: [PATCH] Initial commit for app-dell-storage This introduces the support for Dell Container Storage Module (CSM) as a StarlingX Application. CSM is made up of multiple components including modules (enterprise capabilities), CSI drivers (storage enablement) and other related applications (deployment, feature controllers, etc). In this first stage we will support: - csi-powerstore - csi-unity - csm-application-mobility - csm-observability - csm-replication Test Plan: PASS: build csi-powerstore-helm, csi-unity-helm, csm-replication-helm, csm-observability-helm, csm-application-mobility-helm, python3-k8sapp-dell-storage and stx-dell-storage-helm packages successfully. PASS: app-dell-storage upload/apply/remove/delete on SX/DX/DX+/Standard using csi-unity through UnityVSA Simulator. PASS: create a PVC using NFS protocol and test read/write access on SX/DX/DX+/Standard using csi-unity through UnityVSA Simulator. Story: 2010693 Task: 48207 Change-Id: I7dc87df04de55fe31a6e52f55733f2afa83ae95e Signed-off-by: Hediberto Cavalcante da Silva Signed-off-by: Gustavo Ornaghi Antunes --- .gitignore | 1 + .zuul.yaml | 128 ++----- HACKING.rst | 17 + bindep.txt | 10 + .../csi-powerstore-helm/files/Makefile | 42 +++ .../debian/deb_folder/changelog | 5 + csi-powerstore-helm/debian/deb_folder/control | 15 + .../debian/deb_folder/copyright | 41 +++ .../deb_folder/csi-powerstore-helm.install | 1 + ...ore-add-default-values-for-templates.patch | 101 ++++++ ...i-powerstore-add-secret-in-templates.patch | 45 +++ ...rstore-add-storageclass-in-templates.patch | 65 ++++ ...erstore-fix-image-path-for-templates.patch | 106 ++++++ ...-csi-powerstore-fix-pull-image-error.patch | 45 +++ ...erstore-add-separator-after-comments.patch | 88 +++++ ...i-powerstore-enabling-csm-resiliency.patch | 203 +++++++++++ ...-powerstore-enabling-csm-replication.patch | 60 ++++ ...add-label-app.starlingx.io-component.patch | 50 +++ .../debian/deb_folder/patches/series | 9 + csi-powerstore-helm/debian/deb_folder/rules | 20 ++ .../debian/deb_folder/source/format | 1 + csi-powerstore-helm/debian/meta_data.yaml | 14 + csi-unity-helm/csi-unity-helm/files/Makefile | 42 +++ csi-unity-helm/debian/deb_folder/changelog | 5 + csi-unity-helm/debian/deb_folder/control | 15 + csi-unity-helm/debian/deb_folder/copyright | 41 +++ .../debian/deb_folder/csi-unity-helm.install | 1 + .../0001-csi-unity-add-apiVersion.patch | 27 ++ ...02-csi-unity-add-secret-in-templates.patch | 42 +++ ...-unity-add-storageclass-in-templates.patch | 74 ++++ ...ity-add-default-values-for-templates.patch | 91 +++++ ...i-unity-fix-image-path-for-templates.patch | 115 ++++++ .../0006-csi-unity-fix-pull-image-error.patch | 45 +++ ...si-unity-add-secretcert-in-templates.patch | 32 ++ ...08-csi-unity-enabling-csm-resiliency.patch | 173 +++++++++ ...add-label-app.starlingx.io-component.patch | 50 +++ .../debian/deb_folder/patches/series | 9 + csi-unity-helm/debian/deb_folder/rules | 20 ++ .../debian/deb_folder/source/format | 1 + csi-unity-helm/debian/meta_data.yaml | 14 + .../files/Makefile | 41 +++ ...1-velero-fix-pull-velero-image-error.patch | 29 ++ ...add-label-app.starlingx.io-component.patch | 27 ++ .../debian/deb_folder/changelog | 5 + .../debian/deb_folder/control | 15 + .../debian/deb_folder/copyright | 41 +++ .../csm-application-mobility-helm.install | 1 + ...ication-mobility-update-dependencies.patch | 37 ++ ...cation-mobility-fix-pull-image-error.patch | 28 ++ ...-mobility-support-dynamic-rbac-value.patch | 44 +++ ...add-label-app.starlingx.io-component.patch | 39 ++ .../debian/deb_folder/patches/series | 4 + .../debian/deb_folder/rules | 31 ++ .../debian/deb_folder/source/format | 1 + .../debian/meta_data.yaml | 21 ++ .../csm-observability-helm/files/Makefile | 42 +++ .../debian/deb_folder/changelog | 5 + .../debian/deb_folder/control | 15 + .../debian/deb_folder/copyright | 41 +++ .../deb_folder/csm-observability-helm.install | 1 + ...ility-remove-cert-manager-dependency.patch | 30 ++ ...m-observability-fix-pull-image-error.patch | 122 +++++++ ...bility-change-powerstore-secret-name.patch | 30 ++ ...ervability-remove-unnecessary-images.patch | 49 +++ ...add-label-app.starlingx.io-component.patch | 91 +++++ .../debian/deb_folder/patches/series | 5 + .../debian/deb_folder/rules | 20 ++ .../debian/deb_folder/source/format | 1 + csm-observability-helm/debian/meta_data.yaml | 14 + .../csm-replication-helm/files/Makefile | 44 +++ .../debian/deb_folder/changelog | 5 + .../debian/deb_folder/control | 15 + .../debian/deb_folder/copyright | 41 +++ .../deb_folder/csm-replication-helm.install | 1 + ...ion-add-default-values-for-templates.patch | 43 +++ ...tion-change-namespace-from-templates.patch | 86 +++++ ...csm-replication-fix-pull-image-error.patch | 31 ++ ...tion-change-image-path-for-templates.patch | 29 ++ ...cation-support-setting-config-values.patch | 35 ++ ...-csm-replication-fix-helm-lint-error.patch | 29 ++ ...add-label-app.starlingx.io-component.patch | 26 ++ ...on-add-replicationgroup-in-templates.patch | 48 +++ .../debian/deb_folder/patches/series | 8 + csm-replication-helm/debian/deb_folder/rules | 20 ++ .../debian/deb_folder/source/format | 1 + csm-replication-helm/debian/meta_data.yaml | 14 + debian_build_layer.cfg | 1 + debian_iso_image.inc | 1 + debian_pkg_dirs | 7 + .../debian/deb_folder/changelog | 5 + .../debian/deb_folder/control | 28 ++ .../debian/deb_folder/copyright | 41 +++ ...python3-k8sapp-dell-storage-wheels.install | 1 + .../python3-k8sapp-dell-storage.install | 2 + .../debian/deb_folder/rules | 31 ++ .../debian/deb_folder/source/format | 1 + .../debian/meta_data.yaml | 9 + .../k8sapp_dell_storage/.gitignore | 35 ++ .../k8sapp_dell_storage/.stestr.conf | 4 + .../k8sapp_dell_storage/LICENSE | 202 +++++++++++ .../k8sapp_dell_storage/README.rst | 7 + .../k8sapp_dell_storage/__init__.py | 5 + .../k8sapp_dell_storage/common/__init__.py | 5 + .../k8sapp_dell_storage/common/constants.py | 27 ++ .../k8sapp_dell_storage/helm/__init__.py | 5 + .../helm/csi_powerstore.py | 60 ++++ .../k8sapp_dell_storage/helm/csi_unity.py | 60 ++++ .../helm/csm_application_mobility.py | 58 +++ .../helm/csm_observability.py | 54 +++ .../helm/csm_replication.py | 58 +++ .../k8sapp_dell_storage/kustomize/__init__.py | 19 + .../kustomize/kustomize_dell_storage.py | 28 ++ .../k8sapp_dell_storage/lifecycle/__init__.py | 0 .../lifecycle/lifecycle_dell_storage.py | 90 +++++ .../k8sapp_dell_storage/tests/__init__.py | 5 + .../tests/test_dell_storage.py | 27 ++ .../k8sapp_dell_storage/tests/test_plugins.py | 30 ++ .../k8sapp_dell_storage/pylint.rc | 336 ++++++++++++++++++ .../k8sapp_dell_storage/requirements.txt | 2 + .../k8sapp_dell_storage/setup.cfg | 49 +++ .../k8sapp_dell_storage/setup.py | 12 + .../k8sapp_dell_storage/test-requirements.txt | 20 ++ .../k8sapp_dell_storage/tox.ini | 181 ++++++++++ .../k8sapp_dell_storage/upper-constraints.txt | 1 + .../debian/deb_folder/changelog | 5 + .../debian/deb_folder/control | 22 ++ .../debian/deb_folder/copyright | 41 +++ stx-dell-storage-helm/debian/deb_folder/rules | 52 +++ .../debian/deb_folder/source/format | 1 + .../deb_folder/stx-dell-storage-helm.install | 1 + stx-dell-storage-helm/debian/meta_data.yaml | 9 + .../stx-dell-storage-helm/files/metadata.yaml | 18 + .../fluxcd-manifests/base/helmrepository.yaml | 13 + .../fluxcd-manifests/base/kustomization.yaml | 8 + .../fluxcd-manifests/base/namespace.yaml | 10 + .../csi-powerstore-static-overrides.yaml | 56 +++ .../csi-powerstore-system-overrides.yaml | 0 .../csi-powerstore/helmrelease.yaml | 36 ++ .../csi-powerstore/kustomization.yaml | 18 + .../csi-unity/csi-unity-static-overrides.yaml | 44 +++ .../csi-unity/csi-unity-system-overrides.yaml | 0 .../csi-unity/helmrelease.yaml | 36 ++ .../csi-unity/kustomization.yaml | 18 + ...application-mobility-static-overrides.yaml | 46 +++ ...application-mobility-system-overrides.yaml | 0 .../csm-application-mobility/helmrelease.yaml | 36 ++ .../kustomization.yaml | 18 + .../csm-observability-static-overrides.yaml | 26 ++ .../csm-observability-system-overrides.yaml | 0 .../csm-observability/helmrelease.yaml | 36 ++ .../csm-observability/kustomization.yaml | 18 + .../csm-replication-static-overrides.yaml | 11 + .../csm-replication-system-overrides.yaml | 0 .../csm-replication/helmrelease.yaml | 36 ++ .../csm-replication/kustomization.yaml | 18 + .../fluxcd-manifests/kustomization.yaml | 16 + test-requirements.txt | 2 +- tox.ini | 16 +- 158 files changed, 5251 insertions(+), 93 deletions(-) create mode 100644 .gitignore create mode 100644 HACKING.rst create mode 100644 bindep.txt create mode 100644 csi-powerstore-helm/csi-powerstore-helm/files/Makefile create mode 100644 csi-powerstore-helm/debian/deb_folder/changelog create mode 100644 csi-powerstore-helm/debian/deb_folder/control create mode 100644 csi-powerstore-helm/debian/deb_folder/copyright create mode 100644 csi-powerstore-helm/debian/deb_folder/csi-powerstore-helm.install create mode 100644 csi-powerstore-helm/debian/deb_folder/patches/0001-csi-powerstore-add-default-values-for-templates.patch create mode 100644 csi-powerstore-helm/debian/deb_folder/patches/0002-csi-powerstore-add-secret-in-templates.patch create mode 100644 csi-powerstore-helm/debian/deb_folder/patches/0003-csi-powerstore-add-storageclass-in-templates.patch create mode 100644 csi-powerstore-helm/debian/deb_folder/patches/0004-csi-powerstore-fix-image-path-for-templates.patch create mode 100644 csi-powerstore-helm/debian/deb_folder/patches/0005-csi-powerstore-fix-pull-image-error.patch create mode 100644 csi-powerstore-helm/debian/deb_folder/patches/0006-csi-powerstore-add-separator-after-comments.patch create mode 100644 csi-powerstore-helm/debian/deb_folder/patches/0007-csi-powerstore-enabling-csm-resiliency.patch create mode 100644 csi-powerstore-helm/debian/deb_folder/patches/0008-csi-powerstore-enabling-csm-replication.patch create mode 100644 csi-powerstore-helm/debian/deb_folder/patches/0009-csi-powerstore-add-label-app.starlingx.io-component.patch create mode 100644 csi-powerstore-helm/debian/deb_folder/patches/series create mode 100644 csi-powerstore-helm/debian/deb_folder/rules create mode 100644 csi-powerstore-helm/debian/deb_folder/source/format create mode 100644 csi-powerstore-helm/debian/meta_data.yaml create mode 100644 csi-unity-helm/csi-unity-helm/files/Makefile create mode 100644 csi-unity-helm/debian/deb_folder/changelog create mode 100644 csi-unity-helm/debian/deb_folder/control create mode 100644 csi-unity-helm/debian/deb_folder/copyright create mode 100644 csi-unity-helm/debian/deb_folder/csi-unity-helm.install create mode 100644 csi-unity-helm/debian/deb_folder/patches/0001-csi-unity-add-apiVersion.patch create mode 100644 csi-unity-helm/debian/deb_folder/patches/0002-csi-unity-add-secret-in-templates.patch create mode 100644 csi-unity-helm/debian/deb_folder/patches/0003-csi-unity-add-storageclass-in-templates.patch create mode 100644 csi-unity-helm/debian/deb_folder/patches/0004-csi-unity-add-default-values-for-templates.patch create mode 100644 csi-unity-helm/debian/deb_folder/patches/0005-csi-unity-fix-image-path-for-templates.patch create mode 100644 csi-unity-helm/debian/deb_folder/patches/0006-csi-unity-fix-pull-image-error.patch create mode 100644 csi-unity-helm/debian/deb_folder/patches/0007-csi-unity-add-secretcert-in-templates.patch create mode 100644 csi-unity-helm/debian/deb_folder/patches/0008-csi-unity-enabling-csm-resiliency.patch create mode 100644 csi-unity-helm/debian/deb_folder/patches/0009-csi-unity-add-label-app.starlingx.io-component.patch create mode 100644 csi-unity-helm/debian/deb_folder/patches/series create mode 100644 csi-unity-helm/debian/deb_folder/rules create mode 100644 csi-unity-helm/debian/deb_folder/source/format create mode 100644 csi-unity-helm/debian/meta_data.yaml create mode 100644 csm-application-mobility-helm/csm-application-mobility-helm/files/Makefile create mode 100644 csm-application-mobility-helm/csm-application-mobility-helm/files/velero/0001-velero-fix-pull-velero-image-error.patch create mode 100644 csm-application-mobility-helm/csm-application-mobility-helm/files/velero/0002-velero-add-label-app.starlingx.io-component.patch create mode 100644 csm-application-mobility-helm/debian/deb_folder/changelog create mode 100644 csm-application-mobility-helm/debian/deb_folder/control create mode 100644 csm-application-mobility-helm/debian/deb_folder/copyright create mode 100644 csm-application-mobility-helm/debian/deb_folder/csm-application-mobility-helm.install create mode 100644 csm-application-mobility-helm/debian/deb_folder/patches/0001-csm-application-mobility-update-dependencies.patch create mode 100644 csm-application-mobility-helm/debian/deb_folder/patches/0002-csm-application-mobility-fix-pull-image-error.patch create mode 100644 csm-application-mobility-helm/debian/deb_folder/patches/0003-csm-application-mobility-support-dynamic-rbac-value.patch create mode 100644 csm-application-mobility-helm/debian/deb_folder/patches/0004-csm-application-mobility-add-label-app.starlingx.io-component.patch create mode 100644 csm-application-mobility-helm/debian/deb_folder/patches/series create mode 100644 csm-application-mobility-helm/debian/deb_folder/rules create mode 100644 csm-application-mobility-helm/debian/deb_folder/source/format create mode 100644 csm-application-mobility-helm/debian/meta_data.yaml create mode 100644 csm-observability-helm/csm-observability-helm/files/Makefile create mode 100644 csm-observability-helm/debian/deb_folder/changelog create mode 100644 csm-observability-helm/debian/deb_folder/control create mode 100644 csm-observability-helm/debian/deb_folder/copyright create mode 100644 csm-observability-helm/debian/deb_folder/csm-observability-helm.install create mode 100644 csm-observability-helm/debian/deb_folder/patches/0001-csm-observability-remove-cert-manager-dependency.patch create mode 100644 csm-observability-helm/debian/deb_folder/patches/0002-csm-observability-fix-pull-image-error.patch create mode 100644 csm-observability-helm/debian/deb_folder/patches/0003-csm-observability-change-powerstore-secret-name.patch create mode 100644 csm-observability-helm/debian/deb_folder/patches/0004-csm-observability-remove-unnecessary-images.patch create mode 100644 csm-observability-helm/debian/deb_folder/patches/0005-csm-observability-add-label-app.starlingx.io-component.patch create mode 100644 csm-observability-helm/debian/deb_folder/patches/series create mode 100644 csm-observability-helm/debian/deb_folder/rules create mode 100644 csm-observability-helm/debian/deb_folder/source/format create mode 100644 csm-observability-helm/debian/meta_data.yaml create mode 100644 csm-replication-helm/csm-replication-helm/files/Makefile create mode 100644 csm-replication-helm/debian/deb_folder/changelog create mode 100644 csm-replication-helm/debian/deb_folder/control create mode 100644 csm-replication-helm/debian/deb_folder/copyright create mode 100644 csm-replication-helm/debian/deb_folder/csm-replication-helm.install create mode 100644 csm-replication-helm/debian/deb_folder/patches/0001-csm-replication-add-default-values-for-templates.patch create mode 100644 csm-replication-helm/debian/deb_folder/patches/0002-csm-replication-change-namespace-from-templates.patch create mode 100644 csm-replication-helm/debian/deb_folder/patches/0003-csm-replication-fix-pull-image-error.patch create mode 100644 csm-replication-helm/debian/deb_folder/patches/0004-csm-replication-change-image-path-for-templates.patch create mode 100644 csm-replication-helm/debian/deb_folder/patches/0005-csm-replication-support-setting-config-values.patch create mode 100644 csm-replication-helm/debian/deb_folder/patches/0006-csm-replication-fix-helm-lint-error.patch create mode 100644 csm-replication-helm/debian/deb_folder/patches/0007-csm-replication-add-label-app.starlingx.io-component.patch create mode 100644 csm-replication-helm/debian/deb_folder/patches/0008-csm-replication-add-replicationgroup-in-templates.patch create mode 100644 csm-replication-helm/debian/deb_folder/patches/series create mode 100644 csm-replication-helm/debian/deb_folder/rules create mode 100644 csm-replication-helm/debian/deb_folder/source/format create mode 100644 csm-replication-helm/debian/meta_data.yaml create mode 100644 debian_build_layer.cfg create mode 100644 debian_iso_image.inc create mode 100644 debian_pkg_dirs create mode 100644 python3-k8sapp-dell-storage/debian/deb_folder/changelog create mode 100644 python3-k8sapp-dell-storage/debian/deb_folder/control create mode 100644 python3-k8sapp-dell-storage/debian/deb_folder/copyright create mode 100644 python3-k8sapp-dell-storage/debian/deb_folder/python3-k8sapp-dell-storage-wheels.install create mode 100644 python3-k8sapp-dell-storage/debian/deb_folder/python3-k8sapp-dell-storage.install create mode 100644 python3-k8sapp-dell-storage/debian/deb_folder/rules create mode 100644 python3-k8sapp-dell-storage/debian/deb_folder/source/format create mode 100644 python3-k8sapp-dell-storage/debian/meta_data.yaml create mode 100644 python3-k8sapp-dell-storage/k8sapp_dell_storage/.gitignore create mode 100644 python3-k8sapp-dell-storage/k8sapp_dell_storage/.stestr.conf create mode 100644 python3-k8sapp-dell-storage/k8sapp_dell_storage/LICENSE create mode 100644 python3-k8sapp-dell-storage/k8sapp_dell_storage/README.rst create mode 100644 python3-k8sapp-dell-storage/k8sapp_dell_storage/k8sapp_dell_storage/__init__.py create mode 100644 python3-k8sapp-dell-storage/k8sapp_dell_storage/k8sapp_dell_storage/common/__init__.py create mode 100644 python3-k8sapp-dell-storage/k8sapp_dell_storage/k8sapp_dell_storage/common/constants.py create mode 100644 python3-k8sapp-dell-storage/k8sapp_dell_storage/k8sapp_dell_storage/helm/__init__.py create mode 100644 python3-k8sapp-dell-storage/k8sapp_dell_storage/k8sapp_dell_storage/helm/csi_powerstore.py create mode 100644 python3-k8sapp-dell-storage/k8sapp_dell_storage/k8sapp_dell_storage/helm/csi_unity.py create mode 100644 python3-k8sapp-dell-storage/k8sapp_dell_storage/k8sapp_dell_storage/helm/csm_application_mobility.py create mode 100644 python3-k8sapp-dell-storage/k8sapp_dell_storage/k8sapp_dell_storage/helm/csm_observability.py create mode 100644 python3-k8sapp-dell-storage/k8sapp_dell_storage/k8sapp_dell_storage/helm/csm_replication.py create mode 100644 python3-k8sapp-dell-storage/k8sapp_dell_storage/k8sapp_dell_storage/kustomize/__init__.py create mode 100644 python3-k8sapp-dell-storage/k8sapp_dell_storage/k8sapp_dell_storage/kustomize/kustomize_dell_storage.py create mode 100644 python3-k8sapp-dell-storage/k8sapp_dell_storage/k8sapp_dell_storage/lifecycle/__init__.py create mode 100644 python3-k8sapp-dell-storage/k8sapp_dell_storage/k8sapp_dell_storage/lifecycle/lifecycle_dell_storage.py create mode 100644 python3-k8sapp-dell-storage/k8sapp_dell_storage/k8sapp_dell_storage/tests/__init__.py create mode 100644 python3-k8sapp-dell-storage/k8sapp_dell_storage/k8sapp_dell_storage/tests/test_dell_storage.py create mode 100644 python3-k8sapp-dell-storage/k8sapp_dell_storage/k8sapp_dell_storage/tests/test_plugins.py create mode 100644 python3-k8sapp-dell-storage/k8sapp_dell_storage/pylint.rc create mode 100644 python3-k8sapp-dell-storage/k8sapp_dell_storage/requirements.txt create mode 100644 python3-k8sapp-dell-storage/k8sapp_dell_storage/setup.cfg create mode 100644 python3-k8sapp-dell-storage/k8sapp_dell_storage/setup.py create mode 100644 python3-k8sapp-dell-storage/k8sapp_dell_storage/test-requirements.txt create mode 100644 python3-k8sapp-dell-storage/k8sapp_dell_storage/tox.ini create mode 100644 python3-k8sapp-dell-storage/k8sapp_dell_storage/upper-constraints.txt create mode 100644 stx-dell-storage-helm/debian/deb_folder/changelog create mode 100644 stx-dell-storage-helm/debian/deb_folder/control create mode 100644 stx-dell-storage-helm/debian/deb_folder/copyright create mode 100644 stx-dell-storage-helm/debian/deb_folder/rules create mode 100644 stx-dell-storage-helm/debian/deb_folder/source/format create mode 100644 stx-dell-storage-helm/debian/deb_folder/stx-dell-storage-helm.install create mode 100644 stx-dell-storage-helm/debian/meta_data.yaml create mode 100644 stx-dell-storage-helm/stx-dell-storage-helm/files/metadata.yaml create mode 100644 stx-dell-storage-helm/stx-dell-storage-helm/fluxcd-manifests/base/helmrepository.yaml create mode 100644 stx-dell-storage-helm/stx-dell-storage-helm/fluxcd-manifests/base/kustomization.yaml create mode 100644 stx-dell-storage-helm/stx-dell-storage-helm/fluxcd-manifests/base/namespace.yaml create mode 100644 stx-dell-storage-helm/stx-dell-storage-helm/fluxcd-manifests/csi-powerstore/csi-powerstore-static-overrides.yaml create mode 100644 stx-dell-storage-helm/stx-dell-storage-helm/fluxcd-manifests/csi-powerstore/csi-powerstore-system-overrides.yaml create mode 100644 stx-dell-storage-helm/stx-dell-storage-helm/fluxcd-manifests/csi-powerstore/helmrelease.yaml create mode 100644 stx-dell-storage-helm/stx-dell-storage-helm/fluxcd-manifests/csi-powerstore/kustomization.yaml create mode 100644 stx-dell-storage-helm/stx-dell-storage-helm/fluxcd-manifests/csi-unity/csi-unity-static-overrides.yaml create mode 100644 stx-dell-storage-helm/stx-dell-storage-helm/fluxcd-manifests/csi-unity/csi-unity-system-overrides.yaml create mode 100644 stx-dell-storage-helm/stx-dell-storage-helm/fluxcd-manifests/csi-unity/helmrelease.yaml create mode 100644 stx-dell-storage-helm/stx-dell-storage-helm/fluxcd-manifests/csi-unity/kustomization.yaml create mode 100644 stx-dell-storage-helm/stx-dell-storage-helm/fluxcd-manifests/csm-application-mobility/csm-application-mobility-static-overrides.yaml create mode 100644 stx-dell-storage-helm/stx-dell-storage-helm/fluxcd-manifests/csm-application-mobility/csm-application-mobility-system-overrides.yaml create mode 100644 stx-dell-storage-helm/stx-dell-storage-helm/fluxcd-manifests/csm-application-mobility/helmrelease.yaml create mode 100644 stx-dell-storage-helm/stx-dell-storage-helm/fluxcd-manifests/csm-application-mobility/kustomization.yaml create mode 100644 stx-dell-storage-helm/stx-dell-storage-helm/fluxcd-manifests/csm-observability/csm-observability-static-overrides.yaml create mode 100644 stx-dell-storage-helm/stx-dell-storage-helm/fluxcd-manifests/csm-observability/csm-observability-system-overrides.yaml create mode 100644 stx-dell-storage-helm/stx-dell-storage-helm/fluxcd-manifests/csm-observability/helmrelease.yaml create mode 100644 stx-dell-storage-helm/stx-dell-storage-helm/fluxcd-manifests/csm-observability/kustomization.yaml create mode 100644 stx-dell-storage-helm/stx-dell-storage-helm/fluxcd-manifests/csm-replication/csm-replication-static-overrides.yaml create mode 100644 stx-dell-storage-helm/stx-dell-storage-helm/fluxcd-manifests/csm-replication/csm-replication-system-overrides.yaml create mode 100644 stx-dell-storage-helm/stx-dell-storage-helm/fluxcd-manifests/csm-replication/helmrelease.yaml create mode 100644 stx-dell-storage-helm/stx-dell-storage-helm/fluxcd-manifests/csm-replication/kustomization.yaml create mode 100644 stx-dell-storage-helm/stx-dell-storage-helm/fluxcd-manifests/kustomization.yaml diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..84d28ed --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +.tox \ No newline at end of file diff --git a/.zuul.yaml b/.zuul.yaml index 618d9bb..2ac5d40 100644 --- a/.zuul.yaml +++ b/.zuul.yaml @@ -3,101 +3,47 @@ check: jobs: - openstack-tox-linters + - k8sapp-dell-storage-tox-py39 + - k8sapp-dell-storage-tox-pylint gate: jobs: - openstack-tox-linters - post: - jobs: - - stx-app-dell-storage-upload-git-mirror + - k8sapp-dell-storage-tox-py39 + - k8sapp-dell-storage-tox-pylint - job: - name: stx-app-dell-storage-upload-git-mirror - parent: upload-git-mirror - description: > - Mirrors opendev.org/starlingx/app-dell-storage to - github.com/starlingx/app-dell-storage + name: k8sapp-dell-storage-tox-py39 + parent: openstack-tox-py39 + description: | + Run py39 test for k8sapp_dell_storage + nodeset: debian-bullseye + required-projects: + - starlingx/config + - starlingx/fault + - starlingx/update + - starlingx/utilities + - starlingx/root + files: + - python3-k8sapp-dell-storage/* vars: - git_mirror_repository: starlingx/app-dell-storage - secrets: - - name: git_mirror_credentials - secret: stx-app-dell-storage-github-secret - pass-to-parent: true + tox_extra_args: -c python3-k8sapp-dell-storage/k8sapp_dell_storage/tox.ini + tox_constraints_file: '{{ ansible_user_dir }}/src/opendev.org/starlingx/root/build-tools/requirements/debian/upper-constraints.txt' -- secret: - name: stx-app-dell-storage-github-secret - data: - user: git - host: github.com - # yamllint disable-line rule:line-length - host_key: github.com ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABgQCj7ndNxQowgcQnjshcLrqPEiiphnt+VTTvDP6mHBL9j1aNUkY4Ue1gvwnGLVlOhGeYrnZaMgRK6+PKCUXaDbC7qtbW8gIkhL7aGCsOr/C56SJMy/BCZfxd1nWzAOxSDPgVsmerOBYfNqltV9/hWCqBywINIR+5dIg6JTJ72pcEpEjcYgXkE2YEFXV1JHnsKgbLWNlhScqb2UmyRkQyytRLtL+38TGxkxCflmO+5Z8CSSNY7GidjMIZ7Q4zMjA2n1nGrlTDkzwDCsw+wqFPGQA179cnfGWOWRVruj16z6XyvxvjJwbz0wQZ75XK5tKSb7FNyeIEs4TT4jk+S4dhPeAUC5y+bDYirYgM4GC7uEnztnZyaVWQ7B381AK4Qdrwt51ZqExKbQpTUNn+EjqoTwvqNj4kqx5QUCI0ThS/YkOxJCXmPUWZbhjpCg56i+2aB6CmK2JGhn57K5mj0MNdBXA4/WnwH6XoPWJzK5Nyu2zB3nAZp+S5hpQs+p1vN1/wsjk= - ssh_key: !encrypted/pkcs1-oaep - - jhwFjDofZyEeURAtopcsutyAJulUM3+GXsc/QgSI0jMrTNXgfvWwSZvHV4mQ77ozx2sHH - cWdSvAYS8qk2kwiIB2NFty+vKD/PoWYIhdcZHxWe2BgIBuLEVxBu5CnaWtDszWHznefUX - fOJfSUcbon0TUYrBLCbqIJWD+IJnPssbmDb0nfgn2kUIyZKS/4lGw3+vyNW/y3VQseOaQ - erRwmhZu/nU7h/1twJFlnuEN3josO5KPNIFHIXuzLP/T8TUqAykhgnTv5IG+ZkmlgJCc9 - UbIfYBiudchQ2XDv38aFdWv9FsbAz/YFeEQl5eCRYwpGk23HyElj1g6177YP5cdHdoYXk - ix/DDB1jA27eNNXMUtCvaIhmtks4mnwjKdGmXI3PPNGrCrbwHMoKzTh8gnnMJ1oVkTS5/ - DWtXBLU4bY38Ohhsa1L/QFekHB0jydcPiU2SyGozP1S78zpedDMn3i2Ut3jnZ0VS6yaeL - XzEOYQ37aunqFG0oj9pSJ/hfGxcOXLXblZfe9twgtg+zcHKEg1q/6J9kevnJNXEPyWEJ/ - qhuJS6BfTVJ6BjBa9Rh1wW+6XY2PchbwA8KbqBIwlbzrutw4d57xGeaV6GXeCRc35ptu+ - bUffk5khbSQd76u7UmfExIitMnsm6gbDBxruihjPMIqU8GQwaQM4WoIh6IQXIM= - - K4G7UgOOe/dxgV0tFieu/QUFhLfKQEDh3qw05QYtRmuRXkj6xWUt3J+vgJ5YAw6LErDXc - /w0DOExh+Aw2GXLlqYXrhcfPHx8NufNiyz8vCrOsoV9Rj7CQoMOrBcKevT4GoikM3PRk+ - phahWBzdWlpQOg4ouu/myhxY/1cE7zyA46VeUR2ezSlZoPbkG0fjEJmTDzGnnWEeG/oyM - NjDDIkyNihPCJR5oYbphjYFPA6AgPZg2rGrSvx1HPHdw0Obh0+ExljhmgSqWIMQNfQNOj - b3HlJV5hdgId5SsOhqrtrhWQGDMYSh3Ou6A13Kpbeoju18X0cHYNjPR6R7bv6CbFka/sO - sm1C5JUaQva4y7kZkMOHQxbsmCwq6pGZVz9SJwAGSdz7ola5rpxBXdUDhUs5mbSk+BeBa - 5dKWEkd3R6/LOh+Ohefr0l/NcrcJIEb1MU0oMDxMe06jB1Xdj5w3JZ+T9z7yKiFYGsbhm - tg5euJMZ8EP6DIF++fnIoWW8YEpDFZ9dzA9gDjY1A+o9JNXOUJGXTupnLMi4PyBKEWp0t - Y9la5ywfYekj2NE61FzTN4r8KKks+qqNLNIlBZ4z92KN+VBn4A/slL9uLdjDcMZM6Rn8d - Yuxasg1A5mNfZuXTKEoa7B8fa46HqZxYZ/KI2nSAdvEpHIG3nRLgyj1suk1jvM= - - KD6OlWoDGHcPfjMTYqMgBzt32MJoBTpQQFE4uLEZY7cJSi6xb0Va3clZoDv8u7mgw+i2j - 53c35iUTuU00L0/9KWQaNBFWrTXrThULItKXk0BJCTYeTl5+ruFlkmSPKO4xm+Hug97mF - jAZv6aJPReSCQBl/fGE4hwIIHcBUeMwehcNkHkBjAOFCqBUdoewqBo7TVYYApKAn1fkXx - qiM7MZsI7ERHmYyyhtNCbFaP3lm2+Eqrooz+yjkWvCIS40fRQNvLvgDmGhYnif+NBzLAr - 0UavVAiyH4U10cFpHdPvaVYE8EVf2t0JiU3odrRY8DSGfhrFOsxx5cFkHKRMGTjHhOQ4R - vJEhRtgsXNfPABJNsIOPkWLfPAXNt8I7aMDpM5AyZ3uy+el5WyDXIWsfHnqoVJWgzHJpb - Tl/B6tFK6JyMyzXoF4g1hXu4vRmsFrBnk7fqGf09ExUYn2REUqckUjc0j7dtt06n405Xb - H5oCjaTdL5KqC7OHtc2HG4mW5FFZP7iwV+7OkphE/szBSkRUqiYQPrMa6muwXp9sLT+oV - NgfRU8YAvtDniEC0Jx5EWmU6O5oWDs3jtwe3Yob3mPOFVf9JltxgvSdLKHqhC7v3GD1k8 - L1Tp6hYDG3oi/lEovoOEf0nH6LAraX9YNAIQmsHEjLNSm8MAmm7vWW1ZL6meH8= - - S1vIeJ7mqrzd7vUt5OShMPzj6/oYHkw//0A+soxQZGt769pQbqPBYBSxFiDfgl/5Iz3IV - 2GXCsq9skLqu4Hw6NjPKufB4wW6uYkDKaQjNyE2HIj4vHtK0LMtw4UHhxHgvdrvGVwbOP - WtxSI8lmTyl6qVUPIe0mSHJzEcINT0jPuZcbQ8EnQYmr20/cVvY9nWaybC4vmnaTHFYR8 - m9NawZMRqYwKtJC7t6bNQt7WXfW/690EQr3+D/A0VAZlQ04MPDZ4AYsf9/Dtx0Aih0NXo - 0AnTAISTzM5phgaR/qRzZ7B7M7uG6h/brKil1jRpO5UpbnJ661ibj/5WiJPsYGjnfa/Dw - uF0e+UmGWdumBjZY5V1VKt6kH5RfCE1ttbamt8/s1QHiIPmTiq8GzF3tFa22a28GSKxNl - LhFjCfnX0W+8j2Or57wVV649cJw48Nij1SvCO1dOIPH0AKKF13QTWh+kMunSXKEodaMZH - hmubF5bs7DzutHC5kScvNihWjHfmJnkCW9wXt8ZVBzyNqcvrYFPxNItnB9q5l8xZd5lJs - JFp++hsNYnpFMRV6zbT0cYgf0jRyAFlUs6jJl6KhQgKswxV36DaOA+X0pkBpwJXC7187r - o/BBLVzgAjiSYXhgB45LPI1POWZMDXD7NLku2pSO98aCvmHdOHMNrp4PwWoT7A= - - VIHbwn9a9gzrcN6pLgb3Cxt9x87CojHSj2DC3QIvvcQkv554o0EXZ1W8EykOizNyzUca4 - CBbBZJlkNmR8o4+G2IoZ9fd4rYfsgFyBX6dVbVYOwzUoawoTTa0YnGLJYdX1z4kUaVCs0 - 9LA2X7Lq4XplkK0cFEa+l6iYaUTco42uaVv6bh0opA3DeqR39pv/btiIf6VvI7V8Se4+1 - rL6J3qc0hvwr3QDq8XVoXMvQbgb3p40Dq7kpRLOg86HtZ+JdY/KwFA+q6tfvNnuGPM0g6 - YkIlKCeqNpWxewvm6y+Id3XEO4jI/WwPbbyTp9xqdluRKtDZRMGXVSlsAuFCiCsFMC2ef - lNlA5WjC9oBWTyDWC2g7a9/67LBJVgZIFRutig/GQbGSQINNRhZZ7DIZyxy+6LBPDSEub - kaYbBPywhX8uxAE7Xn7+j9+ak4on2KMYoIcT/P7aoMi4kX2p2gWUWxIfugVYDCQ4oRlOx - BoaSt9wVYlQC6JUSiCEmmiXNs6miLZE1dcyl/duOuOQzH4U+ro/x3Ri5fd0HLUDSNBPze - DFm3iCmrXJMF4Go5yPM/UCtjtRS/Ln/yxmHccNqurL0ROrrVEmlJ4aJAYFyDCVHr9eXoS - fY533WE/jWwpUmY5Ahr0PWMeIBKfx7Cje9J+WWXiflQfOq7ggipP7nFacZBNiU= - - iCB/xKlw0ipSlzFzfxVnU6q3dFxs6GJhUlTey3gBmyZ99puw7s8gLGSdlxl/lSEHDfO2w - 6ioAi7EJzntIp1ch/JbYsZayczhvUZjnSHdQr8blR2XaxI4EA/JlsBpBzuowKcE8LvKAg - pGGjeQ/n+5ecBpKSSELqpLy7RHlAv/cqGL4oyJg1lErqwEttmkMNIbNRlO7H0GuVMAHjU - ReiA/fygPgq8U8MMD6J3oDA4p6pT45tZeTjfacFFymCTrSGVI9dSAYPswonsCSuzG3Dxc - 2cLZ1D5ZMoVw7Tk3+FZqg1df+LnhkAUvntKP98ES+Icwf4cw6HrLiqIG2575yHyLinW0W - X+4uOLFTDqE/lhypluGD2i//x0BsAsJ+iqF/ac0GMzxp996SLyoTOMrYNP4/CNqxHPW+T - nNXFUgfWOVHb2edVDisDmlviT21t3G33jXrt8X5epnbLU/y/dyuU9KWdG4UfqqHVWamKc - vU9XVNRHfwq0SF7t1zKYAs3LEI7lW4hYHgz4xMBIqiM8gUsCdeh4M/xhiBWBaYHG6Q/ax - MSLNjudPg+T5N+2DpqiOS76O0Fbx7nefPtV/I/VyfTMT7SW4ZX8slSBRCTmR+wGcgBbu1 - SgT19LMkuo3CxWWobBKSSSF9JbJquGZKdSmQjKlbAQhxZlukpljdqxW4XrKP8A= - - o9ik/siGydKWn149s3r3qbRA2y8EqHhZh93Y6FU4rmjogKARxs66OOVGHIn5AB2J6x/Jx - hGnz0eXmv1or+tJV80sfAzxP2csLQu8plQKsTHF2tAnQvQ1jwmOlt9V9WNic1Txaabsz/ - FzRgM02A14RFrVxWOh8+c9Q+18fXnLRk/3lJFJa2M5FIcSDrqNWoTbCMz7uLPfRtp7GRn - r+nWkjBv4hQmz3ZP9sr75uSFtcfQ6AnbrAjJGkcvMha5uDO7FuQcfw2qeEs/OmKy/v4ij - /pd6KIGiN1KdG7L+St9UyYOvRWe9p7J1apFSLXtcSD97sNwXPXYhidmeKxs6L3GFaAOXb - TEyRbV5OCUwnEsgXz7JXA3Hn5AP0bXoLm1SYYd1VzwMYc96nOFljdFKoHlBSDYwvHTtHu - fZtQB+E/Y4CQP/CK+yTWjSFkC0Vuc/IdKuVUymyh7mkEZckWF3UFZiYY1ncMvMJdWT7eE - wQgV3X9PQgdf2xTTvTlgVQwdzCQ7IsidgX+nfQvJRslpfngfByQ4UZhMptD93B38XtUlZ - TG+2EiDQRFgUeuy2j+PuREsQl+VNEtBoNm9/3lz1SokYHPUZi97XkwX+nACetdQl7A51N - bLntQcm9C8TnXjzHsnCGGNgyK+Xzyb1uNK703Yl9BWp5jAEsrA7LeZwdEmnbxU= +- job: + name: k8sapp-dell-storage-tox-pylint + parent: tox + description: | + Run pylint test for k8sapp_dell_storage + nodeset: debian-bullseye + required-projects: + - starlingx/config + - starlingx/fault + - starlingx/update + - starlingx/utilities + - starlingx/root + files: + - python3-k8sapp-dell-storage/* + vars: + tox_envlist: pylint + tox_extra_args: -c python3-k8sapp-dell-storage/k8sapp_dell_storage/tox.ini + tox_constraints_file: '{{ ansible_user_dir }}/src/opendev.org/starlingx/root/build-tools/requirements/debian/upper-constraints.txt' diff --git a/HACKING.rst b/HACKING.rst new file mode 100644 index 0000000..d0d7bb0 --- /dev/null +++ b/HACKING.rst @@ -0,0 +1,17 @@ +StarlingX App-Dell-Store Style Commandments +================================================ + +- Step 1: Read the OpenStack style commandments + https://docs.openstack.org/hacking/latest/ +- Step 2: Read on + +App-Dell-Store Specific Commandments +----------------------------------------- + +None so far + +Running tests +------------- +The approach to running tests is to simply run the command ``tox``. This will +create virtual environments, populate them with dependencies and run all of +the tests that OpenStack CI systems run. diff --git a/bindep.txt b/bindep.txt new file mode 100644 index 0000000..3ffe69f --- /dev/null +++ b/bindep.txt @@ -0,0 +1,10 @@ +# This is a cross-platform list tracking distribution packages needed for install and tests; +# see https://docs.openstack.org/infra/bindep/ for additional information. + +libffi-dev [platform:dpkg] +libldap2-dev [platform:dpkg] +libxml2-dev [platform:dpkg] +libxslt1-dev [platform:dpkg] +libsasl2-dev [platform:dpkg] +libffi-devel [platform:rpm] +python3-all-dev [platform:dpkg] diff --git a/csi-powerstore-helm/csi-powerstore-helm/files/Makefile b/csi-powerstore-helm/csi-powerstore-helm/files/Makefile new file mode 100644 index 0000000..ef3a429 --- /dev/null +++ b/csi-powerstore-helm/csi-powerstore-helm/files/Makefile @@ -0,0 +1,42 @@ +# +# Copyright 2017 The Openstack-Helm Authors. +# +# Copyright (c) 2023 Wind River Systems, Inc. +# +# SPDX-License-Identifier: Apache-2.0 +# +# It's necessary to set this because some environments don't link sh -> bash. +SHELL := /bin/bash +TASK := build + +EXCLUDES := doc tests tools logs tmp +CHARTS := $(filter-out $(EXCLUDES), $(patsubst %/.,%,$(wildcard */.))) + +.PHONY: $(EXCLUDES) $(CHARTS) + +all: $(CHARTS) + +$(CHARTS): + @if [ -d $@ ]; then \ + echo; \ + echo "===== Processing [$@] chart ====="; \ + make $(TASK)-$@; \ + fi + +init-%: + if [ -f $*/Makefile ]; then make -C $*; fi + +lint-%: init-% + if [ -d $* ]; then helm lint $*; fi + +build-%: lint-% + if [ -d $* ]; then helm package $*; 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/csi-powerstore-helm/debian/deb_folder/changelog b/csi-powerstore-helm/debian/deb_folder/changelog new file mode 100644 index 0000000..18c0ebd --- /dev/null +++ b/csi-powerstore-helm/debian/deb_folder/changelog @@ -0,0 +1,5 @@ +csi-powerstore-helm (2.6-0) unstable; urgency=medium + + * Initial release. + + -- Hediberto Cavalcante da Silva Thu, 30 Mar 2023 15:15:00 +0000 diff --git a/csi-powerstore-helm/debian/deb_folder/control b/csi-powerstore-helm/debian/deb_folder/control new file mode 100644 index 0000000..7835218 --- /dev/null +++ b/csi-powerstore-helm/debian/deb_folder/control @@ -0,0 +1,15 @@ +Source: csi-powerstore-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: csi-powerstore-helm +Section: libs +Architecture: any +Depends: ${misc:Depends} +Description: StarlingX Dell PowerStore CSI Helm Charts + This package contains helm charts for the Dell PowerStore CSI. diff --git a/csi-powerstore-helm/debian/deb_folder/copyright b/csi-powerstore-helm/debian/deb_folder/copyright new file mode 100644 index 0000000..cd07b31 --- /dev/null +++ b/csi-powerstore-helm/debian/deb_folder/copyright @@ -0,0 +1,41 @@ +Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ +Upstream-Name: csi-powerstore-helm +Source: https://opendev.org/starlingx/app-dell-storage/ + +Files: * +Copyright: (c) 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: 2022 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/csi-powerstore-helm/debian/deb_folder/csi-powerstore-helm.install b/csi-powerstore-helm/debian/deb_folder/csi-powerstore-helm.install new file mode 100644 index 0000000..8a0c6de --- /dev/null +++ b/csi-powerstore-helm/debian/deb_folder/csi-powerstore-helm.install @@ -0,0 +1 @@ +usr/lib/helm/* diff --git a/csi-powerstore-helm/debian/deb_folder/patches/0001-csi-powerstore-add-default-values-for-templates.patch b/csi-powerstore-helm/debian/deb_folder/patches/0001-csi-powerstore-add-default-values-for-templates.patch new file mode 100644 index 0000000..e977bfa --- /dev/null +++ b/csi-powerstore-helm/debian/deb_folder/patches/0001-csi-powerstore-add-default-values-for-templates.patch @@ -0,0 +1,101 @@ +From e850373d3bd409e2ab04572deec3dbc546a0fc3d Mon Sep 17 00:00:00 2001 +From: Gustavo Ornaghi Antunes +Date: Thu, 27 Apr 2023 11:07:51 -0300 +Subject: [PATCH] csi-powerstore: add default values for templates + +This patch consists of adding the default values in the values.yaml of +the helm chart. +It's necessary because the images in templates were in unexpected format +for the system and because templates need default values to be able +to build the package. + +Signed-off-by: Gustavo Ornaghi Antunes +Signed-off-by: Hediberto Cavalcante da Silva +--- + helm/csi-powerstore/values.yaml | 25 +++++++++++++++++++++---- + 1 file changed, 21 insertions(+), 4 deletions(-) + +diff --git a/helm/csi-powerstore/values.yaml b/helm/csi-powerstore/values.yaml +index c5aee2b..05e1c71 100644 +--- a/helm/csi-powerstore/values.yaml ++++ b/helm/csi-powerstore/values.yaml +@@ -87,6 +87,11 @@ controller: + # Default value: None + volumeNamePrefix: csivol + ++ attacher: ++ image: k8s.gcr.io/sig-storage/csi-attacher:v4.2.0 ++ provisioner: ++ image: k8s.gcr.io/sig-storage/csi-provisioner:v3.4.0 ++ + # vgsnapshot: allows to configure volume-group-snapshot + # volume-group-snapshot CRDs must be installed before installing driver + vgsnapshot: +@@ -110,6 +115,7 @@ controller: + # false: disable volume snapshot feature(do not install snapshotter sidecar) + # Default value: None + enabled: true ++ image: k8s.gcr.io/sig-storage/csi-snapshotter:v6.2.1 + + # snapNamePrefix: Prefix to apply to the names of a created snapshots + # Allowed values: string +@@ -123,6 +129,7 @@ controller: + # false: disable volume expansion feature(do not install resizer sidecar) + # Default value: true + enabled: true ++ image: k8s.gcr.io/sig-storage/csi-resizer:v1.7.0 + + healthMonitor: + # enabled: Enable/Disable health monitor of CSI volumes +@@ -131,6 +138,7 @@ controller: + # false: disable checking of health condition of CSI volumes + # Default value: false + enabled: false ++ image: gcr.io/k8s-staging-sig-storage/csi-external-health-monitor-controller:v0.8.0 + + # interval: Interval of monitoring volume health condition + # Allowed values: Number followed by unit (s,m,h) +@@ -164,7 +172,8 @@ controller: + replicationPrefix: "replication.storage.dell.com" + + # Image for csi-metadata-retriever +- metadataretriever: dellemc/csi-metadata-retriever:v1.3.0 ++ metadataretriever: ++ image: dellemc/csi-metadata-retriever:v1.3.0 + + # nodeSelector: Define node selection constraints for controller pods. + # For the pod to be eligible to run on a node, the node must have each +@@ -204,6 +213,9 @@ node: + # Default value: None + nodeIDPath: /etc/machine-id + ++ registrar: ++ image: k8s.gcr.io/sig-storage/csi-node-driver-registrar:v2.6.3 ++ + healthMonitor: + # enabled: Enable/Disable health monitor of CSI volumes- volume usage, volume condition + # Allowed values: +@@ -278,6 +290,12 @@ connection: + # Default value: false + enableCHAP: false + ++storageClasses: ++ ++secrets: ++ create: true ++ arrays: ++ + # CSI driver log level + # Allowed values: "error", "warn"/"warning", "info", "debug", "error" + # Default value: "debug" +@@ -336,6 +354,5 @@ podmon: + # - "--driverPodLabelValue=dell-storage" + # - "--ignoreVolumelessPods=false" + +-images: +- # "driver" defines the container image, used for the driver container. +- driverRepository: dellemc ++driver: ++ image: dellemc/csi-powerstore:v2.6.0 +-- +2.25.1 diff --git a/csi-powerstore-helm/debian/deb_folder/patches/0002-csi-powerstore-add-secret-in-templates.patch b/csi-powerstore-helm/debian/deb_folder/patches/0002-csi-powerstore-add-secret-in-templates.patch new file mode 100644 index 0000000..55fe5e4 --- /dev/null +++ b/csi-powerstore-helm/debian/deb_folder/patches/0002-csi-powerstore-add-secret-in-templates.patch @@ -0,0 +1,45 @@ +From 74b8f6cd4a26d6ab5d7c5979f2669b31f31bd0c5 Mon Sep 17 00:00:00 2001 +From: Gustavo Ornaghi Antunes +Date: Tue, 18 Apr 2023 08:46:30 -0300 +Subject: [PATCH] csi-powerstore: add secret in templates + +This patch consists of adding a secret in the helm chart templates directory. +It's needed because this helm chart needs a config secret that should be +created manually. + +Signed-off-by: Gustavo Ornaghi Antunes +Signed-off-by: Hediberto Cavalcante da Silva +--- + helm/csi-powerstore/templates/secret.yaml | 21 +++++++++++++++++++++ + 1 file changed, 21 insertions(+) + create mode 100644 helm/csi-powerstore/templates/secret.yaml + +diff --git a/helm/csi-powerstore/templates/secret.yaml b/helm/csi-powerstore/templates/secret.yaml +new file mode 100644 +index 0000000..dcfc2fe +--- /dev/null ++++ b/helm/csi-powerstore/templates/secret.yaml +@@ -0,0 +1,21 @@ ++{{- if .Values.secrets.create }} ++apiVersion: v1 ++kind: Secret ++metadata: ++ name: csi-powerstore-config ++ namespace: {{ .Release.Namespace }} ++stringData: ++ config: | ++ arrays: ++ {{- range .Values.secrets.arrays }} ++ - globalID: "{{ .globalID }}" ++ username: "{{ .username }}" ++ password: "{{ .password }}" ++ endpoint: "{{ .endpoint }}" ++ skipCertificateValidation: {{ .skipCertificateValidation | default "true" }} ++ isDefault: {{ .isDefault | default "false" }} ++ blockProtocol: {{ .blockProtocol | default "auto" }} ++ nasName: "{{ .nasName }}" ++ nfsAcls: "{{ .nfsAcls | default "0777" }}" ++ {{- end }} ++{{- end }} +-- +2.25.1 diff --git a/csi-powerstore-helm/debian/deb_folder/patches/0003-csi-powerstore-add-storageclass-in-templates.patch b/csi-powerstore-helm/debian/deb_folder/patches/0003-csi-powerstore-add-storageclass-in-templates.patch new file mode 100644 index 0000000..8dc3d1e --- /dev/null +++ b/csi-powerstore-helm/debian/deb_folder/patches/0003-csi-powerstore-add-storageclass-in-templates.patch @@ -0,0 +1,65 @@ +From 343ab50e5af6de9c9164ff7757992548360c415d Mon Sep 17 00:00:00 2001 +From: Gustavo Ornaghi Antunes +Date: Mon, 29 May 2023 12:37:17 -0300 +Subject: [PATCH] csi-powerstore: add storageclass in templates + +This patch consists of adding a storage classes in the helm chart templates directory. +It's needed because this helm chart needs a storage classes that should be +created manually. + +Signed-off-by: Gustavo Ornaghi Antunes +Signed-off-by: Hediberto Cavalcante da Silva +--- + .../templates/storageclass.yaml | 41 +++++++++++++++++++ + 1 file changed, 41 insertions(+) + create mode 100644 helm/csi-powerstore/templates/storageclass.yaml + +diff --git a/helm/csi-powerstore/templates/storageclass.yaml b/helm/csi-powerstore/templates/storageclass.yaml +new file mode 100644 +index 0000000..b66ce0c +--- /dev/null ++++ b/helm/csi-powerstore/templates/storageclass.yaml +@@ -0,0 +1,41 @@ ++{{- range $sc := .Values.storageClasses }} ++apiVersion: storage.k8s.io/v1 ++kind: StorageClass ++metadata: ++{{- if or $sc.name $sc.fstype }} ++ name: {{ $sc.name | default ( print "csi-powerstore-" $sc.fstype | lower ) }} ++{{- else }} ++ name: "csi-powerstore-nfs" ++{{- end }} ++provisioner: {{ $sc.provisioner | default ( print "csi-powerstore.dellemc.com" ) }} ++parameters: ++ arrayID: "{{ $sc.arrayID }}" ++ {{- if $sc.fstype }} ++ csi.storage.k8s.io/fstype: {{ $sc.fstype | lower | default "nfs" }} ++ {{- end }} ++ nasName: "{{ $sc.nasName }}" ++ allowRoot: "{{ $sc.allowRoot | default "false" }}" ++ {{- if and $sc.replication $.Values.csm.replication }} ++ replication.storage.dell.com/isReplicationEnabled: "true" ++ replication.storage.dell.com/remoteStorageClassName: "{{ $sc.replication.remoteStorageClassName | default print "csi-powerstore-replication" }}" ++ {{- if $sc.replication.remoteClusterID }} ++ replication.storage.dell.com/remoteClusterID: "{{ $sc.replication.remoteClusterID }}" ++ {{- end }} ++ {{- if $sc.replication.remoteSystem }} ++ replication.storage.dell.com/remoteSystem: "{{ $sc.replication.remoteSystem }}" ++ {{- end }} ++ {{- if $sc.replication.rpo }} ++ replication.storage.dell.com/rpo: {{ $sc.replication.rpo | default "Five_Minutes" }} ++ {{- end }} ++ replication.storage.dell.com/ignoreNamespaces: "{{ $sc.replication.ignoreNamespaces | default false }}" ++ replication.storage.dell.com/volumeGroupPrefix: {{ $sc.replication.volumeGroupPrefix | default "csi-powerstore" }} ++ {{- end }} ++reclaimPolicy: {{ $sc.reclaimPolicy | default "Delete" }} ++allowVolumeExpansion: {{ $sc.allowVolumeExpansion | default "true" }} ++volumeBindingMode: {{ $sc.volumeBindingMode | default "Immediate" }} ++{{- if $sc.allowedTopologies }} ++allowedTopologies: ++ {{ $sc.allowedTopologies | toYaml | nindent 4 }} ++{{- end }} ++--- ++{{- end }} +-- +2.25.1 diff --git a/csi-powerstore-helm/debian/deb_folder/patches/0004-csi-powerstore-fix-image-path-for-templates.patch b/csi-powerstore-helm/debian/deb_folder/patches/0004-csi-powerstore-fix-image-path-for-templates.patch new file mode 100644 index 0000000..a64391b --- /dev/null +++ b/csi-powerstore-helm/debian/deb_folder/patches/0004-csi-powerstore-fix-image-path-for-templates.patch @@ -0,0 +1,106 @@ +From 4e9698e29c69382c333e4df22f2ec043da0c4a82 Mon Sep 17 00:00:00 2001 +From: Gustavo Ornaghi Antunes +Date: Thu, 27 Apr 2023 10:51:06 -0300 +Subject: [PATCH] csi-powerstore: fix image path for templates + +This patch consists of changing the format to use the image path directly +following the expected format used by kube_app. + +Signed-off-by: Gustavo Ornaghi Antunes +Signed-off-by: Hediberto Cavalcante da Silva +--- + helm/csi-powerstore/templates/controller.yaml | 14 +++++++------- + helm/csi-powerstore/templates/node.yaml | 4 ++-- + 2 files changed, 9 insertions(+), 9 deletions(-) + +diff --git a/helm/csi-powerstore/templates/controller.yaml b/helm/csi-powerstore/templates/controller.yaml +index 3067302..097084b 100644 +--- a/helm/csi-powerstore/templates/controller.yaml ++++ b/helm/csi-powerstore/templates/controller.yaml +@@ -223,7 +223,7 @@ spec: + {{ if .Values.dev.enableTracing }}{{- include "pstore.tracing" . | nindent 8 }}{{ end }} + {{- end }} + - name: attacher +- image: {{ required "Must provide the CSI attacher container image." ( include "csi-powerstore.attacherImage" . ) }} ++ image: {{ .Values.controller.attacher.image }} + imagePullPolicy: {{ .Values.imagePullPolicy }} + args: + - "--csi-address=$(ADDRESS)" +@@ -241,7 +241,7 @@ spec: + {{- if hasKey .Values.controller "resizer" }} + {{- if eq .Values.controller.resizer.enabled true }} + - name: resizer +- image: {{ required "Must provide the CSI resizer container image." ( include "csi-powerstore.resizerImage" . ) }} ++ image: {{ .Values.controller.resizer.image }} + imagePullPolicy: {{ .Values.imagePullPolicy }} + args: + - "--csi-address=$(ADDRESS)" +@@ -256,7 +256,7 @@ spec: + {{end}} + {{end}} + - name: provisioner +- image: {{ required "Must provide the CSI provisioner container image." ( include "csi-powerstore.provisionerImage" . ) }} ++ image: {{ .Values.controller.provisioner.image }} + imagePullPolicy: {{ .Values.imagePullPolicy }} + args: + - "--csi-address=$(ADDRESS)" +@@ -287,7 +287,7 @@ spec: + {{- if hasKey .Values.controller "snapshot" }} + {{- if eq .Values.controller.snapshot.enabled true }} + - name: snapshotter +- image: {{ required "Must provide the CSI snapshotter container image." ( include "csi-powerstore.snapshotterImage" . ) }} ++ image: {{ .Values.controller.snapshot.image }} + imagePullPolicy: {{ .Values.imagePullPolicy }} + args: + - "--csi-address=$(ADDRESS)" +@@ -346,7 +346,7 @@ spec: + {{- if hasKey .Values.controller "healthMonitor" }} + {{- if eq .Values.controller.healthMonitor.enabled true}} + - name: csi-external-health-monitor-controller +- image: {{ required "Must provide the CSI external health monitor controller image." ( include "csi-powerstore.healthmonitorImage" . ) }} ++ image: {{ .Values.controller.healthMonitor.image }} + imagePullPolicy: {{ .Values.imagePullPolicy }} + args: + - "--v=5" +@@ -365,7 +365,7 @@ spec: + {{- end }} + {{- end }} + - name: csi-metadata-retriever +- image: {{ required "Must provide the CSI Metadata retriever container image." .Values.controller.metadataretriever }} ++ image: {{ .Values.controller.metadataretriever.image }} + imagePullPolicy: {{ .Values.imagePullPolicy }} + command: [ "/csi-metadata-retriever" ] + env: +@@ -380,7 +380,7 @@ spec: + - name: socket-dir + mountPath: /var/run/csi + - name: driver +- image: {{ required "Must provide the PowerStore driver image repository." .Values.images.driverRepository }}/{{ .Chart.Name }}:{{ .Values.version }} ++ image: {{ .Values.driver.image }} + imagePullPolicy: {{ .Values.imagePullPolicy }} + command: [ "/csi-powerstore" ] + env: +diff --git a/helm/csi-powerstore/templates/node.yaml b/helm/csi-powerstore/templates/node.yaml +index f09982d..643293f 100644 +--- a/helm/csi-powerstore/templates/node.yaml ++++ b/helm/csi-powerstore/templates/node.yaml +@@ -171,7 +171,7 @@ spec: + capabilities: + add: ["SYS_ADMIN"] + allowPrivilegeEscalation: true +- image: {{ required "Must provide the Powerstore driver image repository." .Values.images.driverRepository }}/{{ .Chart.Name }}:{{ .Values.version }} ++ image: {{ .Values.driver.image }} + imagePullPolicy: {{ .Values.imagePullPolicy }} + command: [ "/csi-powerstore" ] + env: +@@ -264,7 +264,7 @@ spec: + - name: powerstore-config-params + mountPath: /powerstore-config-params + - name: registrar +- image: {{ required "Must provide the CSI node registrar container image." ( include "csi-powerstore.registrarImage" . ) }} ++ image: {{ .Values.node.registrar.image }} + imagePullPolicy: {{ .Values.imagePullPolicy }} + args: + - "--v=5" +-- +2.25.1 diff --git a/csi-powerstore-helm/debian/deb_folder/patches/0005-csi-powerstore-fix-pull-image-error.patch b/csi-powerstore-helm/debian/deb_folder/patches/0005-csi-powerstore-fix-pull-image-error.patch new file mode 100644 index 0000000..bad813b --- /dev/null +++ b/csi-powerstore-helm/debian/deb_folder/patches/0005-csi-powerstore-fix-pull-image-error.patch @@ -0,0 +1,45 @@ +From f503be00bbb03b30fda3c8f4ab4b4ca1d1ac7ac9 Mon Sep 17 00:00:00 2001 +From: Gustavo Ornaghi Antunes +Date: Thu, 20 Apr 2023 09:05:14 -0300 +Subject: [PATCH] csi-powerstore: fix pull image error + +This patch consists of adding imagePullSecrets with name +default-registry-key only in ServiceAccounts. +It's necessary because without it the system can't use the +images from the registry local. + +Signed-off-by: Gustavo Ornaghi Antunes +Signed-off-by: Hediberto Cavalcante da Silva +--- + helm/csi-powerstore/templates/controller.yaml | 2 ++ + helm/csi-powerstore/templates/node.yaml | 2 ++ + 2 files changed, 4 insertions(+) + +diff --git a/helm/csi-powerstore/templates/controller.yaml b/helm/csi-powerstore/templates/controller.yaml +index 097084b..73211b0 100644 +--- a/helm/csi-powerstore/templates/controller.yaml ++++ b/helm/csi-powerstore/templates/controller.yaml +@@ -19,6 +19,8 @@ kind: ServiceAccount + metadata: + name: {{ .Release.Name }}-controller + namespace: {{ .Release.Namespace }} ++imagePullSecrets: ++ - name: default-registry-key + + --- + +diff --git a/helm/csi-powerstore/templates/node.yaml b/helm/csi-powerstore/templates/node.yaml +index 643293f..a5f2b29 100644 +--- a/helm/csi-powerstore/templates/node.yaml ++++ b/helm/csi-powerstore/templates/node.yaml +@@ -19,6 +19,8 @@ kind: ServiceAccount + metadata: + name: {{ .Release.Name }}-node + namespace: {{ .Release.Namespace }} ++imagePullSecrets: ++ - name: default-registry-key + + --- + +-- +2.25.1 diff --git a/csi-powerstore-helm/debian/deb_folder/patches/0006-csi-powerstore-add-separator-after-comments.patch b/csi-powerstore-helm/debian/deb_folder/patches/0006-csi-powerstore-add-separator-after-comments.patch new file mode 100644 index 0000000..bd84b2c --- /dev/null +++ b/csi-powerstore-helm/debian/deb_folder/patches/0006-csi-powerstore-add-separator-after-comments.patch @@ -0,0 +1,88 @@ +From dd84d0b9e2671c405941056bdb7fc8f4cd8c1baa Mon Sep 17 00:00:00 2001 +From: Gustavo Ornaghi Antunes +Date: Wed, 26 Apr 2023 15:10:04 -0300 +Subject: [PATCH] csi-powerstore: add separator after comments + +This patch consists of adding separator between header comments and +the resources. +It's necessary because the helm couldn't render the chart and it +had been fixed by adding this separator that indicates when +the resource starts. + +Signed-off-by: Gustavo Ornaghi Antunes +Signed-off-by: Hediberto Cavalcante da Silva +--- + helm/csi-powerstore/Chart.yaml | 2 ++ + helm/csi-powerstore/templates/controller.yaml | 2 ++ + helm/csi-powerstore/templates/csidriver.yaml | 2 ++ + helm/csi-powerstore/templates/driver-config-params.yaml | 2 ++ + helm/csi-powerstore/templates/node.yaml | 2 ++ + 5 files changed, 10 insertions(+) + +diff --git a/helm/csi-powerstore/Chart.yaml b/helm/csi-powerstore/Chart.yaml +index 84aede7..73dd269 100644 +--- a/helm/csi-powerstore/Chart.yaml ++++ b/helm/csi-powerstore/Chart.yaml +@@ -14,6 +14,8 @@ + # + # + ++--- ++ + name: csi-powerstore + apiVersion: v2 + version: 2.6.0 +diff --git a/helm/csi-powerstore/templates/controller.yaml b/helm/csi-powerstore/templates/controller.yaml +index 73211b0..622a3c9 100644 +--- a/helm/csi-powerstore/templates/controller.yaml ++++ b/helm/csi-powerstore/templates/controller.yaml +@@ -14,6 +14,8 @@ + # + # + ++--- ++ + apiVersion: v1 + kind: ServiceAccount + metadata: +diff --git a/helm/csi-powerstore/templates/csidriver.yaml b/helm/csi-powerstore/templates/csidriver.yaml +index 2cca097..4724c4f 100644 +--- a/helm/csi-powerstore/templates/csidriver.yaml ++++ b/helm/csi-powerstore/templates/csidriver.yaml +@@ -14,6 +14,8 @@ + # + # + ++--- ++ + apiVersion: storage.k8s.io/v1 + kind: CSIDriver + metadata: +diff --git a/helm/csi-powerstore/templates/driver-config-params.yaml b/helm/csi-powerstore/templates/driver-config-params.yaml +index 0c8f07c..06bad1e 100644 +--- a/helm/csi-powerstore/templates/driver-config-params.yaml ++++ b/helm/csi-powerstore/templates/driver-config-params.yaml +@@ -14,6 +14,8 @@ + # + # + ++--- ++ + apiVersion: v1 + kind: ConfigMap + metadata: +diff --git a/helm/csi-powerstore/templates/node.yaml b/helm/csi-powerstore/templates/node.yaml +index a5f2b29..c06ef03 100644 +--- a/helm/csi-powerstore/templates/node.yaml ++++ b/helm/csi-powerstore/templates/node.yaml +@@ -14,6 +14,8 @@ + # + # + ++--- ++ + apiVersion: v1 + kind: ServiceAccount + metadata: +-- +2.25.1 diff --git a/csi-powerstore-helm/debian/deb_folder/patches/0007-csi-powerstore-enabling-csm-resiliency.patch b/csi-powerstore-helm/debian/deb_folder/patches/0007-csi-powerstore-enabling-csm-resiliency.patch new file mode 100644 index 0000000..edcb08b --- /dev/null +++ b/csi-powerstore-helm/debian/deb_folder/patches/0007-csi-powerstore-enabling-csm-resiliency.patch @@ -0,0 +1,203 @@ +From 28a21b6fe89bccee4c5e3d8bc9cfd5f773a9d01c Mon Sep 17 00:00:00 2001 +From: Gustavo Ornaghi Antunes +Date: Thu, 1 Jun 2023 10:49:55 -0300 +Subject: [PATCH] csi-powerstore: enabling csm-resiliency + +This patch consists of changing the format of the values in templates and +changing the values.yaml for the user be able to enable csm-resiliency. + +Signed-off-by: Gustavo Ornaghi Antunes +Signed-off-by: Hediberto Cavalcante da Silva +--- + helm/csi-powerstore/templates/controller.yaml | 12 ++--- + .../templates/driver-config-params.yaml | 2 +- + helm/csi-powerstore/templates/node.yaml | 12 ++--- + helm/csi-powerstore/values.yaml | 50 ++++++++++--------- + 4 files changed, 39 insertions(+), 37 deletions(-) + +diff --git a/helm/csi-powerstore/templates/controller.yaml b/helm/csi-powerstore/templates/controller.yaml +index 622a3c9..b9a7a92 100644 +--- a/helm/csi-powerstore/templates/controller.yaml ++++ b/helm/csi-powerstore/templates/controller.yaml +@@ -40,7 +40,7 @@ rules: + - apiGroups: [""] + resources: ["nodes"] + {{- if hasKey .Values "podmon" }} +- {{- if eq .Values.podmon.enabled true }} ++ {{- if .Values.csm.resiliency }} + verbs: ["get", "list", "watch", "patch"] + {{- else }} + verbs: ["get", "list", "watch"] +@@ -58,7 +58,7 @@ rules: + - apiGroups: ["storage.k8s.io"] + resources: ["volumeattachments"] + {{- if hasKey .Values "podmon" }} +- {{- if eq .Values.podmon.enabled true }} ++ {{- if .Values.csm.resiliency }} + verbs: ["get", "list", "watch", "update", "patch", "delete"] + {{- else }} + verbs: ["get", "list", "watch", "update", "patch"] +@@ -98,7 +98,7 @@ rules: + - apiGroups: [""] + resources: ["pods"] + {{- if hasKey .Values "podmon" }} +- {{- if eq .Values.podmon.enabled true }} ++ {{- if .Values.csm.resiliency }} + verbs: ["get", "list", "watch", "update", "delete"] + {{- else }} + verbs: ["get", "list", "watch"] +@@ -197,7 +197,7 @@ spec: + topologyKey: "kubernetes.io/hostname" + containers: + {{- if hasKey .Values "podmon" }} +- {{- if eq .Values.podmon.enabled true }} ++ {{- if .Values.csm.resiliency }} + - name: podmon + image: {{ required "Must provide the podmon container image." .Values.podmon.image }} + imagePullPolicy: {{ .Values.imagePullPolicy }} +@@ -411,8 +411,8 @@ spec: + value: /powerstore-config-params/driver-config-params.yaml + {{- if hasKey .Values "podmon" }} + - name: X_CSI_PODMON_ENABLED +- value: "{{ .Values.podmon.enabled }}" +- {{- if eq .Values.podmon.enabled true }} ++ value: "{{ .Values.csm.resiliency }}" ++ {{- if .Values.csm.resiliency }} + {{- range $key, $value := .Values.podmon.controller.args }} + {{- if contains "--arrayConnectivityPollRate" $value }} + - name: X_CSI_PODMON_ARRAY_CONNECTIVITY_POLL_RATE +diff --git a/helm/csi-powerstore/templates/driver-config-params.yaml b/helm/csi-powerstore/templates/driver-config-params.yaml +index 06bad1e..2699580 100644 +--- a/helm/csi-powerstore/templates/driver-config-params.yaml ++++ b/helm/csi-powerstore/templates/driver-config-params.yaml +@@ -25,7 +25,7 @@ data: + driver-config-params.yaml: | + CSI_LOG_LEVEL: "{{ .Values.logLevel }}" + CSI_LOG_FORMAT: "{{ .Values.logFormat }}" +- {{ if .Values.podmon.enabled }} ++ {{ if .Values.csm.resiliency }} + PODMON_CONTROLLER_LOG_LEVEL: "{{ .Values.logLevel }}" + PODMON_CONTROLLER_LOG_FORMAT: "{{ .Values.logFormat }}" + PODMON_NODE_LOG_LEVEL: "{{ .Values.logLevel }}" +diff --git a/helm/csi-powerstore/templates/node.yaml b/helm/csi-powerstore/templates/node.yaml +index c06ef03..3efa533 100644 +--- a/helm/csi-powerstore/templates/node.yaml ++++ b/helm/csi-powerstore/templates/node.yaml +@@ -57,7 +57,7 @@ rules: + resources: ["securitycontextconstraints"] + verbs: ["use"] + {{- if hasKey .Values "podmon" }} +- {{- if eq .Values.podmon.enabled true }} ++ {{- if .Values.csm.resiliency }} + - apiGroups: [""] + resources: ["pods"] + verbs: ["get", "list", "watch", "update", "delete"] +@@ -97,7 +97,7 @@ spec: + metadata: + labels: + app: {{ .Release.Name }}-node +- {{- if .Values.podmon.enabled }} ++ {{- if .Values.csm.resiliency }} + driver.dellemc.com: dell-storage + {{- end }} + spec: +@@ -115,7 +115,7 @@ spec: + hostIPC: true + containers: + {{- if hasKey .Values "podmon" }} +- {{- if eq .Values.podmon.enabled true }} ++ {{- if .Values.csm.resiliency }} + - name: podmon + securityContext: + privileged: true +@@ -228,8 +228,8 @@ spec: + {{- end }} + {{- if hasKey .Values "podmon" }} + - name: X_CSI_PODMON_ENABLED +- value: "{{ .Values.podmon.enabled }}" +- {{- if eq .Values.podmon.enabled true }} ++ value: "{{ .Values.csm.resiliency }}" ++ {{- if .Values.csm.resiliency }} + {{- range $key, $value := .Values.podmon.node.args }} + {{- if contains "--arrayConnectivityPollRate" $value }} + - name: X_CSI_PODMON_ARRAY_CONNECTIVITY_POLL_RATE +@@ -338,7 +338,7 @@ spec: + secret: + secretName: {{ .Release.Name }}-config + {{- if hasKey .Values "podmon" }} +- {{- if eq .Values.podmon.enabled true }} ++ {{- if .Values.csm.resiliency }} + - name: usr-bin + hostPath: + path: /usr/bin +diff --git a/helm/csi-powerstore/values.yaml b/helm/csi-powerstore/values.yaml +index 05e1c71..ba94604 100644 +--- a/helm/csi-powerstore/values.yaml ++++ b/helm/csi-powerstore/values.yaml +@@ -14,6 +14,9 @@ + # + # + ++csm: ++ resiliency: false ++ + ## K8S/DRIVER ATTRIBUTES + ######################## + +@@ -328,31 +331,30 @@ storageCapacity: + + # Enable this feature only after contact support for additional information + podmon: +- enabled: false + image: dellemc/podmon:v1.5.0 +- #controller: +- # args: +- # - "--csisock=unix:/var/run/csi/csi.sock" +- # - "--labelvalue=csi-powerstore" +- # - "--arrayConnectivityPollRate=60" +- # - "--driverPath=csi-powerstore.dellemc.com" +- # - "--mode=controller" +- # - "--skipArrayConnectionValidation=false" +- # - "--driver-config-params=/powerstore-config-params/driver-config-params.yaml" +- # - "--driverPodLabelValue=dell-storage" +- # - "--ignoreVolumelessPods=false" +- +- #node: +- # args: +- # - "--csisock=unix:/var/lib/kubelet/plugins/csi-powerstore.dellemc.com/csi_sock" +- # - "--labelvalue=csi-powerstore" +- # - "--arrayConnectivityPollRate=60" +- # - "--driverPath=csi-powerstore.dellemc.com" +- # - "--mode=node" +- # - "--leaderelection=false" +- # - "--driver-config-params=/powerstore-config-params/driver-config-params.yaml" +- # - "--driverPodLabelValue=dell-storage" +- # - "--ignoreVolumelessPods=false" ++ controller: ++ args: ++ - "--csisock=unix:/var/run/csi/csi.sock" ++ - "--labelvalue=csi-powerstore" ++ - "--arrayConnectivityPollRate=60" ++ - "--driverPath=csi-powerstore.dellemc.com" ++ - "--mode=controller" ++ - "--skipArrayConnectionValidation=false" ++ - "--driver-config-params=/powerstore-config-params/driver-config-params.yaml" ++ - "--driverPodLabelValue=dell-storage" ++ - "--ignoreVolumelessPods=false" ++ ++ node: ++ args: ++ - "--csisock=unix:/var/lib/kubelet/plugins/csi-powerstore.dellemc.com/csi_sock" ++ - "--labelvalue=csi-powerstore" ++ - "--arrayConnectivityPollRate=60" ++ - "--driverPath=csi-powerstore.dellemc.com" ++ - "--mode=node" ++ - "--leaderelection=false" ++ - "--driver-config-params=/powerstore-config-params/driver-config-params.yaml" ++ - "--driverPodLabelValue=dell-storage" ++ - "--ignoreVolumelessPods=false" + + driver: + image: dellemc/csi-powerstore:v2.6.0 +-- +2.25.1 diff --git a/csi-powerstore-helm/debian/deb_folder/patches/0008-csi-powerstore-enabling-csm-replication.patch b/csi-powerstore-helm/debian/deb_folder/patches/0008-csi-powerstore-enabling-csm-replication.patch new file mode 100644 index 0000000..b4d47c1 --- /dev/null +++ b/csi-powerstore-helm/debian/deb_folder/patches/0008-csi-powerstore-enabling-csm-replication.patch @@ -0,0 +1,60 @@ +From 665041d4e4fb45d0818a0702806f5b6bb6fe1ab9 Mon Sep 17 00:00:00 2001 +From: Hediberto Cavalcante da Silva +Date: Tue, 6 Jun 2023 15:21:59 -0300 +Subject: [PATCH] csi-powerstore: enabling csm-replication + +This patch consists of changing the format of the values in templates and +changing the values.yaml for the user be able to enable csm-replication. + +Signed-off-by: Hediberto Cavalcante da Silva +Signed-off-by: Gustavo Ornaghi Antunes +--- + helm/csi-powerstore/templates/controller.yaml | 6 +++--- + helm/csi-powerstore/values.yaml | 1 + + 2 files changed, 4 insertions(+), 3 deletions(-) + +diff --git a/helm/csi-powerstore/templates/controller.yaml b/helm/csi-powerstore/templates/controller.yaml +index b9a7a92..3ff2838 100644 +--- a/helm/csi-powerstore/templates/controller.yaml ++++ b/helm/csi-powerstore/templates/controller.yaml +@@ -116,7 +116,7 @@ rules: + verbs: ["update", "patch"] + # below for dell-csi-replicator + {{- if hasKey .Values.controller "replication" }} +- {{- if eq .Values.controller.replication.enabled true}} ++ {{- if .Values.csm.replication }} + - apiGroups: ["replication.storage.dell.com"] + resources: ["dellcsireplicationgroups"] + verbs: ["create", "delete", "get", "list", "patch", "update", "watch"] +@@ -320,7 +320,7 @@ spec: + {{- end }} + {{- end }} + {{- if hasKey .Values.controller "replication" }} +- {{- if eq .Values.controller.replication.enabled true}} ++ {{- if .Values.csm.replication }} + - name: dell-csi-replicator + image: {{ required "Must provide the Dell CSI Replicator image." .Values.controller.replication.image}} + imagePullPolicy: {{ .Values.imagePullPolicy }} +@@ -424,7 +424,7 @@ spec: + - name: X_CSI_PODMON_API_PORT + value: "{{ .Values.podmonAPIPort }}" + {{- if hasKey .Values.controller "replication" }} +- {{- if eq .Values.controller.replication.enabled true}} ++ {{- if .Values.csm.replication }} + - name: X_CSI_REPLICATION_CONTEXT_PREFIX + value: {{ .Values.controller.replication.replicationContextPrefix | default "powerstore"}} + - name: X_CSI_REPLICATION_PREFIX +diff --git a/helm/csi-powerstore/values.yaml b/helm/csi-powerstore/values.yaml +index ba94604..cf01d94 100644 +--- a/helm/csi-powerstore/values.yaml ++++ b/helm/csi-powerstore/values.yaml +@@ -15,6 +15,7 @@ + # + + csm: ++ replication: false + resiliency: false + + ## K8S/DRIVER ATTRIBUTES +-- +2.25.1 diff --git a/csi-powerstore-helm/debian/deb_folder/patches/0009-csi-powerstore-add-label-app.starlingx.io-component.patch b/csi-powerstore-helm/debian/deb_folder/patches/0009-csi-powerstore-add-label-app.starlingx.io-component.patch new file mode 100644 index 0000000..2f705b8 --- /dev/null +++ b/csi-powerstore-helm/debian/deb_folder/patches/0009-csi-powerstore-add-label-app.starlingx.io-component.patch @@ -0,0 +1,50 @@ +From 54c0c2ee9e8de68e4f7d3170131beb95d2f05106 Mon Sep 17 00:00:00 2001 +From: Hediberto Cavalcante da Silva +Date: Fri, 23 Jun 2023 11:09:38 -0300 +Subject: [PATCH] csi-powerstore: add label app.starlingx.io/component + +This patch consists of changing the strategy from the Deployment resource and +add the app.starlingx.io/component label in all pods. +The strategy was needed changing because in the reapply the old replicasets +were not being deleted. The default value was rollingUpdate. +In this case, it doesn't effect functionality. + +Signed-off-by: Hediberto Cavalcante da Silva +Signed-off-by: Gustavo Ornaghi Antunes +--- + helm/csi-powerstore/templates/controller.yaml | 3 +++ + helm/csi-powerstore/templates/node.yaml | 1 + + 2 files changed, 4 insertions(+) + +diff --git a/helm/csi-powerstore/templates/controller.yaml b/helm/csi-powerstore/templates/controller.yaml +index 3ff2838..a285766 100644 +--- a/helm/csi-powerstore/templates/controller.yaml ++++ b/helm/csi-powerstore/templates/controller.yaml +@@ -171,10 +171,13 @@ spec: + {{- else }} + replicas: {{ required "Must provide the number of controller instances to create." .Values.controller.controllerCount }} + {{- end }} ++ strategy: ++ type: Recreate + template: + metadata: + labels: + name: {{ .Release.Name }}-controller ++ app.starlingx.io/component: {{ index .Values "app.starlingx.io/component" }} + spec: + {{ if .Values.controller.nodeSelector }} + nodeSelector: +diff --git a/helm/csi-powerstore/templates/node.yaml b/helm/csi-powerstore/templates/node.yaml +index 3efa533..39d01bd 100644 +--- a/helm/csi-powerstore/templates/node.yaml ++++ b/helm/csi-powerstore/templates/node.yaml +@@ -97,6 +97,7 @@ spec: + metadata: + labels: + app: {{ .Release.Name }}-node ++ app.starlingx.io/component: {{ index .Values "app.starlingx.io/component" }} + {{- if .Values.csm.resiliency }} + driver.dellemc.com: dell-storage + {{- end }} +-- +2.25.1 diff --git a/csi-powerstore-helm/debian/deb_folder/patches/series b/csi-powerstore-helm/debian/deb_folder/patches/series new file mode 100644 index 0000000..8f51e40 --- /dev/null +++ b/csi-powerstore-helm/debian/deb_folder/patches/series @@ -0,0 +1,9 @@ +0001-csi-powerstore-add-default-values-for-templates.patch +0002-csi-powerstore-add-secret-in-templates.patch +0003-csi-powerstore-add-storageclass-in-templates.patch +0004-csi-powerstore-fix-image-path-for-templates.patch +0005-csi-powerstore-fix-pull-image-error.patch +0006-csi-powerstore-add-separator-after-comments.patch +0007-csi-powerstore-enabling-csm-resiliency.patch +0008-csi-powerstore-enabling-csm-replication.patch +0009-csi-powerstore-add-label-app.starlingx.io-component.patch diff --git a/csi-powerstore-helm/debian/deb_folder/rules b/csi-powerstore-helm/debian/deb_folder/rules new file mode 100644 index 0000000..ebc9e59 --- /dev/null +++ b/csi-powerstore-helm/debian/deb_folder/rules @@ -0,0 +1,20 @@ +#!/usr/bin/make -f +export DH_VERBOSE = 1 + +export ROOT = debian/tmp +export APP_FOLDER = $(ROOT)/usr/lib/helm + +%: + dh $@ + +override_dh_auto_build: + + cp Makefile helm + cd helm && make csi-powerstore + +override_dh_auto_install: + # Install the app tar file. + install -d -m 755 $(APP_FOLDER) + install -p -D -m 755 helm/csi-powerstore*.tgz $(APP_FOLDER) + +override_dh_auto_test: diff --git a/csi-powerstore-helm/debian/deb_folder/source/format b/csi-powerstore-helm/debian/deb_folder/source/format new file mode 100644 index 0000000..163aaf8 --- /dev/null +++ b/csi-powerstore-helm/debian/deb_folder/source/format @@ -0,0 +1 @@ +3.0 (quilt) diff --git a/csi-powerstore-helm/debian/meta_data.yaml b/csi-powerstore-helm/debian/meta_data.yaml new file mode 100644 index 0000000..207e715 --- /dev/null +++ b/csi-powerstore-helm/debian/meta_data.yaml @@ -0,0 +1,14 @@ +--- +debname: csi-powerstore-helm +debver: 2.6-0 +dl_path: + name: csi-powerstore-2.6.0.tar.gz + url: https://github.com/dell/csi-powerstore/archive/v2.6.0.tar.gz + sha256sum: 3130a9ba894935e8b4dba8124e0adf5b39601ce7cf5070dde7aa7ade35c57d12 +src_files: + - csi-powerstore-helm/files/Makefile +revision: + dist: $STX_DIST + GITREVCOUNT: + BASE_SRCREV: 8db8f63466df064069133380243443e3822fa8ce + SRC_DIR: ${MY_REPO}/stx/app-dell-storage/csi-powerstore-helm diff --git a/csi-unity-helm/csi-unity-helm/files/Makefile b/csi-unity-helm/csi-unity-helm/files/Makefile new file mode 100644 index 0000000..ef3a429 --- /dev/null +++ b/csi-unity-helm/csi-unity-helm/files/Makefile @@ -0,0 +1,42 @@ +# +# Copyright 2017 The Openstack-Helm Authors. +# +# Copyright (c) 2023 Wind River Systems, Inc. +# +# SPDX-License-Identifier: Apache-2.0 +# +# It's necessary to set this because some environments don't link sh -> bash. +SHELL := /bin/bash +TASK := build + +EXCLUDES := doc tests tools logs tmp +CHARTS := $(filter-out $(EXCLUDES), $(patsubst %/.,%,$(wildcard */.))) + +.PHONY: $(EXCLUDES) $(CHARTS) + +all: $(CHARTS) + +$(CHARTS): + @if [ -d $@ ]; then \ + echo; \ + echo "===== Processing [$@] chart ====="; \ + make $(TASK)-$@; \ + fi + +init-%: + if [ -f $*/Makefile ]; then make -C $*; fi + +lint-%: init-% + if [ -d $* ]; then helm lint $*; fi + +build-%: lint-% + if [ -d $* ]; then helm package $*; 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/csi-unity-helm/debian/deb_folder/changelog b/csi-unity-helm/debian/deb_folder/changelog new file mode 100644 index 0000000..b23efb4 --- /dev/null +++ b/csi-unity-helm/debian/deb_folder/changelog @@ -0,0 +1,5 @@ +csi-unity-helm (2.6-0) unstable; urgency=medium + + * Initial release. + + -- Hediberto Cavalcante da Silva Thu, 30 Mar 2023 15:15:00 +0000 diff --git a/csi-unity-helm/debian/deb_folder/control b/csi-unity-helm/debian/deb_folder/control new file mode 100644 index 0000000..1e6e5e9 --- /dev/null +++ b/csi-unity-helm/debian/deb_folder/control @@ -0,0 +1,15 @@ +Source: csi-unity-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: csi-unity-helm +Section: libs +Architecture: any +Depends: ${misc:Depends} +Description: StarlingX Dell Unity CSI Helm Charts + This package contains helm charts for the Dell Unity CSI. diff --git a/csi-unity-helm/debian/deb_folder/copyright b/csi-unity-helm/debian/deb_folder/copyright new file mode 100644 index 0000000..b07f8ba --- /dev/null +++ b/csi-unity-helm/debian/deb_folder/copyright @@ -0,0 +1,41 @@ +Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ +Upstream-Name: csi-unity-helm +Source: https://opendev.org/starlingx/app-dell-storage/ + +Files: * +Copyright: (c) 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: 2022 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/csi-unity-helm/debian/deb_folder/csi-unity-helm.install b/csi-unity-helm/debian/deb_folder/csi-unity-helm.install new file mode 100644 index 0000000..8a0c6de --- /dev/null +++ b/csi-unity-helm/debian/deb_folder/csi-unity-helm.install @@ -0,0 +1 @@ +usr/lib/helm/* diff --git a/csi-unity-helm/debian/deb_folder/patches/0001-csi-unity-add-apiVersion.patch b/csi-unity-helm/debian/deb_folder/patches/0001-csi-unity-add-apiVersion.patch new file mode 100644 index 0000000..2d4079d --- /dev/null +++ b/csi-unity-helm/debian/deb_folder/patches/0001-csi-unity-add-apiVersion.patch @@ -0,0 +1,27 @@ +From cfecebf4241f9a2c4bcd6bfe35ec3fbe89bc618a Mon Sep 17 00:00:00 2001 +From: Hediberto Cavalcante da Silva +Date: Fri, 31 Mar 2023 15:06:16 -0300 +Subject: [PATCH] csi-unity: add apiVersion + +This patch consists of adding apiVersion on Chart.yaml required by helm lint. + +Signed-off-by: Gustavo Ornaghi Antunes +Signed-off-by: Hediberto Cavalcante da Silva +--- + helm/csi-unity/Chart.yaml | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/helm/csi-unity/Chart.yaml b/helm/csi-unity/Chart.yaml +index eddbb7a..a2f8d8e 100644 +--- a/helm/csi-unity/Chart.yaml ++++ b/helm/csi-unity/Chart.yaml +@@ -1,6 +1,7 @@ + name: csi-unity + version: 2.6.0 + appVersion: 2.6.0 ++apiVersion: v2 + kubeVersion: ">= 1.24.0 < 1.27.0" + # If you are using a complex K8s version like "v1.24.3-mirantis-1", use this kubeVersion check instead + # WARNING: this version of the check will allow the use of alpha and beta versions, which is NOT SUPPORTED +-- +2.25.1 diff --git a/csi-unity-helm/debian/deb_folder/patches/0002-csi-unity-add-secret-in-templates.patch b/csi-unity-helm/debian/deb_folder/patches/0002-csi-unity-add-secret-in-templates.patch new file mode 100644 index 0000000..b0c7b63 --- /dev/null +++ b/csi-unity-helm/debian/deb_folder/patches/0002-csi-unity-add-secret-in-templates.patch @@ -0,0 +1,42 @@ +From d6f8affedf697be6d05d84295c70d2d07f1f49af Mon Sep 17 00:00:00 2001 +From: Gustavo Ornaghi Antunes +Date: Fri, 14 Apr 2023 11:07:05 -0300 +Subject: [PATCH] csi-unity: add secret in templates + +This patch consists of adding a secret in the helm chart templates directory. +It's needed because this helm chart needs a config secret that should be +created manually. + +Signed-off-by: Gustavo Ornaghi Antunes +Signed-off-by: Hediberto Cavalcante da Silva +--- + helm/csi-unity/templates/secret.yaml | 18 ++++++++++++++++++ + 1 file changed, 18 insertions(+) + create mode 100644 helm/csi-unity/templates/secret.yaml + +diff --git a/helm/csi-unity/templates/secret.yaml b/helm/csi-unity/templates/secret.yaml +new file mode 100644 +index 0000000..6ba704f +--- /dev/null ++++ b/helm/csi-unity/templates/secret.yaml +@@ -0,0 +1,18 @@ ++{{- if .Values.secrets.create }} ++apiVersion: v1 ++kind: Secret ++metadata: ++ name: {{ .Release.Name }}-creds ++ namespace: {{ .Release.Namespace }} ++stringData: ++ config: | ++ storageArrayList: ++ {{- range .Values.secrets.arrays }} ++ - arrayId: "{{ .arrayId }}" ++ username: "{{ .username }}" ++ password: "{{ .password }}" ++ endpoint: "{{ .endpoint }}" ++ skipCertificateValidation: {{ .skipCertificateValidation | default "true" }} ++ isDefault: {{ .isDefault | default "false" }} ++ {{- end }} ++{{- end }} +-- +2.25.1 diff --git a/csi-unity-helm/debian/deb_folder/patches/0003-csi-unity-add-storageclass-in-templates.patch b/csi-unity-helm/debian/deb_folder/patches/0003-csi-unity-add-storageclass-in-templates.patch new file mode 100644 index 0000000..f683722 --- /dev/null +++ b/csi-unity-helm/debian/deb_folder/patches/0003-csi-unity-add-storageclass-in-templates.patch @@ -0,0 +1,74 @@ +From 72e2fe6e83f2442c701d3d0dee6bbd0d37a8e383 Mon Sep 17 00:00:00 2001 +From: Gustavo Ornaghi Antunes +Date: Thu, 6 Apr 2023 08:41:07 -0300 +Subject: [PATCH] csi-unity: add storageclass in templates + +This patch consists of adding a storage classes in the helm chart templates directory. +It's needed because this helm chart needs a storage classes that should be +created manually. + +Signed-off-by: Gustavo Ornaghi Antunes +Signed-off-by: Hediberto Cavalcante da Silva +--- + helm/csi-unity/templates/storageclass.yaml | 50 ++++++++++++++++++++++ + 1 file changed, 50 insertions(+) + create mode 100644 helm/csi-unity/templates/storageclass.yaml + +diff --git a/helm/csi-unity/templates/storageclass.yaml b/helm/csi-unity/templates/storageclass.yaml +new file mode 100644 +index 0000000..fc80870 +--- /dev/null ++++ b/helm/csi-unity/templates/storageclass.yaml +@@ -0,0 +1,50 @@ ++{{- range $sc := .Values.storageClasses }} ++--- ++apiVersion: storage.k8s.io/v1 ++kind: StorageClass ++metadata: ++{{- if or $sc.name (and $sc.arrayId $sc.protocol)}} ++ name: {{ $sc.name | default ( print "unity-" $sc.arrayId "-" $sc.protocol | lower ) }} ++{{- else if $sc.arrayId }} ++ name: {{ print "unity-" $sc.arrayId "-nfs" | lower }} ++{{- end }} ++provisioner: {{ $sc.provisioner | default ( print "csi-unity.dellemc.com" ) }} ++reclaimPolicy: {{ $sc.reclaimPolicy | default "Delete" }} ++allowVolumeExpansion: {{ $sc.allowVolumeExpansion | default "true" }} ++volumeBindingMode: {{ $sc.volumeBindingMode | default "Immediate" }} ++parameters: ++ protocol: {{ $sc.protocol | default "NFS" }} ++{{- if $sc.arrayId }} ++ arrayId: {{ $sc.arrayId }} ++{{- end }} ++{{- if $sc.storagePool }} ++ storagePool: {{ $sc.storagePool }} ++{{- end }} ++ thinProvisioned: "{{- $sc.thinProvisioned | default true }}" ++ isDataReductionEnabled: "{{- $sc.isDataReductionEnabled | default true }}" ++{{- if $sc.tieringPolicy }} ++ tieringPolicy: "{{ $sc.tieringPolicy }}" ++{{- end }} ++{{- if and ($sc.nasServer) (eq $sc.protocol "NFS") }} ++ nasServer: {{ $sc.nasServer }} ++{{- end }} ++{{- if $sc.hostIOLimitName }} ++ hostIOLimitName: "{{ $sc.hostIOLimitName }}" ++{{- end }} ++ hostIoSize: "{{ $sc.hostIoSize | default 8192 }}" ++{{- if $sc.fstype }} ++ csi.storage.k8s.io/fstype: {{ $sc.fstype | lower | default "nfs" }} ++{{- end }} ++{{- if $sc.allowedTopologies }} ++allowedTopologies: ++ {{ $sc.allowedTopologies | toYaml | nindent 4 }} ++{{- end }} ++{{- if eq $sc.protocol "NFS" }} ++mountOptions: {{ $sc.mountOptions | default "['hard']" }} ++{{- else if $sc.protocol }} ++mountOptions: {{ $sc.mountOptions | default "[]" }} ++{{- else }} ++mountOptions: {{ $sc.mountOptions | default "['hard']" }} ++{{- end }} ++--- ++{{- end }} +-- +2.25.1 diff --git a/csi-unity-helm/debian/deb_folder/patches/0004-csi-unity-add-default-values-for-templates.patch b/csi-unity-helm/debian/deb_folder/patches/0004-csi-unity-add-default-values-for-templates.patch new file mode 100644 index 0000000..7cfd750 --- /dev/null +++ b/csi-unity-helm/debian/deb_folder/patches/0004-csi-unity-add-default-values-for-templates.patch @@ -0,0 +1,91 @@ +From ece820e424964f21bc8112b4ccdd0d770d65fb63 Mon Sep 17 00:00:00 2001 +From: Gustavo Ornaghi Antunes +Date: Thu, 27 Apr 2023 11:56:59 -0300 +Subject: [PATCH] csi-unity: add default values for templates + +This patch consists of adding the default values in the values.yaml of +the helm chart. +It's necessary because the images in templates were in unexpected format +for the system and because templates need default values to be able +to build the package. + +Signed-off-by: Gustavo Ornaghi Antunes +Signed-off-by: Hediberto Cavalcante da Silva +--- + helm/csi-unity/values.yaml | 22 +++++++++++++++++++--- + 1 file changed, 19 insertions(+), 3 deletions(-) + +diff --git a/helm/csi-unity/values.yaml b/helm/csi-unity/values.yaml +index 81201fa..8a54909 100644 +--- a/helm/csi-unity/values.yaml ++++ b/helm/csi-unity/values.yaml +@@ -54,6 +54,11 @@ controller: + # Default value: None + volumeNamePrefix: csivol + ++ attacher: ++ image: "k8s.gcr.io/sig-storage/csi-attacher:v4.2.0" ++ provisioner: ++ image: "k8s.gcr.io/sig-storage/csi-provisioner:v3.4.0" ++ + snapshot: + # enabled: Enable/Disable volume snapshot feature + # Allowed values: +@@ -61,6 +66,7 @@ controller: + # false: disable volume snapshot feature(do not install snapshotter sidecar) + # Default value: None + enabled: true ++ image: "k8s.gcr.io/sig-storage/csi-snapshotter:v6.2.1" + + # snapNamePrefix: Prefix to apply to the names of a created snapshots + # Allowed values: string +@@ -74,6 +80,7 @@ controller: + # false: disable volume snapshot feature(do not install resizer sidecar) + # Default value: None + enabled: true ++ image: "k8s.gcr.io/sig-storage/csi-resizer:v1.7.0" + + # nodeSelector: Define node selection constraints for controller pods. + # For the pod to be eligible to run on a node, the node must have each +@@ -107,6 +114,7 @@ controller: + # false: disable checking of health condition of CSI volumes + # Default value: None + enabled: false ++ image: "gcr.io/k8s-staging-sig-storage/csi-external-health-monitor-controller:v0.8.0" + + # interval: Interval of monitoring volume health condition + # Allowed values: Number followed by unit of time (s,m,h) +@@ -122,6 +130,9 @@ node: + # Default value: None + dnsPolicy: "ClusterFirstWithHostNet" + ++ registrar: ++ image: "k8s.gcr.io/sig-storage/csi-node-driver-registrar:v2.6.3" ++ + healthMonitor: + # enabled: Enable/Disable health monitor of CSI Volumes - volume usage + # Allowed values: +@@ -215,6 +226,12 @@ podmon: + # - "--driverPodLabelValue=dell-storage" + # - "--ignoreVolumelessPods=false" + ++storageClasses: ++ ++secrets: ++ create: true ++ array: ++ + ### The below parameters have been discontinued for configuration from secret.yaml and will have to be configured only in values.yaml + + # syncNodeInfoInterval - Time interval to add node info to array. Default 15 minutes. Minimum value should be 1. +@@ -241,6 +258,5 @@ maxUnityVolumesPerNode: 0 + # Examples : "tenant2" , "tenant3" + tenantName: "" + +-images: +- # "driver" defines the container image, used for the driver container. +- driverRepository: dellemc ++driver: ++ image: "dellemc/csi-unity:v2.6.0" +-- +2.25.1 diff --git a/csi-unity-helm/debian/deb_folder/patches/0005-csi-unity-fix-image-path-for-templates.patch b/csi-unity-helm/debian/deb_folder/patches/0005-csi-unity-fix-image-path-for-templates.patch new file mode 100644 index 0000000..2819407 --- /dev/null +++ b/csi-unity-helm/debian/deb_folder/patches/0005-csi-unity-fix-image-path-for-templates.patch @@ -0,0 +1,115 @@ +From a1685071795a8137752e6d7014484dfc5575e2bb Mon Sep 17 00:00:00 2001 +From: Gustavo Ornaghi Antunes +Date: Thu, 27 Apr 2023 12:03:16 -0300 +Subject: [PATCH] csi-unity: fix image path for templates + +This patch consists of changing the format to use the image path directly +following the expected format used by kube_app. + +Signed-off-by: Gustavo Ornaghi Antunes +Signed-off-by: Hediberto Cavalcante da Silva +--- + helm/csi-unity/templates/controller.yaml | 14 +++++++------- + helm/csi-unity/templates/node.yaml | 6 +++--- + 2 files changed, 10 insertions(+), 10 deletions(-) + +diff --git a/helm/csi-unity/templates/controller.yaml b/helm/csi-unity/templates/controller.yaml +index 2cf8172..d1bafbc 100644 +--- a/helm/csi-unity/templates/controller.yaml ++++ b/helm/csi-unity/templates/controller.yaml +@@ -140,7 +140,7 @@ spec: + {{- if .Values.podmon.enabled }} + - name: podmon + imagePullPolicy: {{ .Values.imagePullPolicy }} +- image: {{ required "Must provide the podmon container image." .Values.podmon.image }} ++ image: {{ .Values.podmon.image }} + args: + {{- toYaml .Values.podmon.controller.args | nindent 12 }} + env: +@@ -163,7 +163,7 @@ spec: + mountPath: /unity-config + {{- end }} + - name: attacher +- image: {{ required "Must provide the CSI attacher container image." ( include "csi-unity.attacherImage" . ) }} ++ image: {{ .Values.controller.attacher.image }} + args: + - "--csi-address=$(ADDRESS)" + - "--v=5" +@@ -175,7 +175,7 @@ spec: + - name: socket-dir + mountPath: /var/run/csi + - name: provisioner +- image: {{ required "Must provide the CSI provisioner container image." ( include "csi-unity.provisionerImage" . ) }} ++ image: {{ .Values.controller.provisioner.image }} + args: + - "--csi-address=$(ADDRESS)" + - "--volume-name-prefix={{ required "Must provide a Volume Name Prefix." .Values.controller.volumeNamePrefix }}" +@@ -197,7 +197,7 @@ spec: + {{- if hasKey .Values.controller "snapshot" }} + {{- if eq .Values.controller.snapshot.enabled true }} + - name: snapshotter +- image: {{ required "Must provide the CSI snapshotter container image. " ( include "csi-unity.snapshotterImage" . ) }} ++ image: {{ .Values.controller.snapshot.image }} + args: + - "--csi-address=$(ADDRESS)" + - "--snapshot-name-prefix={{ required "Must privided a Snapshot Name Prefix" .Values.controller.snapshot.snapNamePrefix }}" +@@ -216,7 +216,7 @@ spec: + {{- if hasKey .Values.controller "resizer" }} + {{- if eq .Values.controller.resizer.enabled true }} + - name: resizer +- image: {{ required "Must provide the CSI resizer container image." ( include "csi-unity.resizerImage" . ) }} ++ image: {{ .Values.controller.resizer.image }} + args: + - "--csi-address=$(ADDRESS)" + - "--v=5" +@@ -232,7 +232,7 @@ spec: + {{- if hasKey .Values.controller "healthMonitor" }} + {{- if eq .Values.controller.healthMonitor.enabled true }} + - name: csi-external-health-monitor-controller +- image: {{ required "Must provide the CSI external health monitor image." ( include "csi-unity.healthmonitorImage" . ) }} ++ image: {{ .Values.controller.healthMonitor.image }} + imagePullPolicy: {{ .Values.imagePullPolicy }} + args: + - "--v=5" +@@ -251,7 +251,7 @@ spec: + {{- end }} + {{- end }} + - name: driver +- image: "{{ required "Must provide the driver image repository." .Values.images.driverRepository }}/{{ .Chart.Name }}:{{ .Values.version }}" ++ image: {{ .Values.driver.image }} + args: + - "--driver-name=csi-unity.dellemc.com" + - "--driver-config=/unity-config/driver-config-params.yaml" +diff --git a/helm/csi-unity/templates/node.yaml b/helm/csi-unity/templates/node.yaml +index d013812..319d2dd 100644 +--- a/helm/csi-unity/templates/node.yaml ++++ b/helm/csi-unity/templates/node.yaml +@@ -97,7 +97,7 @@ spec: + add: ["SYS_ADMIN"] + allowPrivilegeEscalation: true + imagePullPolicy: {{ .Values.imagePullPolicy }} +- image: {{ required "Must provide the podmon container image." .Values.podmon.image }} ++ image: {{ .Values.podmon.image }} + args: + {{- toYaml .Values.podmon.node.args | nindent 12 }} + env: +@@ -145,7 +145,7 @@ spec: + capabilities: + add: ["SYS_ADMIN"] + allowPrivilegeEscalation: true +- image: "{{ required "Must provide the driver image repository." .Values.images.driverRepository }}/{{ .Chart.Name }}:{{ .Values.version }}" ++ image: {{ .Values.driver.image }} + args: + - "--driver-name=csi-unity.dellemc.com" + - "--driver-config=/unity-config/driver-config-params.yaml" +@@ -204,7 +204,7 @@ spec: + - name: unity-secret + mountPath: /unity-secret + - name: registrar +- image: {{ required "Must provide the CSI registrar container image." ( include "csi-unity.registrarImage" . ) }} ++ image: {{ .Values.node.registrar.image }} + args: + - "--v=5" + - "--csi-address=$(ADDRESS)" +-- +2.25.1 diff --git a/csi-unity-helm/debian/deb_folder/patches/0006-csi-unity-fix-pull-image-error.patch b/csi-unity-helm/debian/deb_folder/patches/0006-csi-unity-fix-pull-image-error.patch new file mode 100644 index 0000000..ec4e949 --- /dev/null +++ b/csi-unity-helm/debian/deb_folder/patches/0006-csi-unity-fix-pull-image-error.patch @@ -0,0 +1,45 @@ +From fad53c21edbdf1574ff8b210beee115b22b9d556 Mon Sep 17 00:00:00 2001 +From: Gustavo Ornaghi Antunes +Date: Fri, 14 Apr 2023 13:26:41 -0300 +Subject: [PATCH] csi-unity: fix pull image error + +This patch consists of adding imagePullSecrets with name +default-registry-key only in ServiceAccounts. +It's necessary because without it the system can't use the +images from the registry local. + +Signed-off-by: Gustavo Ornaghi Antunes +Signed-off-by: Hediberto Cavalcante da Silva +--- + helm/csi-unity/templates/controller.yaml | 2 ++ + helm/csi-unity/templates/node.yaml | 2 ++ + 2 files changed, 4 insertions(+) + +diff --git a/helm/csi-unity/templates/controller.yaml b/helm/csi-unity/templates/controller.yaml +index 7c534c4..70dd4ee 100644 +--- a/helm/csi-unity/templates/controller.yaml ++++ b/helm/csi-unity/templates/controller.yaml +@@ -4,6 +4,8 @@ kind: ServiceAccount + metadata: + name: {{ .Release.Name }}-controller + namespace: {{ .Release.Namespace }} ++imagePullSecrets: ++ - name: default-registry-key + --- + kind: ClusterRole + apiVersion: rbac.authorization.k8s.io/v1 +diff --git a/helm/csi-unity/templates/node.yaml b/helm/csi-unity/templates/node.yaml +index df9378e..d68b64c 100644 +--- a/helm/csi-unity/templates/node.yaml ++++ b/helm/csi-unity/templates/node.yaml +@@ -4,6 +4,8 @@ kind: ServiceAccount + metadata: + name: {{ .Release.Name }}-node + namespace: {{ .Release.Namespace }} ++imagePullSecrets: ++ - name: default-registry-key + --- + kind: ClusterRole + apiVersion: rbac.authorization.k8s.io/v1 +-- +2.25.1 diff --git a/csi-unity-helm/debian/deb_folder/patches/0007-csi-unity-add-secretcert-in-templates.patch b/csi-unity-helm/debian/deb_folder/patches/0007-csi-unity-add-secretcert-in-templates.patch new file mode 100644 index 0000000..9e90494 --- /dev/null +++ b/csi-unity-helm/debian/deb_folder/patches/0007-csi-unity-add-secretcert-in-templates.patch @@ -0,0 +1,32 @@ +From b3850d77ac953db0adb3389a53a7a8b2b8f57282 Mon Sep 17 00:00:00 2001 +From: Gustavo Ornaghi Antunes +Date: Fri, 14 Apr 2023 13:32:13 -0300 +Subject: [PATCH] csi-unity: add secretcert in templates + +This patch consists in add an extra secret containing the https certificate +that is used by the helm chart. + +Signed-off-by: Gustavo Ornaghi Antunes +Signed-off-by: Hediberto Cavalcante da Silva +--- + helm/csi-unity/templates/secretcert.yaml | 9 +++++++++ + 1 file changed, 9 insertions(+) + create mode 100644 helm/csi-unity/templates/secretcert.yaml + +diff --git a/helm/csi-unity/templates/secretcert.yaml b/helm/csi-unity/templates/secretcert.yaml +new file mode 100644 +index 0000000..bf46b33 +--- /dev/null ++++ b/helm/csi-unity/templates/secretcert.yaml +@@ -0,0 +1,9 @@ ++{{- if .Values.secrets.create }} ++apiVersion: v1 ++kind: Secret ++metadata: ++ name: {{ .Release.Name }}-certs-0 ++ namespace: {{ .Release.Namespace }} ++stringData: ++ cert-0: {{ .Values.certSecret | default "" | quote }} ++{{- end }} +-- +2.25.1 diff --git a/csi-unity-helm/debian/deb_folder/patches/0008-csi-unity-enabling-csm-resiliency.patch b/csi-unity-helm/debian/deb_folder/patches/0008-csi-unity-enabling-csm-resiliency.patch new file mode 100644 index 0000000..df9dd53 --- /dev/null +++ b/csi-unity-helm/debian/deb_folder/patches/0008-csi-unity-enabling-csm-resiliency.patch @@ -0,0 +1,173 @@ +From 3552dc6b6c607ceab07d7c07c1df9aa083e96109 Mon Sep 17 00:00:00 2001 +From: Gustavo Ornaghi Antunes +Date: Thu, 15 Jun 2023 08:58:51 -0300 +Subject: [PATCH] csi-unity: enabling csm-resiliency + +This patch consists of changing the format of the values in templates and +changing the values.yaml for the user be able to enable csm-resiliency. + +Signed-off-by: Gustavo Ornaghi Antunes +Signed-off-by: Hediberto Cavalcante da Silva +--- + helm/csi-unity/templates/controller.yaml | 8 ++-- + .../templates/driver-config-params.yaml | 2 +- + helm/csi-unity/templates/node.yaml | 8 ++-- + helm/csi-unity/values.yaml | 43 ++++++++++--------- + 4 files changed, 32 insertions(+), 29 deletions(-) + +diff --git a/helm/csi-unity/templates/controller.yaml b/helm/csi-unity/templates/controller.yaml +index ec856fc..8898988 100644 +--- a/helm/csi-unity/templates/controller.yaml ++++ b/helm/csi-unity/templates/controller.yaml +@@ -19,7 +19,7 @@ rules: + verbs: ["list", "watch", "create", "update", "patch"] + - apiGroups: [""] + resources: ["nodes"] +-{{- if .Values.podmon.enabled }} ++{{- if .Values.csm.resiliency }} + verbs: ["get", "list", "watch", "patch"] + {{- else }} + verbs: ["get", "list", "watch"] +@@ -35,7 +35,7 @@ rules: + verbs: ["get", "list", "watch"] + - apiGroups: ["storage.k8s.io"] + resources: ["volumeattachments"] +-{{- if .Values.podmon.enabled }} ++{{- if .Values.csm.resiliency }} + verbs: ["get", "list", "watch", "update", "patch", "delete"] + {{- else }} + verbs: ["get", "list", "watch", "update","patch"] +@@ -51,7 +51,7 @@ rules: + verbs: ["get", "list", "watch"] + - apiGroups: [""] + resources: ["pods"] +-{{- if .Values.podmon.enabled }} ++{{- if .Values.csm.resiliency }} + verbs: ["get", "list", "watch", "update", "delete"] + {{- else }} + verbs: ["get", "list", "watch"] +@@ -139,7 +139,7 @@ spec: + {{- toYaml .Values.controller.tolerations | nindent 6 }} + {{- end }} + containers: +-{{- if .Values.podmon.enabled }} ++{{- if .Values.csm.resiliency }} + - name: podmon + imagePullPolicy: {{ .Values.imagePullPolicy }} + image: {{ .Values.podmon.image }} +diff --git a/helm/csi-unity/templates/driver-config-params.yaml b/helm/csi-unity/templates/driver-config-params.yaml +index 2bbf894..d8b2d56 100644 +--- a/helm/csi-unity/templates/driver-config-params.yaml ++++ b/helm/csi-unity/templates/driver-config-params.yaml +@@ -10,7 +10,7 @@ data: + MAX_UNITY_VOLUMES_PER_NODE: "{{ .Values.maxUnityVolumesPerNode }}" + SYNC_NODE_INFO_TIME_INTERVAL: "{{ .Values.syncNodeInfoInterval }}" + TENANT_NAME: "{{ .Values.tenantName }}" +- {{ if .Values.podmon.enabled }} ++ {{ if .Values.csm.resiliency }} + PODMON_CONTROLLER_LOG_LEVEL: "{{ .Values.logLevel }}" + PODMON_CONTROLLER_LOG_FORMAT: "TEXT" + PODMON_NODE_LOG_LEVEL: "{{ .Values.logLevel }}" +diff --git a/helm/csi-unity/templates/node.yaml b/helm/csi-unity/templates/node.yaml +index 671e690..872f6d8 100644 +--- a/helm/csi-unity/templates/node.yaml ++++ b/helm/csi-unity/templates/node.yaml +@@ -36,7 +36,7 @@ rules: + resourceNames: [ "privileged" ] + resources: [ "securitycontextconstraints" ] + verbs: [ "use" ] +-{{- if .Values.podmon.enabled }} ++{{- if .Values.csm.resiliency }} + - apiGroups: [ "" ] + resources: [ "pods" ] + verbs: [ "get", "list", "watch", "update", "delete" ] +@@ -74,7 +74,7 @@ spec: + metadata: + labels: + app: {{ .Release.Name }}-node +-{{- if .Values.podmon.enabled }} ++{{- if .Values.csm.resiliency }} + driver.dellemc.com: dell-storage + {{- end }} + spec: +@@ -91,7 +91,7 @@ spec: + hostNetwork: true + dnsPolicy: {{ .Values.node.dnsPolicy }} + containers: +-{{- if .Values.podmon.enabled }} ++{{- if .Values.csm.resiliency }} + - name: podmon + securityContext: + privileged: true +@@ -265,7 +265,7 @@ spec: + - name: unity-secret + secret: + secretName: {{ .Release.Name }}-creds +-{{- if .Values.podmon.enabled }} ++{{- if .Values.csm.resiliency }} + - name: usr-bin + hostPath: + path: /usr/bin +diff --git a/helm/csi-unity/values.yaml b/helm/csi-unity/values.yaml +index 8a54909..6b68af0 100644 +--- a/helm/csi-unity/values.yaml ++++ b/helm/csi-unity/values.yaml +@@ -1,6 +1,9 @@ + ## K8S/DRIVER ATTRIBUTES + ######################## + ++csm: ++ resiliency: false ++ + # version: version of this values file + # Note: Do not change this value + # Examples : "v2.6.0" , "nightly" +@@ -205,26 +208,26 @@ podmon: + # default value : None + # Example : "podman:latest", "pod:latest" + image: dellemc/podmon:v1.5.0 +-# controller: +-# args: +-# - "--csisock=unix:/var/run/csi/csi.sock" +-# - "--labelvalue=csi-unity" +-# - "--driverPath=csi-unity.dellemc.com" +-# - "--mode=controller" +-# - "--skipArrayConnectionValidation=false" +-# - "--driver-config-params=/unity-config/driver-config-params.yaml" +-# - "--driverPodLabelValue=dell-storage" +-# - "--ignoreVolumelessPods=false" +-# node: +-# args: +-# - "--csisock=unix:/var/lib/kubelet/plugins/unity.emc.dell.com/csi_sock" +-# - "--labelvalue=csi-unity" +-# - "--driverPath=csi-unity.dellemc.com" +-# - "--mode=node" +-# - "--leaderelection=false" +-# - "--driver-config-params=/unity-config/driver-config-params.yaml" +-# - "--driverPodLabelValue=dell-storage" +-# - "--ignoreVolumelessPods=false" ++ controller: ++ args: ++ - "--csisock=unix:/var/run/csi/csi.sock" ++ - "--labelvalue=csi-unity" ++ - "--driverPath=csi-unity.dellemc.com" ++ - "--mode=controller" ++ - "--skipArrayConnectionValidation=false" ++ - "--driver-config-params=/unity-config/driver-config-params.yaml" ++ - "--driverPodLabelValue=dell-storage" ++ - "--ignoreVolumelessPods=false" ++ node: ++ args: ++ - "--csisock=unix:/var/lib/kubelet/plugins/unity.emc.dell.com/csi_sock" ++ - "--labelvalue=csi-unity" ++ - "--driverPath=csi-unity.dellemc.com" ++ - "--mode=node" ++ - "--leaderelection=false" ++ - "--driver-config-params=/unity-config/driver-config-params.yaml" ++ - "--driverPodLabelValue=dell-storage" ++ - "--ignoreVolumelessPods=false" + + storageClasses: + +-- +2.25.1 diff --git a/csi-unity-helm/debian/deb_folder/patches/0009-csi-unity-add-label-app.starlingx.io-component.patch b/csi-unity-helm/debian/deb_folder/patches/0009-csi-unity-add-label-app.starlingx.io-component.patch new file mode 100644 index 0000000..f18d10a --- /dev/null +++ b/csi-unity-helm/debian/deb_folder/patches/0009-csi-unity-add-label-app.starlingx.io-component.patch @@ -0,0 +1,50 @@ +From 2671c6bd3813dc4afc2aad7e513f52fc31c1e356 Mon Sep 17 00:00:00 2001 +From: Gustavo Ornaghi Antunes +Date: Tue, 27 Jun 2023 12:11:59 -0300 +Subject: [PATCH] csi-unity: add label app.starlingx.io/component + +This patch consists of changing the strategy from the Deployment resource and +add the app.starlingx.io/component label in all pods. +The strategy was needed changing because in the reapply the old replicasets +were not being deleted. The default value was rollingUpdate. +In this case, it doesn't effect functionality. + +Signed-off-by: Gustavo Ornaghi Antunes +Signed-off-by: Hediberto Cavalcante da Silva +--- + helm/csi-unity/templates/controller.yaml | 3 +++ + helm/csi-unity/templates/node.yaml | 1 + + 2 files changed, 4 insertions(+) + +diff --git a/helm/csi-unity/templates/controller.yaml b/helm/csi-unity/templates/controller.yaml +index 8898988..2a2e081 100644 +--- a/helm/csi-unity/templates/controller.yaml ++++ b/helm/csi-unity/templates/controller.yaml +@@ -114,10 +114,13 @@ spec: + selector: + matchLabels: + app: {{ .Release.Name }}-controller ++ strategy: ++ type: Recreate + template: + metadata: + labels: + app: {{ .Release.Name }}-controller ++ app.starlingx.io/component: {{ index .Values "app.starlingx.io/component" }} + spec: + serviceAccountName: {{ .Release.Name }}-controller + affinity: +diff --git a/helm/csi-unity/templates/node.yaml b/helm/csi-unity/templates/node.yaml +index 872f6d8..fbc5bf4 100644 +--- a/helm/csi-unity/templates/node.yaml ++++ b/helm/csi-unity/templates/node.yaml +@@ -74,6 +74,7 @@ spec: + metadata: + labels: + app: {{ .Release.Name }}-node ++ app.starlingx.io/component: {{ index .Values "app.starlingx.io/component" }} + {{- if .Values.csm.resiliency }} + driver.dellemc.com: dell-storage + {{- end }} +-- +2.25.1 diff --git a/csi-unity-helm/debian/deb_folder/patches/series b/csi-unity-helm/debian/deb_folder/patches/series new file mode 100644 index 0000000..2c57638 --- /dev/null +++ b/csi-unity-helm/debian/deb_folder/patches/series @@ -0,0 +1,9 @@ +0001-csi-unity-add-apiVersion.patch +0002-csi-unity-add-secret-in-templates.patch +0003-csi-unity-add-storageclass-in-templates.patch +0004-csi-unity-add-default-values-for-templates.patch +0005-csi-unity-fix-image-path-for-templates.patch +0006-csi-unity-fix-pull-image-error.patch +0007-csi-unity-add-secretcert-in-templates.patch +0008-csi-unity-enabling-csm-resiliency.patch +0009-csi-unity-add-label-app.starlingx.io-component.patch diff --git a/csi-unity-helm/debian/deb_folder/rules b/csi-unity-helm/debian/deb_folder/rules new file mode 100644 index 0000000..56daca6 --- /dev/null +++ b/csi-unity-helm/debian/deb_folder/rules @@ -0,0 +1,20 @@ +#!/usr/bin/make -f +export DH_VERBOSE = 1 + +export ROOT = debian/tmp +export APP_FOLDER = $(ROOT)/usr/lib/helm + +%: + dh $@ + +override_dh_auto_build: + + cp Makefile helm + cd helm && make csi-unity + +override_dh_auto_install: + # Install the app tar file. + install -d -m 755 $(APP_FOLDER) + install -p -D -m 755 helm/csi-unity*.tgz $(APP_FOLDER) + +override_dh_auto_test: diff --git a/csi-unity-helm/debian/deb_folder/source/format b/csi-unity-helm/debian/deb_folder/source/format new file mode 100644 index 0000000..163aaf8 --- /dev/null +++ b/csi-unity-helm/debian/deb_folder/source/format @@ -0,0 +1 @@ +3.0 (quilt) diff --git a/csi-unity-helm/debian/meta_data.yaml b/csi-unity-helm/debian/meta_data.yaml new file mode 100644 index 0000000..d8e5998 --- /dev/null +++ b/csi-unity-helm/debian/meta_data.yaml @@ -0,0 +1,14 @@ +--- +debname: csi-unity-helm +debver: 2.6-0 +dl_path: + name: csi-unity-2.6.0.tar.gz + url: https://github.com/dell/csi-unity/archive/v2.6.0.tar.gz + sha256sum: 6096c0b62c3cb5764de5a00bf26627b74812c6caea68d3465604cc61b4b41fac +src_files: + - csi-unity-helm/files/Makefile +revision: + dist: $STX_DIST + GITREVCOUNT: + BASE_SRCREV: 8db8f63466df064069133380243443e3822fa8ce + SRC_DIR: ${MY_REPO}/stx/app-dell-storage/csi-unity-helm diff --git a/csm-application-mobility-helm/csm-application-mobility-helm/files/Makefile b/csm-application-mobility-helm/csm-application-mobility-helm/files/Makefile new file mode 100644 index 0000000..794c6e3 --- /dev/null +++ b/csm-application-mobility-helm/csm-application-mobility-helm/files/Makefile @@ -0,0 +1,41 @@ +# +# Copyright 2017 The Openstack-Helm Authors. +# +# Copyright (c) 2023 Wind River Systems, Inc. +# +# SPDX-License-Identifier: Apache-2.0 +# +# It's necessary to set this because some environments don't link sh -> bash. +SHELL := /bin/bash +TASK := build + +EXCLUDES := doc tests tools logs tmp +CHARTS := $(filter-out $(EXCLUDES), $(patsubst %/.,%,$(wildcard */.))) + +.PHONY: $(EXCLUDES) $(CHARTS) + +all: $(CHARTS) + +$(CHARTS): + @if [ -d $@ ]; then \ + echo; \ + echo "===== Processing [$@] chart ====="; \ + make $(TASK)-$@; \ + fi + +init-%: + if [ -f $*/Makefile ]; then make -B $*; fi + +lint-%: init-% + if [ -d $* ]; then helm lint $*; fi + +build-%: lint-% + if [ -d $* ]; then helm package $*; fi + +clean: + rm -f */templates/_partials.tpl */templates/_globals.tpl + rm -f *tgz */charts/*tgz + rm -rf */charts */tmpcharts + +%: + @: diff --git a/csm-application-mobility-helm/csm-application-mobility-helm/files/velero/0001-velero-fix-pull-velero-image-error.patch b/csm-application-mobility-helm/csm-application-mobility-helm/files/velero/0001-velero-fix-pull-velero-image-error.patch new file mode 100644 index 0000000..d4e944e --- /dev/null +++ b/csm-application-mobility-helm/csm-application-mobility-helm/files/velero/0001-velero-fix-pull-velero-image-error.patch @@ -0,0 +1,29 @@ +From 437c02961287ebad6c1f10e0091003f467108a08 Mon Sep 17 00:00:00 2001 +From: Gustavo Ornaghi Antunes +Date: Fri, 19 May 2023 12:11:57 -0300 +Subject: [PATCH] velero: fix pull velero image error + +This patch consists of adding imagePullSecrets with name +default-registry-key only in ServiceAccounts. +It's necessary because without it the system can't use the +images from the registry local. + +Signed-off-by: Gustavo Ornaghi Antunes +Signed-off-by: Hediberto Cavalcante da Silva +--- + .../charts/velero/templates/serviceaccount-server.yaml | 2 ++ + 1 file changed, 2 insertions(+) + +diff --git a/charts/csm-application-mobility/charts/velero/templates/serviceaccount-server.yaml b/charts/csm-application-mobility/charts/velero/templates/serviceaccount-server.yaml +index c295364..03980ff 100644 +--- a/charts/csm-application-mobility/charts/velero/templates/serviceaccount-server.yaml ++++ b/charts/csm-application-mobility/charts/velero/templates/serviceaccount-server.yaml +@@ -16,4 +16,6 @@ metadata: + {{- with .Values.serviceAccount.server.labels }} + {{- toYaml . | nindent 4 }} + {{- end }} ++imagePullSecrets: ++ - name: default-registry-key + {{- end }} +-- +2.25.1 diff --git a/csm-application-mobility-helm/csm-application-mobility-helm/files/velero/0002-velero-add-label-app.starlingx.io-component.patch b/csm-application-mobility-helm/csm-application-mobility-helm/files/velero/0002-velero-add-label-app.starlingx.io-component.patch new file mode 100644 index 0000000..1c0cf73 --- /dev/null +++ b/csm-application-mobility-helm/csm-application-mobility-helm/files/velero/0002-velero-add-label-app.starlingx.io-component.patch @@ -0,0 +1,27 @@ +From 8578670b927b5b395c9dc60c3d3a20cbf6778241 Mon Sep 17 00:00:00 2001 +From: Hediberto Cavalcante da Silva +Date: Tue, 27 Jun 2023 18:38:53 -0300 +Subject: [PATCH] velero: add label app.starlingx.io/component + +This patch consists of adding the app.starlingx.io/component label in all pods. + +Signed-off-by: Hediberto Cavalcante da Silva +Signed-off-by: Gustavo Ornaghi Antunes +--- + .../charts/velero/templates/deployment.yaml | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/charts/csm-application-mobility/charts/velero/templates/deployment.yaml b/charts/csm-application-mobility/charts/velero/templates/deployment.yaml +index cf60d07..2a8fcb8 100644 +--- a/charts/csm-application-mobility/charts/velero/templates/deployment.yaml ++++ b/charts/csm-application-mobility/charts/velero/templates/deployment.yaml +@@ -30,6 +30,7 @@ spec: + metadata: + labels: + name: velero ++ app.starlingx.io/component: {{ index .Values "app.starlingx.io/component" }} + app.kubernetes.io/name: {{ include "velero.name" . }} + app.kubernetes.io/instance: {{ .Release.Name }} + app.kubernetes.io/managed-by: {{ .Release.Service }} +-- +2.25.1 diff --git a/csm-application-mobility-helm/debian/deb_folder/changelog b/csm-application-mobility-helm/debian/deb_folder/changelog new file mode 100644 index 0000000..144b49d --- /dev/null +++ b/csm-application-mobility-helm/debian/deb_folder/changelog @@ -0,0 +1,5 @@ +csm-application-mobility-helm (0.3-0) unstable; urgency=medium + + * Initial release. + + -- Hediberto Cavalcante da Silva Thu, 30 Mar 2023 15:15:00 +0000 diff --git a/csm-application-mobility-helm/debian/deb_folder/control b/csm-application-mobility-helm/debian/deb_folder/control new file mode 100644 index 0000000..9ecc915 --- /dev/null +++ b/csm-application-mobility-helm/debian/deb_folder/control @@ -0,0 +1,15 @@ +Source: csm-application-mobility-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: csm-application-mobility-helm +Section: libs +Architecture: any +Depends: ${misc:Depends} +Description: StarlingX Dell CSM Application Mobility Helm Charts + This package contains helm charts for the Dell CSM Application Mobility. diff --git a/csm-application-mobility-helm/debian/deb_folder/copyright b/csm-application-mobility-helm/debian/deb_folder/copyright new file mode 100644 index 0000000..d1f7a74 --- /dev/null +++ b/csm-application-mobility-helm/debian/deb_folder/copyright @@ -0,0 +1,41 @@ +Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ +Upstream-Name: csm-observability-helm +Source: https://opendev.org/starlingx/app-dell-storage/ + +Files: * +Copyright: (c) 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: 2022 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/csm-application-mobility-helm/debian/deb_folder/csm-application-mobility-helm.install b/csm-application-mobility-helm/debian/deb_folder/csm-application-mobility-helm.install new file mode 100644 index 0000000..8a0c6de --- /dev/null +++ b/csm-application-mobility-helm/debian/deb_folder/csm-application-mobility-helm.install @@ -0,0 +1 @@ +usr/lib/helm/* diff --git a/csm-application-mobility-helm/debian/deb_folder/patches/0001-csm-application-mobility-update-dependencies.patch b/csm-application-mobility-helm/debian/deb_folder/patches/0001-csm-application-mobility-update-dependencies.patch new file mode 100644 index 0000000..f92caa9 --- /dev/null +++ b/csm-application-mobility-helm/debian/deb_folder/patches/0001-csm-application-mobility-update-dependencies.patch @@ -0,0 +1,37 @@ +From 96f514f9d92d22f5f8030926b5165db13a0739fc Mon Sep 17 00:00:00 2001 +From: Gustavo Ornaghi Antunes +Date: Mon, 15 May 2023 10:54:16 -0300 +Subject: [PATCH] csm-application-mobility: update dependencies + +This patch consists of removing the cert-manager dependency and +replacing the velero repository. +It was needed removing because cert-manager already exists +by default in the system avoiding a new install. + +Signed-off-by: Gustavo Ornaghi Antunes +Signed-off-by: Hediberto Cavalcante da Silva +--- + charts/csm-application-mobility/Chart.yaml | 8 +------- + 1 file changed, 1 insertion(+), 7 deletions(-) + +diff --git a/charts/csm-application-mobility/Chart.yaml b/charts/csm-application-mobility/Chart.yaml +index f1f6267..71a5ff0 100644 +--- a/charts/csm-application-mobility/Chart.yaml ++++ b/charts/csm-application-mobility/Chart.yaml +@@ -13,13 +13,7 @@ version: 0.3.0 + # follow Semantic Versioning. They should reflect the version the application is using. + # It is recommended to use it with quotes. + appVersion: "0.3.0" +- + dependencies: +-- name: cert-manager +- version: 1.8.2 +- repository: https://charts.jetstack.io +- condition: cert-manager.enabled + - name: velero + version: 2.29.8 +- repository: https://vmware-tanzu.github.io/helm-charts +- condition: velero.enabled ++ repository: file://charts/velero +-- +2.25.1 diff --git a/csm-application-mobility-helm/debian/deb_folder/patches/0002-csm-application-mobility-fix-pull-image-error.patch b/csm-application-mobility-helm/debian/deb_folder/patches/0002-csm-application-mobility-fix-pull-image-error.patch new file mode 100644 index 0000000..7ea1584 --- /dev/null +++ b/csm-application-mobility-helm/debian/deb_folder/patches/0002-csm-application-mobility-fix-pull-image-error.patch @@ -0,0 +1,28 @@ +From 3f39fa1828adaed869bde71dfa5c36e196ac11ae Mon Sep 17 00:00:00 2001 +From: Gustavo Ornaghi Antunes +Date: Tue, 16 May 2023 09:09:12 -0300 +Subject: [PATCH] csm-application-mobility: fix pull image error + +This patch consists of adding imagePullSecrets with name +default-registry-key only in ServiceAccounts. +It's necessary because without it the system can't use the +images from the registry local. + +Signed-off-by: Gustavo Ornaghi Antunes +Signed-off-by: Hediberto Cavalcante da Silva +--- + .../v1_serviceaccount_app-mobility-controller-manager.yaml | 2 ++ + 1 file changed, 2 insertions(+) + +diff --git a/charts/csm-application-mobility/templates/v1_serviceaccount_app-mobility-controller-manager.yaml b/charts/csm-application-mobility/templates/v1_serviceaccount_app-mobility-controller-manager.yaml +index a9c5206..2d82da1 100644 +--- a/charts/csm-application-mobility/templates/v1_serviceaccount_app-mobility-controller-manager.yaml ++++ b/charts/csm-application-mobility/templates/v1_serviceaccount_app-mobility-controller-manager.yaml +@@ -3,3 +3,5 @@ kind: ServiceAccount + metadata: + name: {{ .Release.Name }}-controller-manager + namespace: {{ include "custom.namespace" . }} ++imagePullSecrets: ++ - name: default-registry-key +-- +2.25.1 diff --git a/csm-application-mobility-helm/debian/deb_folder/patches/0003-csm-application-mobility-support-dynamic-rbac-value.patch b/csm-application-mobility-helm/debian/deb_folder/patches/0003-csm-application-mobility-support-dynamic-rbac-value.patch new file mode 100644 index 0000000..d8bfe7e --- /dev/null +++ b/csm-application-mobility-helm/debian/deb_folder/patches/0003-csm-application-mobility-support-dynamic-rbac-value.patch @@ -0,0 +1,44 @@ +From 92fa2850b5204482962740ec326a9ae938e3dd62 Mon Sep 17 00:00:00 2001 +From: Hediberto Cavalcante da Silva +Date: Tue, 16 May 2023 14:55:15 -0300 +Subject: [PATCH] csm-application-mobility: support dynamic rbac value + +This patch consists of changing the rbac image value from static to dynamic +allowing the system reads the image in values.yaml and add the registry local prefix. + +Signed-off-by: Hediberto Cavalcante da Silva +Signed-off-by: Gustavo Ornaghi Antunes +--- + .../apps_v1_deployment_app-mobility-controller-manager.yaml | 2 +- + charts/csm-application-mobility/values.yaml | 3 +++ + 2 files changed, 4 insertions(+), 1 deletion(-) + +diff --git a/charts/csm-application-mobility/templates/apps_v1_deployment_app-mobility-controller-manager.yaml b/charts/csm-application-mobility/templates/apps_v1_deployment_app-mobility-controller-manager.yaml +index ec4f9dd..b353fe2 100644 +--- a/charts/csm-application-mobility/templates/apps_v1_deployment_app-mobility-controller-manager.yaml ++++ b/charts/csm-application-mobility/templates/apps_v1_deployment_app-mobility-controller-manager.yaml +@@ -23,7 +23,7 @@ spec: + - --upstream=http://127.0.0.1:8080/ + - --logtostderr=true + - --v=10 +- image: gcr.io/kubebuilder/kube-rbac-proxy:v0.8.0 ++ image: {{ .Values.rbac.image }} + name: kube-rbac-proxy + ports: + - containerPort: 8443 +diff --git a/charts/csm-application-mobility/values.yaml b/charts/csm-application-mobility/values.yaml +index 5e091ed..40be3a6 100644 +--- a/charts/csm-application-mobility/values.yaml ++++ b/charts/csm-application-mobility/values.yaml +@@ -10,6 +10,9 @@ image: + controller: + image: dellemc/csm-application-mobility-controller:v0.3.0 + ++rbac: ++ image: gcr.io/kubebuilder/kube-rbac-proxy:v0.11.0 ++ + # csm-application-mobility requires cert-manager. If cert-manager is not already present in cluster, set enabled to true to install it too. + cert-manager: + enabled: false +-- +2.25.1 diff --git a/csm-application-mobility-helm/debian/deb_folder/patches/0004-csm-application-mobility-add-label-app.starlingx.io-component.patch b/csm-application-mobility-helm/debian/deb_folder/patches/0004-csm-application-mobility-add-label-app.starlingx.io-component.patch new file mode 100644 index 0000000..e73b50e --- /dev/null +++ b/csm-application-mobility-helm/debian/deb_folder/patches/0004-csm-application-mobility-add-label-app.starlingx.io-component.patch @@ -0,0 +1,39 @@ +From d50feca9077e5edb57dcc9a5c672194a2d675228 Mon Sep 17 00:00:00 2001 +From: Gustavo Ornaghi Antunes +Date: Tue, 27 Jun 2023 12:20:55 -0300 +Subject: [PATCH] csm-application-mobility: add label app.starlingx.io/component + +This patch consists of changing the strategy from the Deployment resource and +add the app.starlingx.io/component label in all pods. +The strategy was needed changing because in the reapply the old replicasets +were not being deleted. The default value was rollingUpdate. +In this case, it doesn't effect functionality. + +Signed-off-by: Gustavo Ornaghi Antunes +Signed-off-by: Hediberto Cavalcante da Silva +--- + .../apps_v1_deployment_app-mobility-controller-manager.yaml | 3 +++ + 1 file changed, 3 insertions(+) + +diff --git a/charts/csm-application-mobility/templates/apps_v1_deployment_app-mobility-controller-manager.yaml b/charts/csm-application-mobility/templates/apps_v1_deployment_app-mobility-controller-manager.yaml +index b353fe2..5150fac 100644 +--- a/charts/csm-application-mobility/templates/apps_v1_deployment_app-mobility-controller-manager.yaml ++++ b/charts/csm-application-mobility/templates/apps_v1_deployment_app-mobility-controller-manager.yaml +@@ -10,12 +10,15 @@ spec: + selector: + matchLabels: + control-plane: controller-manager ++ strategy: ++ type: Recreate + template: + metadata: + annotations: + kubectl.kubernetes.io/default-container: manager + labels: + control-plane: controller-manager ++ app.starlingx.io/component: {{ index .Values "app.starlingx.io/component" }} + spec: + containers: + - args: +-- +2.25.1 diff --git a/csm-application-mobility-helm/debian/deb_folder/patches/series b/csm-application-mobility-helm/debian/deb_folder/patches/series new file mode 100644 index 0000000..54e43b9 --- /dev/null +++ b/csm-application-mobility-helm/debian/deb_folder/patches/series @@ -0,0 +1,4 @@ +0001-csm-application-mobility-update-dependencies.patch +0002-csm-application-mobility-fix-pull-image-error.patch +0003-csm-application-mobility-support-dynamic-rbac-value.patch +0004-csm-application-mobility-add-label-app.starlingx.io-component.patch diff --git a/csm-application-mobility-helm/debian/deb_folder/rules b/csm-application-mobility-helm/debian/deb_folder/rules new file mode 100644 index 0000000..e6fd0c3 --- /dev/null +++ b/csm-application-mobility-helm/debian/deb_folder/rules @@ -0,0 +1,31 @@ +#!/usr/bin/make -f +export DH_VERBOSE = 1 + +export ROOT = debian/tmp +export APP_FOLDER = $(ROOT)/usr/lib/helm +export VELERO_NAME_TGZ = velero-2.29.8.tgz +export VELERO_DIR = charts/csm-application-mobility/charts + +%: + dh $@ + +override_dh_auto_build: + + # including velero as a subchart + mkdir -p $(VELERO_DIR) + tar xzf $(VELERO_NAME_TGZ) -C $(VELERO_DIR) + + # patching velero + patch --no-backup-if-mismatch --fuzz=0 -p1 < 0001-velero-fix-pull-velero-image-error.patch + patch --no-backup-if-mismatch --fuzz=0 -p1 < 0002-velero-add-label-app.starlingx.io-component.patch + + # building csm + cp Makefile charts + cd charts && make csm-application-mobility + +override_dh_auto_install: + # Install the app tar file. + install -d -m 755 $(APP_FOLDER) + install -p -D -m 755 charts/csm-application-mobility*.tgz $(APP_FOLDER) + +override_dh_auto_test: diff --git a/csm-application-mobility-helm/debian/deb_folder/source/format b/csm-application-mobility-helm/debian/deb_folder/source/format new file mode 100644 index 0000000..163aaf8 --- /dev/null +++ b/csm-application-mobility-helm/debian/deb_folder/source/format @@ -0,0 +1 @@ +3.0 (quilt) diff --git a/csm-application-mobility-helm/debian/meta_data.yaml b/csm-application-mobility-helm/debian/meta_data.yaml new file mode 100644 index 0000000..9036ef9 --- /dev/null +++ b/csm-application-mobility-helm/debian/meta_data.yaml @@ -0,0 +1,21 @@ +--- +debname: csm-application-mobility-helm +debver: 0.3-0 +dl_path: + name: csm-application-mobility-0.3.0.tar.gz + url: https://github.com/dell/helm-charts/archive/csm-application-mobility-0.3.0.tar.gz + sha256sum: 30b7852326d4e306d863d9d021acfe478d2d75f24ca7f68b3a46cec757d9b8d3 +dl_files: + velero-2.29.8.tgz: + topdir: null + url: https://github.com/vmware-tanzu/helm-charts/releases/download/velero-2.29.8/velero-2.29.8.tgz + sha256sum: d555c869371b0cdeead55e7f21621b72ddc23c074b2ff90ecec5f3d5fdde1d46 +src_files: + - csm-application-mobility-helm/files/Makefile + - csm-application-mobility-helm/files/velero/0001-velero-fix-pull-velero-image-error.patch + - csm-application-mobility-helm/files/velero/0002-velero-add-label-app.starlingx.io-component.patch +revision: + dist: $STX_DIST + GITREVCOUNT: + BASE_SRCREV: 8db8f63466df064069133380243443e3822fa8ce + SRC_DIR: ${MY_REPO}/stx/app-dell-storage/csm-application-mobility-helm diff --git a/csm-observability-helm/csm-observability-helm/files/Makefile b/csm-observability-helm/csm-observability-helm/files/Makefile new file mode 100644 index 0000000..ef3a429 --- /dev/null +++ b/csm-observability-helm/csm-observability-helm/files/Makefile @@ -0,0 +1,42 @@ +# +# Copyright 2017 The Openstack-Helm Authors. +# +# Copyright (c) 2023 Wind River Systems, Inc. +# +# SPDX-License-Identifier: Apache-2.0 +# +# It's necessary to set this because some environments don't link sh -> bash. +SHELL := /bin/bash +TASK := build + +EXCLUDES := doc tests tools logs tmp +CHARTS := $(filter-out $(EXCLUDES), $(patsubst %/.,%,$(wildcard */.))) + +.PHONY: $(EXCLUDES) $(CHARTS) + +all: $(CHARTS) + +$(CHARTS): + @if [ -d $@ ]; then \ + echo; \ + echo "===== Processing [$@] chart ====="; \ + make $(TASK)-$@; \ + fi + +init-%: + if [ -f $*/Makefile ]; then make -C $*; fi + +lint-%: init-% + if [ -d $* ]; then helm lint $*; fi + +build-%: lint-% + if [ -d $* ]; then helm package $*; 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/csm-observability-helm/debian/deb_folder/changelog b/csm-observability-helm/debian/deb_folder/changelog new file mode 100644 index 0000000..2021eba --- /dev/null +++ b/csm-observability-helm/debian/deb_folder/changelog @@ -0,0 +1,5 @@ +csm-observability-helm (1.5-0) unstable; urgency=medium + + * Initial release. + + -- Hediberto Cavalcante da Silva Thu, 30 Mar 2023 15:15:00 +0000 diff --git a/csm-observability-helm/debian/deb_folder/control b/csm-observability-helm/debian/deb_folder/control new file mode 100644 index 0000000..150d806 --- /dev/null +++ b/csm-observability-helm/debian/deb_folder/control @@ -0,0 +1,15 @@ +Source: csm-observability-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: csm-observability-helm +Section: libs +Architecture: any +Depends: ${misc:Depends} +Description: StarlingX Dell CSM Observability Helm Charts + This package contains helm charts for the Dell CSM Observability. diff --git a/csm-observability-helm/debian/deb_folder/copyright b/csm-observability-helm/debian/deb_folder/copyright new file mode 100644 index 0000000..d1f7a74 --- /dev/null +++ b/csm-observability-helm/debian/deb_folder/copyright @@ -0,0 +1,41 @@ +Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ +Upstream-Name: csm-observability-helm +Source: https://opendev.org/starlingx/app-dell-storage/ + +Files: * +Copyright: (c) 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: 2022 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/csm-observability-helm/debian/deb_folder/csm-observability-helm.install b/csm-observability-helm/debian/deb_folder/csm-observability-helm.install new file mode 100644 index 0000000..8a0c6de --- /dev/null +++ b/csm-observability-helm/debian/deb_folder/csm-observability-helm.install @@ -0,0 +1 @@ +usr/lib/helm/* diff --git a/csm-observability-helm/debian/deb_folder/patches/0001-csm-observability-remove-cert-manager-dependency.patch b/csm-observability-helm/debian/deb_folder/patches/0001-csm-observability-remove-cert-manager-dependency.patch new file mode 100644 index 0000000..00ccfaf --- /dev/null +++ b/csm-observability-helm/debian/deb_folder/patches/0001-csm-observability-remove-cert-manager-dependency.patch @@ -0,0 +1,30 @@ +From 97fbf27069955ca0a9140c4174d9b3ed93d85989 Mon Sep 17 00:00:00 2001 +From: Hediberto Cavalcante da Silva +Date: Thu, 4 May 2023 09:27:26 -0300 +Subject: [PATCH] csm-observability: remove cert-manager dependency + +This patch consists of removing the cert-manager dependency. +It was needed removing because cert-manager already exists +by default in the system avoiding a new install. + +Signed-off-by: Hediberto Cavalcante da Silva +Signed-off-by: Gustavo Ornaghi Antunes +--- + charts/karavi-observability/Chart.yaml | 5 ----- + 1 file changed, 5 deletions(-) + +diff --git a/charts/karavi-observability/Chart.yaml b/charts/karavi-observability/Chart.yaml +index 12e90a1..e9b9041 100644 +--- a/charts/karavi-observability/Chart.yaml ++++ b/charts/karavi-observability/Chart.yaml +@@ -4,8 +4,3 @@ name: karavi-observability + description: CSM for Observability is part of the [Container Storage Modules](https://github.com/dell/csm) open source suite of Kubernetes storage enablers for Dell EMC storage products. CSM for Observability provides Kubernetes administrators with visibility into metrics and topology data related to containerized storage. + type: application + version: 1.5.0 +-dependencies: +-- name: cert-manager +- version: 1.10.0 +- repository: https://charts.jetstack.io +- condition: cert-manager.enabled +-- +2.25.1 diff --git a/csm-observability-helm/debian/deb_folder/patches/0002-csm-observability-fix-pull-image-error.patch b/csm-observability-helm/debian/deb_folder/patches/0002-csm-observability-fix-pull-image-error.patch new file mode 100644 index 0000000..b1418cc --- /dev/null +++ b/csm-observability-helm/debian/deb_folder/patches/0002-csm-observability-fix-pull-image-error.patch @@ -0,0 +1,122 @@ +From 415a9de635b0ec5aabc37d18d40c0ec57e60facf Mon Sep 17 00:00:00 2001 +From: Hediberto Cavalcante da Silva +Date: Mon, 8 May 2023 11:07:33 -0300 +Subject: [PATCH] csm-observability: fix pull image error + +This patch consists of adding imagePullSecrets with name +default-registry-key only in ServiceAccounts. +It's necessary because without it the system can't use the +images from the registry local. + +Signed-off-by: Hediberto Cavalcante da Silva +Signed-off-by: Gustavo Ornaghi Antunes +--- + .../karavi-metrics-powerflex-service-account.yaml | 3 ++- + .../karavi-metrics-powermax-service-account.yaml | 3 ++- + .../karavi-metrics-powerscale-service-account.yaml | 3 ++- + .../karavi-metrics-powerstore-service-account.yaml | 3 ++- + .../templates/karavi-topology-service-account.yaml | 3 ++- + .../templates/otel-collector.yaml | 11 +++++++++++ + 6 files changed, 21 insertions(+), 5 deletions(-) + +diff --git a/charts/karavi-observability/templates/karavi-metrics-powerflex-service-account.yaml b/charts/karavi-observability/templates/karavi-metrics-powerflex-service-account.yaml +index fabcc2c..35df65e 100644 +--- a/charts/karavi-observability/templates/karavi-metrics-powerflex-service-account.yaml ++++ b/charts/karavi-observability/templates/karavi-metrics-powerflex-service-account.yaml +@@ -6,7 +6,8 @@ kind: ServiceAccount + metadata: + name: {{ .Release.Name }}-metrics-powerflex-controller + namespace: {{ include "custom.namespace" . }} +- ++imagePullSecrets: ++ - name: default-registry-key + --- + + apiVersion: rbac.authorization.k8s.io/v1 +diff --git a/charts/karavi-observability/templates/karavi-metrics-powermax-service-account.yaml b/charts/karavi-observability/templates/karavi-metrics-powermax-service-account.yaml +index 089ed25..4a66651 100644 +--- a/charts/karavi-observability/templates/karavi-metrics-powermax-service-account.yaml ++++ b/charts/karavi-observability/templates/karavi-metrics-powermax-service-account.yaml +@@ -6,7 +6,8 @@ kind: ServiceAccount + metadata: + name: {{ .Release.Name }}-metrics-powermax-controller + namespace: {{ include "custom.namespace" . }} +- ++imagePullSecrets: ++ - name: default-registry-key + --- + + apiVersion: rbac.authorization.k8s.io/v1 +diff --git a/charts/karavi-observability/templates/karavi-metrics-powerscale-service-account.yaml b/charts/karavi-observability/templates/karavi-metrics-powerscale-service-account.yaml +index b0b8999..e03e8b5 100644 +--- a/charts/karavi-observability/templates/karavi-metrics-powerscale-service-account.yaml ++++ b/charts/karavi-observability/templates/karavi-metrics-powerscale-service-account.yaml +@@ -6,7 +6,8 @@ kind: ServiceAccount + metadata: + name: {{ .Release.Name }}-metrics-powerscale-controller + namespace: {{ include "custom.namespace" . }} +- ++imagePullSecrets: ++ - name: default-registry-key + --- + + apiVersion: rbac.authorization.k8s.io/v1 +diff --git a/charts/karavi-observability/templates/karavi-metrics-powerstore-service-account.yaml b/charts/karavi-observability/templates/karavi-metrics-powerstore-service-account.yaml +index 7cf2a37..ecd0f05 100644 +--- a/charts/karavi-observability/templates/karavi-metrics-powerstore-service-account.yaml ++++ b/charts/karavi-observability/templates/karavi-metrics-powerstore-service-account.yaml +@@ -6,7 +6,8 @@ kind: ServiceAccount + metadata: + name: {{ .Release.Name }}-metrics-powerstore-controller + namespace: {{ include "custom.namespace" . }} +- ++imagePullSecrets: ++ - name: default-registry-key + --- + + apiVersion: rbac.authorization.k8s.io/v1 +diff --git a/charts/karavi-observability/templates/karavi-topology-service-account.yaml b/charts/karavi-observability/templates/karavi-topology-service-account.yaml +index cb1f4cf..9f33672 100644 +--- a/charts/karavi-observability/templates/karavi-topology-service-account.yaml ++++ b/charts/karavi-observability/templates/karavi-topology-service-account.yaml +@@ -6,7 +6,8 @@ kind: ServiceAccount + metadata: + name: {{ .Release.Name }}-topology-controller + namespace: {{ include "custom.namespace" . }} +- ++imagePullSecrets: ++ - name: default-registry-key + --- + + apiVersion: rbac.authorization.k8s.io/v1 +diff --git a/charts/karavi-observability/templates/otel-collector.yaml b/charts/karavi-observability/templates/otel-collector.yaml +index 3cd1a69..badbc98 100644 +--- a/charts/karavi-observability/templates/otel-collector.yaml ++++ b/charts/karavi-observability/templates/otel-collector.yaml +@@ -21,6 +21,16 @@ metadata: + + --- + ++apiVersion: v1 ++kind: ServiceAccount ++metadata: ++ name: otel-collector ++ namespace: {{ include "custom.namespace" . }} ++imagePullSecrets: ++ - name: default-registry-key ++ ++--- ++ + apiVersion: v1 + kind: Service + metadata: +@@ -65,6 +75,7 @@ spec: + app.kubernetes.io/name: otel-collector + app.kubernetes.io/instance: {{ .Release.Name }} + spec: ++ serviceAccount: otel-collector + volumes: + - name: tls-secret + secret: +-- +2.25.1 diff --git a/csm-observability-helm/debian/deb_folder/patches/0003-csm-observability-change-powerstore-secret-name.patch b/csm-observability-helm/debian/deb_folder/patches/0003-csm-observability-change-powerstore-secret-name.patch new file mode 100644 index 0000000..4da670e --- /dev/null +++ b/csm-observability-helm/debian/deb_folder/patches/0003-csm-observability-change-powerstore-secret-name.patch @@ -0,0 +1,30 @@ +From fbc87969a23cb5a8f05d15337c587db9b79089ba Mon Sep 17 00:00:00 2001 +From: Hediberto Cavalcante da Silva +Date: Mon, 8 May 2023 14:50:11 -0300 +Subject: [PATCH] csm-observability: change powerstore secret name + +This patch consists of changing the secretName used from csi-powerstore. +It's needed because the secret of the powerstore is created based on +the default release name and it was used hard-coded here. + +Signed-off-by: Hediberto Cavalcante da Silva +Signed-off-by: Gustavo Ornaghi Antunes +--- + .../templates/karavi-metrics-powerstore.yaml | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/charts/karavi-observability/templates/karavi-metrics-powerstore.yaml b/charts/karavi-observability/templates/karavi-metrics-powerstore.yaml +index a54d1d5..8fcd046 100644 +--- a/charts/karavi-observability/templates/karavi-metrics-powerstore.yaml ++++ b/charts/karavi-observability/templates/karavi-metrics-powerstore.yaml +@@ -76,7 +76,7 @@ spec: + path: localhost.key + - name: powerstore-config + secret: +- secretName: powerstore-config ++ secretName: csi-powerstore-config + - name: tls-secret + secret: + secretName: otel-collector-tls +-- +2.25.1 diff --git a/csm-observability-helm/debian/deb_folder/patches/0004-csm-observability-remove-unnecessary-images.patch b/csm-observability-helm/debian/deb_folder/patches/0004-csm-observability-remove-unnecessary-images.patch new file mode 100644 index 0000000..2a8c8c1 --- /dev/null +++ b/csm-observability-helm/debian/deb_folder/patches/0004-csm-observability-remove-unnecessary-images.patch @@ -0,0 +1,49 @@ +From 44fd486de59fbfb0416dd69d6d9bc7715c23e9c5 Mon Sep 17 00:00:00 2001 +From: Gustavo Ornaghi Antunes +Date: Mon, 12 Jun 2023 14:14:23 -0300 +Subject: [PATCH] csm-observability: remove unnecessary images + +This patch consists of commenting the csm metrics images that +is not supported by the app yet. +This prevent the images are automatically downloaded +by the system. + +Signed-off-by: Gustavo Ornaghi Antunes +Signed-off-by: Hediberto Cavalcante da Silva +--- + charts/karavi-observability/values.yaml | 6 +++--- + 1 file changed, 3 insertions(+), 3 deletions(-) + +diff --git a/charts/karavi-observability/values.yaml b/charts/karavi-observability/values.yaml +index 135c1db..4c9ebce 100644 +--- a/charts/karavi-observability/values.yaml ++++ b/charts/karavi-observability/values.yaml +@@ -16,7 +16,7 @@ karaviTopology: + probability: 0.0 + + karaviMetricsPowerflex: +- image: dellemc/csm-metrics-powerflex:v1.5.0 ++ #image: dellemc/csm-metrics-powerflex:v1.5.0 + enabled: true + collectorAddr: otel-collector:55680 + # comma separated list of provisioner names (ex: csi-vxflexos.dellemc.com) +@@ -82,7 +82,7 @@ karaviMetricsPowerstore: + probability: 0.0 + + karaviMetricsPowerscale: +- image: dellemc/csm-metrics-powerscale:v1.2.0 ++ #image: dellemc/csm-metrics-powerscale:v1.2.0 + enabled: true + collectorAddr: otel-collector:55680 + # comma separated list of provisioner names (ex: csi-isilon.dellemc.com) +@@ -132,7 +132,7 @@ karaviMetricsPowerscale: + skipCertificateValidation: true + + karaviMetricsPowermax: +- image: dellemc/csm-metrics-powermax:v1.0.0 ++ #image: dellemc/csm-metrics-powermax:v1.0.0 + enabled: true + collectorAddr: otel-collector:55680 + # comma separated list of provisioner names (ex: csi-powermax.dellemc.com) +-- +2.25.1 diff --git a/csm-observability-helm/debian/deb_folder/patches/0005-csm-observability-add-label-app.starlingx.io-component.patch b/csm-observability-helm/debian/deb_folder/patches/0005-csm-observability-add-label-app.starlingx.io-component.patch new file mode 100644 index 0000000..5055f9d --- /dev/null +++ b/csm-observability-helm/debian/deb_folder/patches/0005-csm-observability-add-label-app.starlingx.io-component.patch @@ -0,0 +1,91 @@ +From 842f311821cddd59bff71b64126a3fd9c1b3d8de Mon Sep 17 00:00:00 2001 +From: Hediberto Cavalcante da Silva +Date: Tue, 27 Jun 2023 12:21:10 -0300 +Subject: [PATCH] csm-observability: add label app.starlingx.io/component + +This patch consists of adding the app.starlingx.io/component label in all pods. + +Signed-off-by: Hediberto Cavalcante da Silva +Signed-off-by: Gustavo Ornaghi Antunes +--- + .../karavi-observability/templates/karavi-metrics-powerflex.yaml | 1 + + .../karavi-observability/templates/karavi-metrics-powermax.yaml | 1 + + .../templates/karavi-metrics-powerscale.yaml | 1 + + .../templates/karavi-metrics-powerstore.yaml | 1 + + charts/karavi-observability/templates/karavi-topology.yaml | 1 + + charts/karavi-observability/templates/otel-collector.yaml | 1 + + 6 files changed, 6 insertions(+) +diff --git a/charts/karavi-observability/templates/karavi-metrics-powerflex.yaml b/charts/karavi-observability/templates/karavi-metrics-powerflex.yaml +index 177b3d1..8b2baf3 100644 +--- a/charts/karavi-observability/templates/karavi-metrics-powerflex.yaml ++++ b/charts/karavi-observability/templates/karavi-metrics-powerflex.yaml +@@ -46,6 +46,7 @@ spec: + labels: + app.kubernetes.io/name: karavi-metrics-powerflex + app.kubernetes.io/instance: {{ .Release.Name }} ++ app.starlingx.io/component: {{ index .Values "app.starlingx.io/component" }} + spec: + serviceAccount: {{ .Release.Name }}-metrics-powerflex-controller + containers: +diff --git a/charts/karavi-observability/templates/karavi-metrics-powermax.yaml b/charts/karavi-observability/templates/karavi-metrics-powermax.yaml +index 31891ab..acc9b35 100644 +--- a/charts/karavi-observability/templates/karavi-metrics-powermax.yaml ++++ b/charts/karavi-observability/templates/karavi-metrics-powermax.yaml +@@ -46,6 +46,7 @@ spec: + labels: + app.kubernetes.io/name: karavi-metrics-powermax + app.kubernetes.io/instance: {{ .Release.Name }} ++ app.starlingx.io/component: {{ index .Values "app.starlingx.io/component" }} + spec: + serviceAccount: {{ .Release.Name }}-metrics-powermax-controller + containers: +diff --git a/charts/karavi-observability/templates/karavi-metrics-powerscale.yaml b/charts/karavi-observability/templates/karavi-metrics-powerscale.yaml +index 510e946..56a43c1 100644 +--- a/charts/karavi-observability/templates/karavi-metrics-powerscale.yaml ++++ b/charts/karavi-observability/templates/karavi-metrics-powerscale.yaml +@@ -46,6 +46,7 @@ spec: + labels: + app.kubernetes.io/name: karavi-metrics-powerscale + app.kubernetes.io/instance: {{ .Release.Name }} ++ app.starlingx.io/component: {{ index .Values "app.starlingx.io/component" }} + spec: + serviceAccount: {{ .Release.Name }}-metrics-powerscale-controller + containers: +diff --git a/charts/karavi-observability/templates/karavi-metrics-powerstore.yaml b/charts/karavi-observability/templates/karavi-metrics-powerstore.yaml +index 8fcd046..0b593b7 100644 +--- a/charts/karavi-observability/templates/karavi-metrics-powerstore.yaml ++++ b/charts/karavi-observability/templates/karavi-metrics-powerstore.yaml +@@ -40,6 +40,7 @@ spec: + labels: + app.kubernetes.io/name: karavi-metrics-powerstore + app.kubernetes.io/instance: {{ .Release.Name }} ++ app.starlingx.io/component: {{ index .Values "app.starlingx.io/component" }} + spec: + serviceAccount: {{ .Release.Name }}-metrics-powerstore-controller + containers: +diff --git a/charts/karavi-observability/templates/karavi-topology.yaml b/charts/karavi-observability/templates/karavi-topology.yaml +index 68b4b19..0056dc9 100644 +--- a/charts/karavi-observability/templates/karavi-topology.yaml ++++ b/charts/karavi-observability/templates/karavi-topology.yaml +@@ -40,6 +40,7 @@ spec: + labels: + app.kubernetes.io/name: karavi-topology + app.kubernetes.io/instance: {{ .Release.Name }} ++ app.starlingx.io/component: {{ index .Values "app.starlingx.io/component" }} + spec: + volumes: + - name: karavi-topology-secret-volume +diff --git a/charts/karavi-observability/templates/otel-collector.yaml b/charts/karavi-observability/templates/otel-collector.yaml +index 316b88e..e9d1bc6 100644 +--- a/charts/karavi-observability/templates/otel-collector.yaml ++++ b/charts/karavi-observability/templates/otel-collector.yaml +@@ -73,6 +73,7 @@ spec: + labels: + app.kubernetes.io/name: otel-collector + app.kubernetes.io/instance: {{ .Release.Name }} ++ app.starlingx.io/component: {{ index .Values "app.starlingx.io/component" }} + spec: + serviceAccount: otel-collector + volumes: +-- +2.25.1 diff --git a/csm-observability-helm/debian/deb_folder/patches/series b/csm-observability-helm/debian/deb_folder/patches/series new file mode 100644 index 0000000..91e4975 --- /dev/null +++ b/csm-observability-helm/debian/deb_folder/patches/series @@ -0,0 +1,5 @@ +0001-csm-observability-remove-cert-manager-dependency.patch +0002-csm-observability-fix-pull-image-error.patch +0003-csm-observability-change-powerstore-secret-name.patch +0004-csm-observability-remove-unnecessary-images.patch +0005-csm-observability-add-label-app.starlingx.io-component.patch diff --git a/csm-observability-helm/debian/deb_folder/rules b/csm-observability-helm/debian/deb_folder/rules new file mode 100644 index 0000000..441a10c --- /dev/null +++ b/csm-observability-helm/debian/deb_folder/rules @@ -0,0 +1,20 @@ +#!/usr/bin/make -f +export DH_VERBOSE = 1 + +export ROOT = debian/tmp +export APP_FOLDER = $(ROOT)/usr/lib/helm + +%: + dh $@ + +override_dh_auto_build: + + cp Makefile charts + cd charts && make karavi-observability + +override_dh_auto_install: + # Install the app tar file. + install -d -m 755 $(APP_FOLDER) + install -p -D -m 755 charts/karavi-observability*.tgz $(APP_FOLDER) + +override_dh_auto_test: diff --git a/csm-observability-helm/debian/deb_folder/source/format b/csm-observability-helm/debian/deb_folder/source/format new file mode 100644 index 0000000..163aaf8 --- /dev/null +++ b/csm-observability-helm/debian/deb_folder/source/format @@ -0,0 +1 @@ +3.0 (quilt) diff --git a/csm-observability-helm/debian/meta_data.yaml b/csm-observability-helm/debian/meta_data.yaml new file mode 100644 index 0000000..bda44c8 --- /dev/null +++ b/csm-observability-helm/debian/meta_data.yaml @@ -0,0 +1,14 @@ +--- +debname: csm-observability-helm +debver: 1.5-0 +dl_path: + name: karavi-observability-1.5.0.tar.gz + url: https://github.com/dell/helm-charts/archive/karavi-observability-1.5.0.tar.gz + sha256sum: 84bf5f25f137450f8fd15e7b637d35c569a2329a05b9c97bd1162859ed4bbcbb +src_files: + - csm-observability-helm/files/Makefile +revision: + dist: $STX_DIST + GITREVCOUNT: + BASE_SRCREV: 8db8f63466df064069133380243443e3822fa8ce + SRC_DIR: ${MY_REPO}/stx/app-dell-storage/csm-observability-helm diff --git a/csm-replication-helm/csm-replication-helm/files/Makefile b/csm-replication-helm/csm-replication-helm/files/Makefile new file mode 100644 index 0000000..11f6249 --- /dev/null +++ b/csm-replication-helm/csm-replication-helm/files/Makefile @@ -0,0 +1,44 @@ +# +# Copyright 2017 The Openstack-Helm Authors. +# +# Copyright (c) 2019 Wind River Systems, Inc. +# +# SPDX-License-Identifier: Apache-2.0 +# +# It's necessary to set this because some environments don't link sh -> bash. +SHELL := /bin/bash +TASK := build + +EXCLUDES := helm-toolkit doc tests tools logs tmp +CHARTS := helm-toolkit $(filter-out $(EXCLUDES), $(patsubst %/.,%,$(wildcard */.))) + +.PHONY: $(EXCLUDES) $(CHARTS) + +all: $(CHARTS) + +$(CHARTS): + @if [ -d $@ ]; then \ + echo; \ + echo "===== Processing [$@] chart ====="; \ + make $(TASK)-$@; \ + fi + +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 + rm -v -f $*/requirements.lock $*/requirements.yaml + +build-%: lint-% + if [ -d $* ]; then helm package $*; 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/csm-replication-helm/debian/deb_folder/changelog b/csm-replication-helm/debian/deb_folder/changelog new file mode 100644 index 0000000..1fda147 --- /dev/null +++ b/csm-replication-helm/debian/deb_folder/changelog @@ -0,0 +1,5 @@ +csm-replication-helm (1.4-0) unstable; urgency=medium + + * Initial release. + + -- Hediberto Cavalcante da Silva Thu, 30 Mar 2023 15:15:00 +0000 diff --git a/csm-replication-helm/debian/deb_folder/control b/csm-replication-helm/debian/deb_folder/control new file mode 100644 index 0000000..c5ab55f --- /dev/null +++ b/csm-replication-helm/debian/deb_folder/control @@ -0,0 +1,15 @@ +Source: csm-replication-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: csm-replication-helm +Section: libs +Architecture: any +Depends: ${misc:Depends} +Description: StarlingX Dell CSM Replication Helm Charts + This package contains helm charts for the Dell CSM Replication. diff --git a/csm-replication-helm/debian/deb_folder/copyright b/csm-replication-helm/debian/deb_folder/copyright new file mode 100644 index 0000000..d452b30 --- /dev/null +++ b/csm-replication-helm/debian/deb_folder/copyright @@ -0,0 +1,41 @@ +Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ +Upstream-Name: csm-replication-helm +Source: https://opendev.org/starlingx/app-dell-storage/ + +Files: * +Copyright: (c) 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: 2022 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/csm-replication-helm/debian/deb_folder/csm-replication-helm.install b/csm-replication-helm/debian/deb_folder/csm-replication-helm.install new file mode 100644 index 0000000..8a0c6de --- /dev/null +++ b/csm-replication-helm/debian/deb_folder/csm-replication-helm.install @@ -0,0 +1 @@ +usr/lib/helm/* diff --git a/csm-replication-helm/debian/deb_folder/patches/0001-csm-replication-add-default-values-for-templates.patch b/csm-replication-helm/debian/deb_folder/patches/0001-csm-replication-add-default-values-for-templates.patch new file mode 100644 index 0000000..775c204 --- /dev/null +++ b/csm-replication-helm/debian/deb_folder/patches/0001-csm-replication-add-default-values-for-templates.patch @@ -0,0 +1,43 @@ +From ef603b1c87bd827dac112f19c7eaaab0b2978cd3 Mon Sep 17 00:00:00 2001 +From: Gustavo Ornaghi Antunes +Date: Fri, 2 Jun 2023 12:03:20 -0300 +Subject: [PATCH] csm-replication: add default values for templates + +This patch consists of adding the default values in the values.yaml of +the helm chart. +It's necessary because the images in templates were in unexpected format +for the system and because templates need default values to be able +to build the package. + +Signed-off-by: Gustavo Ornaghi Antunes +Signed-off-by: Hediberto Cavalcante da Silva +--- + helm/csm-replication/values.yaml | 9 ++++++++- + 1 file changed, 8 insertions(+), 1 deletion(-) + +diff --git a/helm/csm-replication/values.yaml b/helm/csm-replication/values.yaml +index d0022b4..27c2e64 100644 +--- a/helm/csm-replication/values.yaml ++++ b/helm/csm-replication/values.yaml +@@ -9,7 +9,8 @@ image: dellemc/dell-replication-controller:v1.4.0 + + # image: Defines controller's init container image. This shouldn't be changed + # Allowed values: string +-initImage: dellemc/dell-replication-init:v1.0.0 ++containerInit: ++ image: dellemc/dell-replication-init:v1.0.0 + + # logLevel: Defines initial log level for controller. This can be changed in runtime + # Allowed values: "debug", "info", "warn", "error", "panic" +@@ -39,3 +40,9 @@ retryIntervalMax: 5m + # - ip: "10.10.10.11" + # hostnames: + # - "foo.baz" ++ ++config: ++ clusterId: "" ++ ++replicationGroup: ++ create: false +-- +2.25.1 diff --git a/csm-replication-helm/debian/deb_folder/patches/0002-csm-replication-change-namespace-from-templates.patch b/csm-replication-helm/debian/deb_folder/patches/0002-csm-replication-change-namespace-from-templates.patch new file mode 100644 index 0000000..9c9f389 --- /dev/null +++ b/csm-replication-helm/debian/deb_folder/patches/0002-csm-replication-change-namespace-from-templates.patch @@ -0,0 +1,86 @@ +From e2931f66cfe436960118e40fd6aaec8ae8c475dc Mon Sep 17 00:00:00 2001 +From: Gustavo Ornaghi Antunes +Date: Wed, 7 Jun 2023 09:40:42 -0300 +Subject: [PATCH] csm-replication: change namespace from templates + +This patch consists of changing the hard-coded namespace value for +using the release namespace. + +Signed-off-by: Gustavo Ornaghi Antunes +Signed-off-by: Hediberto Cavalcante da Silva +--- + helm/csm-replication/templates/controller.yaml | 16 ++++++++-------- + 1 file changed, 8 insertions(+), 8 deletions(-) + +diff --git a/helm/csm-replication/templates/controller.yaml b/helm/csm-replication/templates/controller.yaml +index d8b850d..23a9496 100644 +--- a/helm/csm-replication/templates/controller.yaml ++++ b/helm/csm-replication/templates/controller.yaml +@@ -2,7 +2,7 @@ apiVersion: v1 + kind: ServiceAccount + metadata: + name: dell-replication-controller-sa +- namespace: dell-replication-controller ++ namespace: {{ .Release.Namespace }} + secrets: + - name: replication-secret + --- +@@ -179,10 +179,10 @@ apiVersion: v1 + kind: Secret + metadata: + name: replication-secret +- namespace: dell-replication-controller ++ namespace: {{ .Release.Namespace }} + annotations: + kubernetes.io/service-account.name: dell-replication-controller-sa +- kubernetes.io/service-account.namespace: dell-replication-controller ++ kubernetes.io/service-account.namespace: {{ .Release.Namespace }} + type: kubernetes.io/service-account-token + --- + apiVersion: rbac.authorization.k8s.io/v1 +@@ -196,7 +196,7 @@ roleRef: + subjects: + - kind: ServiceAccount + name: dell-replication-controller-sa +- namespace: dell-replication-controller ++ namespace: {{ .Release.Namespace }} + --- + apiVersion: rbac.authorization.k8s.io/v1 + kind: ClusterRoleBinding +@@ -209,14 +209,14 @@ roleRef: + subjects: + - kind: ServiceAccount + name: dell-replication-controller-sa +- namespace: dell-replication-controller ++ namespace: {{ .Release.Namespace }} + --- + {{- $secret := (lookup "v1" "ConfigMap" "dell-replication-controller" "dell-replication-controller-config").data -}} + apiVersion: v1 + kind: ConfigMap + metadata: + name: dell-replication-controller-config +- namespace: dell-replication-controller ++ namespace: {{ .Release.Namespace }} + {{ if $secret -}} + data: + {{- range $key, $value := $secret }} +@@ -236,7 +236,7 @@ metadata: + labels: + control-plane: controller-manager + name: dell-replication-controller-manager-metrics-service +- namespace: dell-replication-controller ++ namespace: {{ .Release.Namespace }} + spec: + ports: + - name: https +@@ -251,7 +251,7 @@ metadata: + labels: + control-plane: controller-manager + name: dell-replication-controller-manager +- namespace: dell-replication-controller ++ namespace: {{ .Release.Namespace }} + spec: + replicas: {{ .Values.replicas }} + selector: +-- +2.25.1 diff --git a/csm-replication-helm/debian/deb_folder/patches/0003-csm-replication-fix-pull-image-error.patch b/csm-replication-helm/debian/deb_folder/patches/0003-csm-replication-fix-pull-image-error.patch new file mode 100644 index 0000000..28cf033 --- /dev/null +++ b/csm-replication-helm/debian/deb_folder/patches/0003-csm-replication-fix-pull-image-error.patch @@ -0,0 +1,31 @@ +From fac0f5c1c336824cd30edb109f2b51b9745bf517 Mon Sep 17 00:00:00 2001 +From: Gustavo Ornaghi Antunes +Date: Thu, 27 Apr 2023 12:17:45 -0300 +Subject: [PATCH] csm-replication: fix pull image error + +This patch consists of adding imagePullSecrets with name +default-registry-key only in ServiceAccounts. +It's necessary because without it the system can't use the +images from the registry local. + +Signed-off-by: Gustavo Ornaghi Antunes +Signed-off-by: Hediberto Cavalcante da Silva +--- + helm/csm-replication/templates/controller.yaml | 2 ++ + 1 file changed, 2 insertions(+) + +diff --git a/helm/csm-replication/templates/controller.yaml b/helm/csm-replication/templates/controller.yaml +index 0703f19..1f3bd1f 100644 +--- a/helm/csm-replication/templates/controller.yaml ++++ b/helm/csm-replication/templates/controller.yaml +@@ -4,6 +4,8 @@ kind: ServiceAccount + metadata: + name: dell-replication-controller-sa + namespace: {{ .Release.Namespace }} ++imagePullSecrets: ++ - name: default-registry-key + secrets: + - name: replication-secret + --- +-- +2.25.1 diff --git a/csm-replication-helm/debian/deb_folder/patches/0004-csm-replication-change-image-path-for-templates.patch b/csm-replication-helm/debian/deb_folder/patches/0004-csm-replication-change-image-path-for-templates.patch new file mode 100644 index 0000000..9ec2ca3 --- /dev/null +++ b/csm-replication-helm/debian/deb_folder/patches/0004-csm-replication-change-image-path-for-templates.patch @@ -0,0 +1,29 @@ +From 81e1ac8fcb997f8deb46bfc63574fee7a6964c90 Mon Sep 17 00:00:00 2001 +From: Gustavo Ornaghi Antunes +Date: Wed, 7 Jun 2023 09:23:30 -0300 +Subject: [PATCH] csm-replication: change image path for templates + +This patch consists of changing the format to use the image path +following the expected format used by kube_app. + +Signed-off-by: Gustavo Ornaghi Antunes +Signed-off-by: Hediberto Cavalcante da Silva +--- + helm/csm-replication/templates/controller.yaml | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/helm/csm-replication/templates/controller.yaml b/helm/csm-replication/templates/controller.yaml +index 6d90677..93bb999 100644 +--- a/helm/csm-replication/templates/controller.yaml ++++ b/helm/csm-replication/templates/controller.yaml +@@ -273,7 +273,7 @@ spec: + initContainers: + - name: init-rg-migration + imagePullPolicy: Always +- image: {{ .Values.initImage }} ++ image: {{ .Values.containerInit.image }} + command: + - /upgrade/migrate_rg.sh + containers: +-- +2.25.1 diff --git a/csm-replication-helm/debian/deb_folder/patches/0005-csm-replication-support-setting-config-values.patch b/csm-replication-helm/debian/deb_folder/patches/0005-csm-replication-support-setting-config-values.patch new file mode 100644 index 0000000..6f007b5 --- /dev/null +++ b/csm-replication-helm/debian/deb_folder/patches/0005-csm-replication-support-setting-config-values.patch @@ -0,0 +1,35 @@ +From 8e85e2b310b3de14be982af38f46ab087e6cdd8a Mon Sep 17 00:00:00 2001 +From: Gustavo Ornaghi Antunes +Date: Fri, 28 Apr 2023 14:18:33 -0300 +Subject: [PATCH] csm-replication: support setting config values + +This patch consists of changing the config.yaml that is hard-coded +on the controller template for support the dynamic values. +Before, we needed change the configmap manually before deploy. + +Signed-off-by: Gustavo Ornaghi Antunes +Signed-off-by: Hediberto Cavalcante da Silva +--- + helm/csm-replication/templates/controller.yaml | 6 +++++- + 1 file changed, 5 insertions(+), 1 deletion(-) + +diff --git a/helm/csm-replication/templates/controller.yaml b/helm/csm-replication/templates/controller.yaml +index 93bb999..026fd12 100644 +--- a/helm/csm-replication/templates/controller.yaml ++++ b/helm/csm-replication/templates/controller.yaml +@@ -228,8 +228,12 @@ data: + {{ else -}} + data: + config.yaml: | +- clusterId: "" ++ clusterId: {{ .Values.config.clusterId }} ++ {{- if .Values.config.targets }} ++ targets: {{- .Values.config.targets | toYaml | nindent 4 }} ++ {{- else }} + targets: [] ++ {{- end }} + CSI_LOG_LEVEL: {{ .Values.logLevel }} + {{ end }} + --- +-- +2.25.1 diff --git a/csm-replication-helm/debian/deb_folder/patches/0006-csm-replication-fix-helm-lint-error.patch b/csm-replication-helm/debian/deb_folder/patches/0006-csm-replication-fix-helm-lint-error.patch new file mode 100644 index 0000000..86b9a07 --- /dev/null +++ b/csm-replication-helm/debian/deb_folder/patches/0006-csm-replication-fix-helm-lint-error.patch @@ -0,0 +1,29 @@ +From 78c89ce6d772d1e591672f72a48b2e8b88aab016 Mon Sep 17 00:00:00 2001 +From: Hediberto Cavalcante da Silva +Date: Thu, 15 Jun 2023 18:27:12 -0300 +Subject: [PATCH] csm-replication: fix helm lint error + +This patch consists of removing the dashes, because it didn't pass +by currently helm lint version in the system. + +Signed-off-by: Hediberto Cavalcante da Silva +Signed-off-by: Gustavo Ornaghi Antunes +--- + helm/csm-replication/templates/controller.yaml | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/helm/csm-replication/templates/controller.yaml b/helm/csm-replication/templates/controller.yaml +index bd33bd0..9fca1f5 100644 +--- a/helm/csm-replication/templates/controller.yaml ++++ b/helm/csm-replication/templates/controller.yaml +@@ -213,7 +213,7 @@ subjects: + name: dell-replication-controller-sa + namespace: {{ .Release.Namespace }} + --- +-{{- $secret := (lookup "v1" "ConfigMap" "dell-replication-controller" "dell-replication-controller-config").data -}} ++{{ $secret := (lookup "v1" "ConfigMap" "dell-replication-controller" "dell-replication-controller-config").data }} + apiVersion: v1 + kind: ConfigMap + metadata: +-- +2.25.1 diff --git a/csm-replication-helm/debian/deb_folder/patches/0007-csm-replication-add-label-app.starlingx.io-component.patch b/csm-replication-helm/debian/deb_folder/patches/0007-csm-replication-add-label-app.starlingx.io-component.patch new file mode 100644 index 0000000..1e18e9d --- /dev/null +++ b/csm-replication-helm/debian/deb_folder/patches/0007-csm-replication-add-label-app.starlingx.io-component.patch @@ -0,0 +1,26 @@ +From 7e63c20997978507d989e8691509adb777b9c1da Mon Sep 17 00:00:00 2001 +From: Hediberto Cavalcante da Silva +Date: Tue, 27 Jun 2023 12:13:34 -0300 +Subject: [PATCH] csm-replication: add label app.starlingx.io/component + +This patch consists of adding the app.starlingx.io/component label in all pods. + +Signed-off-by: Hediberto Cavalcante da Silva +Signed-off-by: Gustavo Ornaghi Antunes +--- + helm/csm-replication/templates/controller.yaml | 1 + + 1 file changed, 1 insertion(+) +diff --git a/helm/csm-replication/templates/controller.yaml b/helm/csm-replication/templates/controller.yaml +index 9fca1f5..4d86256 100644 +--- a/helm/csm-replication/templates/controller.yaml ++++ b/helm/csm-replication/templates/controller.yaml +@@ -267,6 +267,7 @@ spec: + metadata: + labels: + control-plane: controller-manager ++ app.starlingx.io/component: {{ index .Values "app.starlingx.io/component" }} + spec: + {{- if hasKey .Values "hostAliases" }} + hostAliases: +-- +2.25.1 diff --git a/csm-replication-helm/debian/deb_folder/patches/0008-csm-replication-add-replicationgroup-in-templates.patch b/csm-replication-helm/debian/deb_folder/patches/0008-csm-replication-add-replicationgroup-in-templates.patch new file mode 100644 index 0000000..d2f03f4 --- /dev/null +++ b/csm-replication-helm/debian/deb_folder/patches/0008-csm-replication-add-replicationgroup-in-templates.patch @@ -0,0 +1,48 @@ +From 54c301fd0288a766e6ff87f95ee9371992d4a050 Mon Sep 17 00:00:00 2001 +From: Hediberto Cavalcante da Silva +Date: Fri, 14 Jul 2023 18:39:33 -0300 +Subject: [PATCH] csm-replication: add DellCSIReplicationGroup in templates + +This patch consists of adding a DellCSIReplicationGroup in the helm chart +templates directory. It's needed because this helm chart needs that +DellCSIReplicationGroup should be created manually. + +Signed-off-by: Hediberto Cavalcante da Silva +Signed-off-by: Gustavo Ornaghi Antunes +--- + .../templates/replicationgroup.yaml | 24 +++++++++++++++++++ + 1 file changed, 24 insertions(+) + create mode 100644 helm/csm-replication/templates/replicationgroup.yaml + +diff --git a/helm/csm-replication/templates/replicationgroup.yaml b/helm/csm-replication/templates/replicationgroup.yaml +new file mode 100644 +index 0000000..80b8347 +--- /dev/null ++++ b/helm/csm-replication/templates/replicationgroup.yaml +@@ -0,0 +1,24 @@ ++{{- if .Values.replicationGroup.create }} ++kind: DellCSIReplicationGroup ++apiVersion: replication.storage.dell.com/v1 ++metadata: ++ name: {{ .Values.replicationGroup.name | default ( print "rg-" .Values.config.clusterId | lower ) }} ++ namespace: {{ .Release.Namespace }} ++spec: ++ driverName: {{ .Values.replicationGroup.driverName }} ++ action: {{ .Values.replicationGroup.action }} ++{{- if.Values.replicationGroup.protectionGroupAttributes }} ++ protectionGroupAttributes: ++ localAttributeKey: {{ .Values.replicationGroup.protectionGroupAttributes.localAttributeKey }} ++{{- end }} ++ protectionGroupId: {{ .Values.replicationGroup.protectionGroupId }} ++ remoteClusterId: {{ .Values.replicationGroup.remoteClusterId }} ++{{- if.Values.replicationGroup.remoteProtectionGroupAttributes }} ++ remoteProtectionGroupAttributes: ++ remoteAttributeKey: {{ .Values.replicationGroup.remoteProtectionGroupAttributes.remoteAttributeKey }} ++{{- end }} ++ remoteProtectionGroupId: {{ .Values.replicationGroup.remoteProtectionGroupId }} ++{{- if.Values.replicationGroup.requestParametersClass }} ++ requestParametersClass: {{ .Values.replicationGroup.requestParametersClass }} ++{{- end }} ++{{- end }} +-- +2.25.1 diff --git a/csm-replication-helm/debian/deb_folder/patches/series b/csm-replication-helm/debian/deb_folder/patches/series new file mode 100644 index 0000000..5d4475f --- /dev/null +++ b/csm-replication-helm/debian/deb_folder/patches/series @@ -0,0 +1,8 @@ +0001-csm-replication-add-default-values-for-templates.patch +0002-csm-replication-change-namespace-from-templates.patch +0003-csm-replication-fix-pull-image-error.patch +0004-csm-replication-change-image-path-for-templates.patch +0005-csm-replication-support-setting-config-values.patch +0006-csm-replication-fix-helm-lint-error.patch +0007-csm-replication-add-label-app.starlingx.io-component.patch +0008-csm-replication-add-replicationgroup-in-templates.patch diff --git a/csm-replication-helm/debian/deb_folder/rules b/csm-replication-helm/debian/deb_folder/rules new file mode 100644 index 0000000..aea5c47 --- /dev/null +++ b/csm-replication-helm/debian/deb_folder/rules @@ -0,0 +1,20 @@ +#!/usr/bin/make -f +export DH_VERBOSE = 1 + +export ROOT = debian/tmp +export APP_FOLDER = $(ROOT)/usr/lib/helm + +%: + dh $@ + +override_dh_auto_build: + + cp Makefile helm + cd helm && make csm-replication + +override_dh_auto_install: + # Install the app tar file. + install -d -m 755 $(APP_FOLDER) + install -p -D -m 755 helm/csm-replication*.tgz $(APP_FOLDER) + +override_dh_auto_test: diff --git a/csm-replication-helm/debian/deb_folder/source/format b/csm-replication-helm/debian/deb_folder/source/format new file mode 100644 index 0000000..163aaf8 --- /dev/null +++ b/csm-replication-helm/debian/deb_folder/source/format @@ -0,0 +1 @@ +3.0 (quilt) diff --git a/csm-replication-helm/debian/meta_data.yaml b/csm-replication-helm/debian/meta_data.yaml new file mode 100644 index 0000000..41b501e --- /dev/null +++ b/csm-replication-helm/debian/meta_data.yaml @@ -0,0 +1,14 @@ +--- +debname: csm-replication-helm +debver: 1.4-0 +dl_path: + name: csm-replication-1.4.0.tar.gz + url: https://github.com/dell/csm-replication/archive/v1.4.0.tar.gz + sha256sum: ba3f90bc8936213115a0c181d9f193916143a109d264b232c33e0491b620d83b +src_files: + - csm-replication-helm/files/Makefile +revision: + dist: $STX_DIST + GITREVCOUNT: + BASE_SRCREV: 8db8f63466df064069133380243443e3822fa8ce + SRC_DIR: ${MY_REPO}/stx/app-dell-storage/csm-replication-helm diff --git a/debian_build_layer.cfg b/debian_build_layer.cfg new file mode 100644 index 0000000..c581999 --- /dev/null +++ b/debian_build_layer.cfg @@ -0,0 +1 @@ +flock diff --git a/debian_iso_image.inc b/debian_iso_image.inc new file mode 100644 index 0000000..5a8bb41 --- /dev/null +++ b/debian_iso_image.inc @@ -0,0 +1 @@ +stx-dell-storage-helm diff --git a/debian_pkg_dirs b/debian_pkg_dirs new file mode 100644 index 0000000..31e3fd4 --- /dev/null +++ b/debian_pkg_dirs @@ -0,0 +1,7 @@ +csi-powerstore-helm +csi-unity-helm +csm-replication-helm +csm-observability-helm +csm-application-mobility-helm +python3-k8sapp-dell-storage +stx-dell-storage-helm diff --git a/python3-k8sapp-dell-storage/debian/deb_folder/changelog b/python3-k8sapp-dell-storage/debian/deb_folder/changelog new file mode 100644 index 0000000..b84b417 --- /dev/null +++ b/python3-k8sapp-dell-storage/debian/deb_folder/changelog @@ -0,0 +1,5 @@ +python3-k8sapp-dell-storage (1.0-1) unstable; urgency=medium + + * Initial release. + + -- Hediberto Cavalcante da Silva Wed, 5 Apr 2023 17:27:00 +0000 diff --git a/python3-k8sapp-dell-storage/debian/deb_folder/control b/python3-k8sapp-dell-storage/debian/deb_folder/control new file mode 100644 index 0000000..534c7bb --- /dev/null +++ b/python3-k8sapp-dell-storage/debian/deb_folder/control @@ -0,0 +1,28 @@ +Source: python3-k8sapp-dell-storage +Section: libs +Priority: optional +Maintainer: StarlingX Developers +Build-Depends: debhelper-compat (= 13), + dh-python, + python3-all, + python3-pbr, + python3-setuptools, + python3-wheel +Standards-Version: 4.5.1 +Homepage: https://www.starlingx.io + +Package: python3-k8sapp-dell-storage +Section: libs +Architecture: any +Depends: ${misc:Depends}, ${python3:Depends} +Description: StarlingX Sysinv Dell Storage Extensions + This package contains sysinv plugins for the Dell Storage K8S + apps. + +Package: python3-k8sapp-dell-storage-wheels +Section: libs +Architecture: any +Depends: ${misc:Depends}, ${python3:Depends}, python3-wheel +Description: StarlingX Sysinv Dell Storage Extension Wheels + This package contains python wheels for the Dell Storage K8S + app plugins. diff --git a/python3-k8sapp-dell-storage/debian/deb_folder/copyright b/python3-k8sapp-dell-storage/debian/deb_folder/copyright new file mode 100644 index 0000000..396cf20 --- /dev/null +++ b/python3-k8sapp-dell-storage/debian/deb_folder/copyright @@ -0,0 +1,41 @@ +Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ +Upstream-Name: python3-k8sapp-dell-storage +Source: https://opendev.org/starlingx/app-dell-storage/ + +Files: * +Copyright: (c) 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/python3-k8sapp-dell-storage/debian/deb_folder/python3-k8sapp-dell-storage-wheels.install b/python3-k8sapp-dell-storage/debian/deb_folder/python3-k8sapp-dell-storage-wheels.install new file mode 100644 index 0000000..6806cec --- /dev/null +++ b/python3-k8sapp-dell-storage/debian/deb_folder/python3-k8sapp-dell-storage-wheels.install @@ -0,0 +1 @@ +plugins/dell-storage/*.whl diff --git a/python3-k8sapp-dell-storage/debian/deb_folder/python3-k8sapp-dell-storage.install b/python3-k8sapp-dell-storage/debian/deb_folder/python3-k8sapp-dell-storage.install new file mode 100644 index 0000000..962c964 --- /dev/null +++ b/python3-k8sapp-dell-storage/debian/deb_folder/python3-k8sapp-dell-storage.install @@ -0,0 +1,2 @@ +usr/lib/python3/dist-packages/k8sapp_dell_storage-*.egg-info/* +usr/lib/python3/dist-packages/k8sapp_dell_storage/* diff --git a/python3-k8sapp-dell-storage/debian/deb_folder/rules b/python3-k8sapp-dell-storage/debian/deb_folder/rules new file mode 100644 index 0000000..a711b0f --- /dev/null +++ b/python3-k8sapp-dell-storage/debian/deb_folder/rules @@ -0,0 +1,31 @@ +#!/usr/bin/make -f +# export DH_VERBOSE = 1 + +export APP_NAME=dell-storage + +export DEB_VERSION = $(shell dpkg-parsechangelog | egrep '^Version:' | cut -f 2 -d ' ') +export MAJOR = $(shell echo $(DEB_VERSION) | cut -f 1 -d '-') +export MINOR_PATCH = $(shell echo $(DEB_VERSION) | cut -f 4 -d '.') +export PBR_VERSION=$(MAJOR).$(MINOR_PATCH) + +export PYBUILD_NAME=k8sapp-dell-storage +export SKIP_PIP_INSTALL=1 +export ROOT=debian/tmp + +%: + dh $@ --with=python3 --buildsystem=pybuild + +override_dh_auto_install: + python3 setup.py install --install-layout=deb --root $(ROOT) + python3 setup.py bdist_wheel \ + --universal \ + -d $(ROOT)/plugins/$(APP_NAME) + +override_dh_python3: + dh_python3 --shebang=/usr/bin/python3 + +ifeq (,$(findstring nocheck, $(DEB_BUILD_OPTIONS))) +override_dh_auto_test: + # (tbogue) FIXME + PYTHONDIR=$(CURDIR) stestr run || true +endif diff --git a/python3-k8sapp-dell-storage/debian/deb_folder/source/format b/python3-k8sapp-dell-storage/debian/deb_folder/source/format new file mode 100644 index 0000000..163aaf8 --- /dev/null +++ b/python3-k8sapp-dell-storage/debian/deb_folder/source/format @@ -0,0 +1 @@ +3.0 (quilt) diff --git a/python3-k8sapp-dell-storage/debian/meta_data.yaml b/python3-k8sapp-dell-storage/debian/meta_data.yaml new file mode 100644 index 0000000..e91e36a --- /dev/null +++ b/python3-k8sapp-dell-storage/debian/meta_data.yaml @@ -0,0 +1,9 @@ +--- +debname: python3-k8sapp-dell-storage +debver: 1.0-1 +src_path: k8sapp_dell_storage +revision: + dist: $STX_DIST + GITREVCOUNT: + BASE_SRCREV: 8db8f63466df064069133380243443e3822fa8ce + SRC_DIR: ${MY_REPO}/stx/app-dell-storage diff --git a/python3-k8sapp-dell-storage/k8sapp_dell_storage/.gitignore b/python3-k8sapp-dell-storage/k8sapp_dell_storage/.gitignore new file mode 100644 index 0000000..e39c1b7 --- /dev/null +++ b/python3-k8sapp-dell-storage/k8sapp_dell_storage/.gitignore @@ -0,0 +1,35 @@ +# Compiled files +*.py[co] +*.a +*.o +*.so + +# Sphinx +_build +doc/source/api/ + +# Packages/installer info +*.egg +*.egg-info +dist +build +eggs +parts +var +sdist +develop-eggs +.installed.cfg + +# Other +*.DS_Store +.stestr +.testrepository +.tox +.venv +.*.swp +.coverage +bandit.xml +cover +AUTHORS +ChangeLog +*.sqlite \ No newline at end of file diff --git a/python3-k8sapp-dell-storage/k8sapp_dell_storage/.stestr.conf b/python3-k8sapp-dell-storage/k8sapp_dell_storage/.stestr.conf new file mode 100644 index 0000000..bdb59e2 --- /dev/null +++ b/python3-k8sapp-dell-storage/k8sapp_dell_storage/.stestr.conf @@ -0,0 +1,4 @@ +[DEFAULT] +test_path=./k8sapp_dell_storage/tests +top_dir=./k8sapp_dell_storage +#parallel_class=True diff --git a/python3-k8sapp-dell-storage/k8sapp_dell_storage/LICENSE b/python3-k8sapp-dell-storage/k8sapp_dell_storage/LICENSE new file mode 100644 index 0000000..f8c5d44 --- /dev/null +++ b/python3-k8sapp-dell-storage/k8sapp_dell_storage/LICENSE @@ -0,0 +1,202 @@ + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright 2019 Wind River Systems, Inc. + + 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 + + http://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. \ No newline at end of file diff --git a/python3-k8sapp-dell-storage/k8sapp_dell_storage/README.rst b/python3-k8sapp-dell-storage/k8sapp_dell_storage/README.rst new file mode 100644 index 0000000..d418b5f --- /dev/null +++ b/python3-k8sapp-dell-storage/k8sapp_dell_storage/README.rst @@ -0,0 +1,7 @@ +k8sapp-dell-storage +=================== + +This project contains StarlingX Kubernetes application specific python plugins +for the platform integration application. These plugins are required to +integrate the application into the StarlingX application framework and to +support the various StarlingX deployments. diff --git a/python3-k8sapp-dell-storage/k8sapp_dell_storage/k8sapp_dell_storage/__init__.py b/python3-k8sapp-dell-storage/k8sapp_dell_storage/k8sapp_dell_storage/__init__.py new file mode 100644 index 0000000..6ca1ee6 --- /dev/null +++ b/python3-k8sapp-dell-storage/k8sapp_dell_storage/k8sapp_dell_storage/__init__.py @@ -0,0 +1,5 @@ +# +# Copyright (c) 2023 Wind River Systems, Inc. +# +# SPDX-License-Identifier: Apache-2.0 +# diff --git a/python3-k8sapp-dell-storage/k8sapp_dell_storage/k8sapp_dell_storage/common/__init__.py b/python3-k8sapp-dell-storage/k8sapp_dell_storage/k8sapp_dell_storage/common/__init__.py new file mode 100644 index 0000000..6ca1ee6 --- /dev/null +++ b/python3-k8sapp-dell-storage/k8sapp_dell_storage/k8sapp_dell_storage/common/__init__.py @@ -0,0 +1,5 @@ +# +# Copyright (c) 2023 Wind River Systems, Inc. +# +# SPDX-License-Identifier: Apache-2.0 +# diff --git a/python3-k8sapp-dell-storage/k8sapp_dell_storage/k8sapp_dell_storage/common/constants.py b/python3-k8sapp-dell-storage/k8sapp_dell_storage/k8sapp_dell_storage/common/constants.py new file mode 100644 index 0000000..672759e --- /dev/null +++ b/python3-k8sapp-dell-storage/k8sapp_dell_storage/k8sapp_dell_storage/common/constants.py @@ -0,0 +1,27 @@ +# +# Copyright (c) 2023 Wind River Systems, Inc. +# +# SPDX-License-Identifier: Apache-2.0 +# + +# Application Name +HELM_NS_DELL_STORAGE = 'dell-storage' +HELM_APP_DELL_STORAGE = 'dell-storage' + +# Helm: Supported charts: +HELM_CHART_CSI_POWERSTORE = 'csi-powerstore' +HELM_CHART_CSI_UNITY = 'csi-unity' +HELM_CHART_CSM_REPLICATION = 'csm-replication' +HELM_CHART_CSM_OBSERVABILITY = 'csm-observability' +HELM_CHART_CSM_APPLICATION_MOBILITY = 'csm-application-mobility' + +# FluxCD +FLUXCD_HELMRELEASE_CSI_POWERSTORE = 'csi-powerstore' +FLUXCD_HELMRELEASE_CSI_UNITY = 'csi-unity' +FLUXCD_HELMRELEASE_CSM_REPLICATION = 'csm-replication' +FLUXCD_HELMRELEASE_CSM_OBSERVABILITY = 'csm-observability' +FLUXCD_HELMRELEASE_CSM_APPLICATION_MOBILITY = 'csm-application-mobility' + +# Label +HELM_COMPONENT_LABEL = 'app.starlingx.io/component' +HELM_COMPONENT_SUPPORTED_LABELS = ('platform', 'application') diff --git a/python3-k8sapp-dell-storage/k8sapp_dell_storage/k8sapp_dell_storage/helm/__init__.py b/python3-k8sapp-dell-storage/k8sapp_dell_storage/k8sapp_dell_storage/helm/__init__.py new file mode 100644 index 0000000..6ca1ee6 --- /dev/null +++ b/python3-k8sapp-dell-storage/k8sapp_dell_storage/k8sapp_dell_storage/helm/__init__.py @@ -0,0 +1,5 @@ +# +# Copyright (c) 2023 Wind River Systems, Inc. +# +# SPDX-License-Identifier: Apache-2.0 +# diff --git a/python3-k8sapp-dell-storage/k8sapp_dell_storage/k8sapp_dell_storage/helm/csi_powerstore.py b/python3-k8sapp-dell-storage/k8sapp_dell_storage/k8sapp_dell_storage/helm/csi_powerstore.py new file mode 100644 index 0000000..6c80fd4 --- /dev/null +++ b/python3-k8sapp-dell-storage/k8sapp_dell_storage/k8sapp_dell_storage/helm/csi_powerstore.py @@ -0,0 +1,60 @@ +# +# Copyright (c) 2023 Wind River Systems, Inc. +# +# SPDX-License-Identifier: Apache-2.0 +# + +from sysinv.common import exception +from sysinv.helm import base + +from k8sapp_dell_storage.common import constants as app_constants + + +class CSIPowerStoreHelm(base.FluxCDBaseHelm): + """ Class to encapsulate helm operations for the CSI PowerStore chart. """ + + CHART = app_constants.HELM_CHART_CSI_POWERSTORE + + HELM_RELEASE = app_constants.FLUXCD_HELMRELEASE_CSI_POWERSTORE + + SUPPORTED_NAMESPACES = base.BaseHelm.SUPPORTED_NAMESPACES + \ + [app_constants.HELM_NS_DELL_STORAGE] + SUPPORTED_APP_NAMESPACES = { + app_constants.HELM_APP_DELL_STORAGE: SUPPORTED_NAMESPACES, + } + + SERVICE_NAME = app_constants.HELM_APP_DELL_STORAGE + + def execute_manifest_updates(self, operator): + # On application load this chart is enabled. + # Only disable if specified by the user. + if not self._is_enabled(operator.APP, self.CHART, + app_constants.HELM_NS_DELL_STORAGE): + operator.chart_group_chart_delete( + operator.CHART_GROUPS_LUT[self.CHART], + operator.CHARTS_LUT[self.CHART]) + + def execute_kustomize_updates(self, operator): + if not self._is_enabled(operator.APP, self.CHART, + app_constants.HELM_NS_DELL_STORAGE): + operator.helm_release_resource_delete(self.HELM_RELEASE) + + def get_overrides(self, namespace=None): + + controller = { + "controllerCount": self._num_replicas_for_platform_app() + } + + overrides = { + app_constants.HELM_NS_DELL_STORAGE: { + "controller": controller, + } + } + + 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-dell-storage/k8sapp_dell_storage/k8sapp_dell_storage/helm/csi_unity.py b/python3-k8sapp-dell-storage/k8sapp_dell_storage/k8sapp_dell_storage/helm/csi_unity.py new file mode 100644 index 0000000..fde566a --- /dev/null +++ b/python3-k8sapp-dell-storage/k8sapp_dell_storage/k8sapp_dell_storage/helm/csi_unity.py @@ -0,0 +1,60 @@ +# +# Copyright (c) 2023 Wind River Systems, Inc. +# +# SPDX-License-Identifier: Apache-2.0 +# + +from sysinv.common import exception +from sysinv.helm import base + +from k8sapp_dell_storage.common import constants as app_constants + + +class CSIUnityHelm(base.FluxCDBaseHelm): + """ Class to encapsulate helm operations for the CSI Unity chart. """ + + CHART = app_constants.HELM_CHART_CSI_UNITY + + HELM_RELEASE = app_constants.FLUXCD_HELMRELEASE_CSI_UNITY + + SUPPORTED_NAMESPACES = base.BaseHelm.SUPPORTED_NAMESPACES + \ + [app_constants.HELM_NS_DELL_STORAGE] + SUPPORTED_APP_NAMESPACES = { + app_constants.HELM_APP_DELL_STORAGE: SUPPORTED_NAMESPACES, + } + + SERVICE_NAME = app_constants.HELM_APP_DELL_STORAGE + + def execute_manifest_updates(self, operator): + # On application load, this chart is disabled in the metadata. + # Insert as needed. + if self._is_enabled(operator.APP, self.CHART, + app_constants.HELM_NS_DELL_STORAGE): + operator.chart_group_chart_insert( + operator.CHART_GROUPS_LUT[self.CHART], + operator.CHARTS_LUT[self.CHART]) + + def execute_kustomize_updates(self, operator): + if not self._is_enabled(operator.APP, self.CHART, + app_constants.HELM_NS_DELL_STORAGE): + operator.helm_release_resource_delete(self.HELM_RELEASE) + + def get_overrides(self, namespace=None): + + controller = { + "controllerCount": self._num_replicas_for_platform_app() + } + + overrides = { + app_constants.HELM_NS_DELL_STORAGE: { + "controller": controller + } + } + + 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-dell-storage/k8sapp_dell_storage/k8sapp_dell_storage/helm/csm_application_mobility.py b/python3-k8sapp-dell-storage/k8sapp_dell_storage/k8sapp_dell_storage/helm/csm_application_mobility.py new file mode 100644 index 0000000..9ce8aa4 --- /dev/null +++ b/python3-k8sapp-dell-storage/k8sapp_dell_storage/k8sapp_dell_storage/helm/csm_application_mobility.py @@ -0,0 +1,58 @@ +# +# Copyright (c) 2023 Wind River Systems, Inc. +# +# SPDX-License-Identifier: Apache-2.0 +# + +from sysinv.common import exception +from sysinv.helm import base + +from k8sapp_dell_storage.common import constants as app_constants + + +class CSMApplicationMobilityHelm(base.FluxCDBaseHelm): + """ Class to encapsulate helm operations for the CSM Application Mobility chart. """ + + CHART = app_constants.HELM_CHART_CSM_APPLICATION_MOBILITY + + HELM_RELEASE = app_constants.FLUXCD_HELMRELEASE_CSM_APPLICATION_MOBILITY + + SUPPORTED_NAMESPACES = base.BaseHelm.SUPPORTED_NAMESPACES + \ + [app_constants.HELM_NS_DELL_STORAGE] + SUPPORTED_APP_NAMESPACES = { + app_constants.HELM_APP_DELL_STORAGE: SUPPORTED_NAMESPACES, + } + + SERVICE_NAME = app_constants.HELM_APP_DELL_STORAGE + + def execute_manifest_updates(self, operator): + # On application load, this chart is disabled in the metadata. + # Insert as needed. + if self._is_enabled(operator.APP, self.CHART, + app_constants.HELM_NS_DELL_STORAGE): + operator.chart_group_chart_insert( + operator.CHART_GROUPS_LUT[self.CHART], + operator.CHARTS_LUT[self.CHART]) + + def execute_kustomize_updates(self, operator): + if not self._is_enabled(operator.APP, self.CHART, + app_constants.HELM_NS_DELL_STORAGE): + operator.helm_release_resource_delete(self.HELM_RELEASE) + + def get_overrides(self, namespace=None): + + replicas = self._num_replicas_for_platform_app() + + overrides = { + app_constants.HELM_NS_DELL_STORAGE: { + "replicaCount": replicas + } + } + + 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-dell-storage/k8sapp_dell_storage/k8sapp_dell_storage/helm/csm_observability.py b/python3-k8sapp-dell-storage/k8sapp_dell_storage/k8sapp_dell_storage/helm/csm_observability.py new file mode 100644 index 0000000..52ea9ce --- /dev/null +++ b/python3-k8sapp-dell-storage/k8sapp_dell_storage/k8sapp_dell_storage/helm/csm_observability.py @@ -0,0 +1,54 @@ +# +# Copyright (c) 2023 Wind River Systems, Inc. +# +# SPDX-License-Identifier: Apache-2.0 +# + +from sysinv.common import exception +from sysinv.helm import base + +from k8sapp_dell_storage.common import constants as app_constants + + +class CSMObservabilityHelm(base.FluxCDBaseHelm): + """ Class to encapsulate helm operations for the CSM chart. """ + + CHART = app_constants.HELM_CHART_CSM_OBSERVABILITY + + HELM_RELEASE = app_constants.FLUXCD_HELMRELEASE_CSM_OBSERVABILITY + + SUPPORTED_NAMESPACES = base.BaseHelm.SUPPORTED_NAMESPACES + \ + [app_constants.HELM_NS_DELL_STORAGE] + SUPPORTED_APP_NAMESPACES = { + app_constants.HELM_APP_DELL_STORAGE: SUPPORTED_NAMESPACES, + } + + SERVICE_NAME = app_constants.HELM_APP_DELL_STORAGE + + def execute_manifest_updates(self, operator): + # On application load, this chart is disabled in the metadata. + # Insert as needed. + if self._is_enabled(operator.APP, self.CHART, + app_constants.HELM_NS_DELL_STORAGE): + operator.chart_group_chart_insert( + operator.CHART_GROUPS_LUT[self.CHART], + operator.CHARTS_LUT[self.CHART]) + + def execute_kustomize_updates(self, operator): + if not self._is_enabled(operator.APP, self.CHART, + app_constants.HELM_NS_DELL_STORAGE): + operator.helm_release_resource_delete(self.HELM_RELEASE) + + def get_overrides(self, namespace=None): + + overrides = { + app_constants.HELM_NS_DELL_STORAGE: {} + } + + 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-dell-storage/k8sapp_dell_storage/k8sapp_dell_storage/helm/csm_replication.py b/python3-k8sapp-dell-storage/k8sapp_dell_storage/k8sapp_dell_storage/helm/csm_replication.py new file mode 100644 index 0000000..7ff9135 --- /dev/null +++ b/python3-k8sapp-dell-storage/k8sapp_dell_storage/k8sapp_dell_storage/helm/csm_replication.py @@ -0,0 +1,58 @@ +# +# Copyright (c) 2023 Wind River Systems, Inc. +# +# SPDX-License-Identifier: Apache-2.0 +# + +from sysinv.common import exception +from sysinv.helm import base + +from k8sapp_dell_storage.common import constants as app_constants + + +class CSMReplicationHelm(base.FluxCDBaseHelm): + """ Class to encapsulate helm operations for the CSM Replication chart. """ + + CHART = app_constants.HELM_CHART_CSM_REPLICATION + + HELM_RELEASE = app_constants.FLUXCD_HELMRELEASE_CSM_REPLICATION + + SUPPORTED_NAMESPACES = base.BaseHelm.SUPPORTED_NAMESPACES + \ + [app_constants.HELM_NS_DELL_STORAGE] + SUPPORTED_APP_NAMESPACES = { + app_constants.HELM_APP_DELL_STORAGE: SUPPORTED_NAMESPACES, + } + + SERVICE_NAME = app_constants.HELM_APP_DELL_STORAGE + + def execute_manifest_updates(self, operator): + # On application load, this chart is disabled in the metadata. + # Insert as needed. + if self._is_enabled(operator.APP, self.CHART, + app_constants.HELM_NS_DELL_STORAGE): + operator.chart_group_chart_insert( + operator.CHART_GROUPS_LUT[self.CHART], + operator.CHARTS_LUT[self.CHART]) + + def execute_kustomize_updates(self, operator): + if not self._is_enabled(operator.APP, self.CHART, + app_constants.HELM_NS_DELL_STORAGE): + operator.helm_release_resource_delete(self.HELM_RELEASE) + + def get_overrides(self, namespace=None): + + replicas = self._num_replicas_for_platform_app() + + overrides = { + app_constants.HELM_NS_DELL_STORAGE: { + "replicas": replicas, + } + } + + 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-dell-storage/k8sapp_dell_storage/k8sapp_dell_storage/kustomize/__init__.py b/python3-k8sapp-dell-storage/k8sapp_dell_storage/k8sapp_dell_storage/kustomize/__init__.py new file mode 100644 index 0000000..128def1 --- /dev/null +++ b/python3-k8sapp-dell-storage/k8sapp_dell_storage/k8sapp_dell_storage/kustomize/__init__.py @@ -0,0 +1,19 @@ +# +# Copyright (c) 2023 Wind River Systems, Inc. +# +# SPDX-License-Identifier: Apache-2.0 +# + +import yaml + + +class quoted_str(str): + pass + + +# force strings to be single-quoted to avoid interpretation as numeric values +def quoted_presenter(dumper, data): + return dumper.represent_scalar(u'tag:yaml.org,2002:str', data, style="'") + + +yaml.add_representer(quoted_str, quoted_presenter) diff --git a/python3-k8sapp-dell-storage/k8sapp_dell_storage/k8sapp_dell_storage/kustomize/kustomize_dell_storage.py b/python3-k8sapp-dell-storage/k8sapp_dell_storage/k8sapp_dell_storage/kustomize/kustomize_dell_storage.py new file mode 100644 index 0000000..047a6cf --- /dev/null +++ b/python3-k8sapp-dell-storage/k8sapp_dell_storage/k8sapp_dell_storage/kustomize/kustomize_dell_storage.py @@ -0,0 +1,28 @@ +# +# Copyright (c) 2023 Wind River Systems, Inc. +# +# SPDX-License-Identifier: Apache-2.0 +# +# All Rights Reserved. +# + +""" System inventory Kustomization resource operator.""" + +from k8sapp_dell_storage.common import constants as app_constants +from sysinv.helm import kustomize_base as base + + +class DellStorageFluxCDKustomizeOperator(base.FluxCDKustomizeOperator): + + APP = app_constants.HELM_APP_DELL_STORAGE + + def platform_mode_kustomize_updates(self, dbapi, mode): + """ Update the top-level kustomization resource list + + Make changes to the top-level kustomization resource list based on the + platform mode + + :param dbapi: DB api object + :param mode: mode to control when to update the resource list + """ + pass diff --git a/python3-k8sapp-dell-storage/k8sapp_dell_storage/k8sapp_dell_storage/lifecycle/__init__.py b/python3-k8sapp-dell-storage/k8sapp_dell_storage/k8sapp_dell_storage/lifecycle/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/python3-k8sapp-dell-storage/k8sapp_dell_storage/k8sapp_dell_storage/lifecycle/lifecycle_dell_storage.py b/python3-k8sapp-dell-storage/k8sapp_dell_storage/k8sapp_dell_storage/lifecycle/lifecycle_dell_storage.py new file mode 100644 index 0000000..b3d877e --- /dev/null +++ b/python3-k8sapp-dell-storage/k8sapp_dell_storage/k8sapp_dell_storage/lifecycle/lifecycle_dell_storage.py @@ -0,0 +1,90 @@ +# +# Copyright (c) 2023 Wind River Systems, Inc. +# +# SPDX-License-Identifier: Apache-2.0 +# +# All Rights Reserved. +# + +""" System inventory App lifecycle operator.""" + +import yaml + +from k8sapp_dell_storage.common import constants as app_constants + +from oslo_log import log as logging + +from sysinv.common import constants +from sysinv.helm import lifecycle_base +from sysinv.helm import lifecycle_utils + + +LOG = logging.getLogger(__name__) + + +class DellStorageAppLifecycleOperator(lifecycle_base.AppLifecycleOperator): + def app_lifecycle_actions(self, context, conductor_obj, app_op, app, hook_info): + """Perform lifecycle actions for an operation + + :param context: request context, can be None + :param conductor_obj: conductor object, can be None + :param app_op: AppOperator object + :param app: AppOperator.Application object + :param hook_info: LifecycleHookInfo object + + """ + + if hook_info.lifecycle_type == constants.APP_LIFECYCLE_TYPE_RESOURCE: + if hook_info.operation == constants.APP_APPLY_OP: + if hook_info.relative_timing == constants.APP_LIFECYCLE_TIMING_PRE: + lifecycle_utils.create_local_registry_secrets(app_op, app, hook_info) + lifecycle_utils.add_pod_security_admission_controller_labels(app_op, app, hook_info) + return self.add_component_label_in_pods(app_op, app) + elif hook_info.operation == constants.APP_REMOVE_OP and \ + hook_info.relative_timing == constants.APP_LIFECYCLE_TIMING_POST: + return lifecycle_utils.delete_local_registry_secrets(app_op, app, hook_info) + + super(DellStorageAppLifecycleOperator, self).app_lifecycle_actions( + context, conductor_obj, app_op, app, hook_info + ) + + def add_component_label_in_pods(self, app_op, app): + dbapi_instance = app_op._dbapi + db_app_id = dbapi_instance.kube_app_get(app.name).id + + # List all charts enabled + charts = self._get_charts_enabled(dbapi_instance, db_app_id) + + for chart in charts: + # Loading user-overrides + user_overrides = chart['user_overrides'] + # If user-overrides exists, checking if label was set by user. + if user_overrides and app_constants.HELM_COMPONENT_LABEL in user_overrides: + dict_chart_overrides = yaml.safe_load(user_overrides) + label = dict_chart_overrides[app_constants.HELM_COMPONENT_LABEL] + # Checking if it's a supported label. If not, set platform as default label. + if label not in app_constants.HELM_COMPONENT_SUPPORTED_LABELS: + dict_chart_overrides[app_constants.HELM_COMPONENT_LABEL] = 'platform' + LOG.warn(f'User override for core affinity {label} is not supported,' + + 'using platform as default label.') + + chart['user_overrides'] = yaml.safe_dump(dict_chart_overrides) + + dbapi_instance.helm_override_update( + db_app_id, + chart['name'], + app_constants.HELM_NS_DELL_STORAGE, + chart) + + def _get_charts_enabled(self, dbapi_instance, db_app_id): + # Listing all helm charts from db_app_id + overrides = dbapi_instance.helm_override_get_all( + app_id=db_app_id + ) + # Getting only charts enabled + charts = [{ + "name": i.name, + "user_overrides": i.user_overrides, + "system_overrides": i.system_overrides + } for i in overrides if i.system_overrides['enabled'] is True ] + return charts diff --git a/python3-k8sapp-dell-storage/k8sapp_dell_storage/k8sapp_dell_storage/tests/__init__.py b/python3-k8sapp-dell-storage/k8sapp_dell_storage/k8sapp_dell_storage/tests/__init__.py new file mode 100644 index 0000000..6ca1ee6 --- /dev/null +++ b/python3-k8sapp-dell-storage/k8sapp_dell_storage/k8sapp_dell_storage/tests/__init__.py @@ -0,0 +1,5 @@ +# +# Copyright (c) 2023 Wind River Systems, Inc. +# +# SPDX-License-Identifier: Apache-2.0 +# diff --git a/python3-k8sapp-dell-storage/k8sapp_dell_storage/k8sapp_dell_storage/tests/test_dell_storage.py b/python3-k8sapp-dell-storage/k8sapp_dell_storage/k8sapp_dell_storage/tests/test_dell_storage.py new file mode 100644 index 0000000..e2d8eac --- /dev/null +++ b/python3-k8sapp-dell-storage/k8sapp_dell_storage/k8sapp_dell_storage/tests/test_dell_storage.py @@ -0,0 +1,27 @@ +# +# Copyright (c) 2023 Wind River Systems, Inc. +# +# SPDX-License-Identifier: Apache-2.0 +# + +from k8sapp_dell_storage.tests import test_plugins + +from sysinv.db import api as dbapi +from sysinv.tests.helm import base +from sysinv.tests.db import base as dbbase +from sysinv.tests.db import utils as dbutils + + +class DellStorageTestCase(test_plugins.K8SAppDellStorageAppMixin, + base.HelmTestCaseMixin): + def setUp(self): + super(DellStorageTestCase, self).setUp() + self.app = dbutils.create_test_app(name='dell_storage') + self.dbapi = dbapi.get_instance() + + +class DellStorageTestCaseDummy(DellStorageTestCase, + dbbase.ProvisionedControllerHostTestCase): + + def test_dummy(self): + pass diff --git a/python3-k8sapp-dell-storage/k8sapp_dell_storage/k8sapp_dell_storage/tests/test_plugins.py b/python3-k8sapp-dell-storage/k8sapp_dell_storage/k8sapp_dell_storage/tests/test_plugins.py new file mode 100644 index 0000000..2aef8c5 --- /dev/null +++ b/python3-k8sapp-dell-storage/k8sapp_dell_storage/k8sapp_dell_storage/tests/test_plugins.py @@ -0,0 +1,30 @@ +# +# Copyright (c) 2023 Wind River Systems, Inc. +# +# SPDX-License-Identifier: Apache-2.0 +# + +from k8sapp_dell_storage.common import constants as app_constants + +from sysinv.tests.db import base as dbbase + + +class K8SAppDellStorageAppMixin(object): + app_name = app_constants.HELM_APP_DELL_STORAGE + path_name = app_name + '.tgz' + + def setUp(self): + super(K8SAppDellStorageAppMixin, self).setUp() + + +class K8SAppDellStorageControllerTestCase(K8SAppDellStorageAppMixin, + dbbase.BaseIPv6Mixin, + dbbase.BaseCephStorageBackendMixin, + dbbase.ControllerHostTestCase): + pass + + +class K8SAppDellStorageAIOTestCase(K8SAppDellStorageAppMixin, + dbbase.BaseCephStorageBackendMixin, + dbbase.AIOSimplexHostTestCase): + pass diff --git a/python3-k8sapp-dell-storage/k8sapp_dell_storage/pylint.rc b/python3-k8sapp-dell-storage/k8sapp_dell_storage/pylint.rc new file mode 100644 index 0000000..d9e84e0 --- /dev/null +++ b/python3-k8sapp-dell-storage/k8sapp_dell_storage/pylint.rc @@ -0,0 +1,336 @@ +[MASTER] +# Specify a configuration file. +rcfile=pylint.rc + +# Python code to execute, usually for sys.path manipulation such as +# pygtk.require(). +#init-hook= + +# Add files or directories to the blacklist. Should be base names, not paths. +ignore= + +# Pickle collected data for later comparisons. +persistent=yes + +# List of plugins (as comma separated values of python modules names) to load, +# usually to register additional checkers. +load-plugins= + +# Use multiple processes to speed up Pylint. +jobs=4 + +# Allow loading of arbitrary C extensions. Extensions are imported into the +# active Python interpreter and may run arbitrary code. +unsafe-load-any-extension=no + +# A comma-separated list of package or module names from where C extensions may +# be loaded. Extensions are loading into the active Python interpreter and may +# run arbitrary code +extension-pkg-whitelist=lxml.etree,greenlet + + + +[MESSAGES CONTROL] +# Disable the message, report, category or checker with the given id(s). You +# can either give multiple identifier separated by comma (,) or put this option +# multiple time (only on the command line, not in the configuration file where +# it should appear only once). +# See "Messages Control" section of +# https://pylint.readthedocs.io/en/latest/user_guide +disable= + # C codes refer to Convention + C0103, # invalid-name + C0104, # disallowed-nameA + C0112, # empty-docstring + C0114, # missing-module-docstring + C0115, # missing-class-docstring + C0116, # missing-function-docstring + C0123, # unidiomatic-typecheck !!! + C0201, # consider-iterating-dictionary + C0202, # bad-classmethod-argument + C0206, # consider-using-dict-items + C0207, # use-maxsplit-arg + C0209, # consider-using-f-string + C0301, # line-too-long + C0302, # too-many-lines + C0325, # superfluous-parens + C0411, # wrong-import-order + C0412, # ungrouped-imports + C0413, # wrong-import-position + C0414, # useless-import-alias !!! + C0415, # import-outside-toplevel + C1802, # use-implicit-booleaness-not-len !!! + C2801, # unnecessary-dunder-call !!! + C3002, # unnecessary-direct-lambda-call !!! + # R codes refer to refactoring + R0022, # useless-option-value !!! + R0205, # useless-object-inheritance + R0402, # consider-using-from-import + R0901, # too-many-ancestors + R0902, # too-many-instance-attributes + R0903, # too-few-public-methods + R0904, # too-many-public-methods + R0911, # too-many-return-statements + R0912, # too-many-branches + R0913, # too-many-arguments + R0914, # too-many-locals + R0915, # too-many-statements + R0916, # too-many-boolean-expressions + R1702, # too-many-nested-blocks + R1703, # simplifiable-if-statement + R1704, # redefined-argument-from-local !!! + R1705, # no-else-return + R1707, # trailing-comma-tuple !!! + R1708, # stop-iteration-return !!! + R1710, # inconsistent-return-statements + R1711, # useless-return + R1714, # consider-using-in + R1717, # consider-using-dict-comprehension !!! + R1718, # consider-using-set-comprehension + R1719, # simplifiable-if-expression + R1720, # no-else-raise + R1721, # unnecessary-comprehension + R1722, # consider-using-sys-exit !!! + R1723, # no-else-break + R1724, # no-else-continue + R1725, # super-with-arguments + R1726, # simplifiable-condition !!! + R1728, # consider-using-generator + R1729, # use-a-generator + R1730, # consider-using-min-builtin !!! + R1731, # consider-using-max-builtin !!! + R1732, # consider-using-with + R1733, # unnecessary-dict-index-lookup !! + R1734, # use-list-literal + R1735, # use-dict-literal + # W codes are warnings + W0101, # unreachable + W0105, # pointless-string-statement + W0106, # expression-not-assigned + W0107, # unnecessary-pass + W0108, # unnecessary-lambda + W0109, # duplicate-key !!! + W0123, # eval-used + W0125, # using-constant-test !!! + W0133, # pointless-exception-statement !!! + W0143, # comparison-with-callable !!! + W0150, # lost-exception + W0201, # attribute-defined-outside-init + W0211, # bad-staticmethod-argument + W0212, # protected-access + W0221, # arguments-differ + W0223, # abstract-method + W0231, # super-init-not-called + W0235, # useless-super-delegation + W0237, # arguments-renamed !!! + W0311, # bad-indentation + W0402, # deprecated-module + W0404, # reimported + W0511, # fixme + W0602, # global-variable-not-assigned !!! + W0603, # global-statement + W0612, # unused-variable + W0613, # unused-argument + W0621, # redefined-outer-name + W0622, # redefined-builtin + W0631, # undefined-loop-variable + W0703, # broad-except (pylint 2.16 renamed to broad-except-caught) + W0706, # try-except-raise + W0707, # raise-missing-from + W0719, # broad-exception-raised + W1113, # keyword-arg-before-vararg + W1310, # format-string-without-interpolation !!! + W1401, # anomalous-backslash-in-string + W1406, # redundant-u-string-prefix + W1505, # deprecated-method + W1514, # unspecified-encoding + W3101, # missing-timeout + E0601, # used-before-assignment !!! + E0605, # invalid-all-format !!! + E1101, # no-member + E1111, # assignment-from-no-return + E1121, # too-many-function-args !!! + E1123, # unexpected-keyword-arg !!! + E1136, # unsubscriptable-object !!! + +[REPORTS] +# Set the output format. Available formats are text, parseable, colorized, msvs +# (visual studio) and html +output-format=text + +# Tells whether to display a full report or only the messages +reports=no + +# Python expression which should return a note less than 10 (10 is the highest +# note). You have access to the variables errors warning, statement which +# respectively contain the number of errors / warnings messages and the total +# number of statements analyzed. This is used by the global evaluation report +# (RP0004). +evaluation=10.0 - ((float(5 * error + warning + refactor + convention) / statement) * 10) + + +[SIMILARITIES] +# Minimum lines number of a similarity. +min-similarity-lines=4 + +# Ignore comments when computing similarities. +ignore-comments=yes + +# Ignore docstrings when computing similarities. +ignore-docstrings=yes + + +[FORMAT] +# Maximum number of characters on a single line. +max-line-length=85 + +# Maximum number of lines in a module +max-module-lines=1000 + +# String used as indentation unit. This is usually 4 spaces or "\t" (1 tab). +indent-string=' ' + + +[TYPECHECK] +# Tells whether missing members accessed in mixin class should be ignored. A +# mixin class is detected if its name ends with "mixin" (case insensitive). +ignore-mixin-members=yes + +# List of module names for which member attributes should not be checked +# (useful for modules/projects where namespaces are manipulated during runtime +# and thus existing member attributes cannot be deduced by static analysis +ignored-modules=distutils,eventlet.green.subprocess,six,six.moves + +# List of classes names for which member attributes should not be checked +# (useful for classes with attributes dynamically set). +# pylint is confused by sqlalchemy Table, as well as sqlalchemy Enum types +# ie: (unprovisioned, identity) +# LookupDict in requests library confuses pylint +ignored-classes=SQLObject, optparse.Values, thread._local, _thread._local, + Table, unprovisioned, identity, LookupDict + +# List of members which are set dynamically and missed by pylint inference +# system, and so shouldn't trigger E0201 when accessed. Python regular +# expressions are accepted. +generated-members=REQUEST,acl_users,aq_parent + + +[BASIC] +# Regular expression which should only match correct module names +module-rgx=(([a-z_][a-z0-9_]*)|([A-Z][a-zA-Z0-9]+))$ + +# Regular expression which should only match correct module level names +const-rgx=(([A-Z_][A-Z0-9_]*)|(__.*__))$ + +# Regular expression which should only match correct class names +class-rgx=[A-Z_][a-zA-Z0-9]+$ + +# Regular expression which should only match correct function names +function-rgx=[a-z_][a-z0-9_]{2,30}$ + +# Regular expression which should only match correct method names +method-rgx=[a-z_][a-z0-9_]{2,30}$ + +# Regular expression which should only match correct instance attribute names +attr-rgx=[a-z_][a-z0-9_]{2,30}$ + +# Regular expression which should only match correct argument names +argument-rgx=[a-z_][a-z0-9_]{2,30}$ + +# Regular expression which should only match correct variable names +variable-rgx=[a-z_][a-z0-9_]{2,30}$ + +# Regular expression which should only match correct list comprehension / +# generator expression variable names +inlinevar-rgx=[A-Za-z_][A-Za-z0-9_]*$ + +# Good variable names which should always be accepted, separated by a comma +good-names=i,j,k,ex,Run,_ + +# Bad variable names which should always be refused, separated by a comma +bad-names=foo,bar,baz,toto,tutu,tata + +# Regular expression which should only match functions or classes name which do +# not require a docstring +no-docstring-rgx=__.*__ + + +[MISCELLANEOUS] +# List of note tags to take in consideration, separated by a comma. +notes=FIXME,XXX,TODO + + +[VARIABLES] +# Tells whether we should check for unused import in __init__ files. +init-import=no + +# A regular expression matching the beginning of the name of dummy variables +# (i.e. not used). +dummy-variables-rgx=_|dummy + +# List of additional names supposed to be defined in builtins. Remember that +# you should avoid to define new builtins when possible. +additional-builtins= + + +[IMPORTS] +# Deprecated modules which should not be used, separated by a comma +deprecated-modules=regsub,string,TERMIOS,Bastion,rexec + +# Create a graph of every (i.e. internal and external) dependencies in the +# given file (report RP0402 must not be disabled) +import-graph= + +# Create a graph of external dependencies in the given file (report RP0402 must +# not be disabled) +ext-import-graph= + +# Create a graph of internal dependencies in the given file (report RP0402 must +# not be disabled) +int-import-graph= + + +[DESIGN] +# Maximum number of arguments for function / method +max-args=5 + +# Argument names that match this expression will be ignored. Default to name +# with leading underscore +ignored-argument-names=_.* + +# Maximum number of locals for function / method body +max-locals=15 + +# Maximum number of return / yield for function / method body +max-returns=6 + +# Maximum number of branch for function / method body +max-branches=12 + +# Maximum number of statements in function / method body +max-statements=50 + +# Maximum number of parents for a class (see R0901). +max-parents=7 + +# Maximum number of attributes for a class (see R0902). +max-attributes=7 + +# Minimum number of public methods for a class (see R0903). +min-public-methods=2 + +# Maximum number of public methods for a class (see R0904). +max-public-methods=20 + + +[CLASSES] +# List of method names used to declare (i.e. assign) instance attributes. +defining-attr-methods=__init__,__new__,setUp + +# List of valid names for the first argument in a class method. +valid-classmethod-first-arg=cls + + +[EXCEPTIONS] +# Exceptions that will emit a warning when caught. +overgeneral-exceptions=builtins.BaseException,builtins.Exception diff --git a/python3-k8sapp-dell-storage/k8sapp_dell_storage/requirements.txt b/python3-k8sapp-dell-storage/k8sapp_dell_storage/requirements.txt new file mode 100644 index 0000000..8f225d8 --- /dev/null +++ b/python3-k8sapp-dell-storage/k8sapp_dell_storage/requirements.txt @@ -0,0 +1,2 @@ +pbr>=2.0.0 +PyYAML>=3.10.0 diff --git a/python3-k8sapp-dell-storage/k8sapp_dell_storage/setup.cfg b/python3-k8sapp-dell-storage/k8sapp_dell_storage/setup.cfg new file mode 100644 index 0000000..87a3abb --- /dev/null +++ b/python3-k8sapp-dell-storage/k8sapp_dell_storage/setup.cfg @@ -0,0 +1,49 @@ +[metadata] +name = k8sapp-dell-storage +summary = StarlingX sysinv extensions for app-dell-storage +long_description = file: README.rst +long_description_content_type = text/x-rst +license = Apache 2.0 +author = StarlingX +author-email = starlingx-discuss@lists.starlingx.io +home-page = https://www.starlingx.io/ +classifier = + Environment :: OpenStack + Intended Audience :: Information Technology + Intended Audience :: System Administrators + License :: OSI Approved :: Apache Software License + Operating System :: POSIX :: Linux + Programming Language :: Python + Programming Language :: Python :: 2 + Programming Language :: Python :: 2.7 + Programming Language :: Python :: 3 + Programming Language :: Python :: 3.4 + Programming Language :: Python :: 3.5 + +[files] +packages = + k8sapp_dell_storage + +[global] +setup-hooks = + pbr.hooks.setup_hook + +[entry_points] +systemconfig.helm_applications = + dell-storage = systemconfig.helm_plugins.dell_storage + +systemconfig.helm_plugins.dell_storage = + 001_csi-powerstore = k8sapp_dell_storage.helm.csi_powerstore:CSIPowerStoreHelm + 002_csi-unity = k8sapp_dell_storage.helm.csi_unity:CSIUnityHelm + 003_csm-replication = k8sapp_dell_storage.helm.csm_replication:CSMReplicationHelm + 004_csm-observability = k8sapp_dell_storage.helm.csm_observability:CSMObservabilityHelm + 005_csm-application-mobility = k8sapp_dell_storage.helm.csm_application_mobility:CSMApplicationMobilityHelm + +systemconfig.fluxcd.kustomize_ops = + dell-storage = k8sapp_dell_storage.kustomize.kustomize_dell_storage:DellStorageFluxCDKustomizeOperator + +systemconfig.app_lifecycle = + dell-storage = k8sapp_dell_storage.lifecycle.lifecycle_dell_storage:DellStorageAppLifecycleOperator + +[wheel] +universal = 1 diff --git a/python3-k8sapp-dell-storage/k8sapp_dell_storage/setup.py b/python3-k8sapp-dell-storage/k8sapp_dell_storage/setup.py new file mode 100644 index 0000000..0c13acb --- /dev/null +++ b/python3-k8sapp-dell-storage/k8sapp_dell_storage/setup.py @@ -0,0 +1,12 @@ +# +# Copyright (c) 2023 Wind River Systems, Inc. +# +# SPDX-License-Identifier: Apache-2.0 +# + +import setuptools + + +setuptools.setup( + setup_requires=['pbr>=2.0.0'], + pbr=True) diff --git a/python3-k8sapp-dell-storage/k8sapp_dell_storage/test-requirements.txt b/python3-k8sapp-dell-storage/k8sapp_dell_storage/test-requirements.txt new file mode 100644 index 0000000..a140bcc --- /dev/null +++ b/python3-k8sapp-dell-storage/k8sapp_dell_storage/test-requirements.txt @@ -0,0 +1,20 @@ +# The order of packages is significant, because pip processes them in the order +# of appearance. Changing the order has an impact on the overall integration +# process, which may cause wedges in the gate later. +hacking>=1.1.0,<=2.0.0 # Apache-2.0 +astroid +bandit<1.7.2;python_version>="3.0" +coverage>=3.6 +fixtures>=3.0.0 # Apache-2.0/BSD +mock>=2.0.0 # BSD +python-subunit>=0.0.18 +requests-mock>=0.6.0 # Apache-2.0 +sphinx +oslosphinx +oslotest>=3.2.0 # Apache-2.0 +stestr>=1.0.0 # Apache-2.0 +testrepository>=0.0.18 +testtools!=1.2.0,>=0.9.36 +isort<5;python_version>="3.0" +pylint +pycryptodomex diff --git a/python3-k8sapp-dell-storage/k8sapp_dell_storage/tox.ini b/python3-k8sapp-dell-storage/k8sapp_dell_storage/tox.ini new file mode 100644 index 0000000..0354034 --- /dev/null +++ b/python3-k8sapp-dell-storage/k8sapp_dell_storage/tox.ini @@ -0,0 +1,181 @@ +[tox] +envlist = flake8,py39,pylint +minversion = 1.6 +skipsdist = True + +# tox does not work if the path to the workdir is too long, so move it to /tmp +# tox 3.1.0 adds TOX_LIMITED_SHEBANG +toxworkdir = /tmp/{env:USER}_k8sdellstoragetox +stxdir = {toxinidir}/../../.. +distshare={toxworkdir}/.tox/distshare + +[testenv] +basepython = python3.9 +usedevelop = True + +# tox is silly... these need to be separated by a newline.... +allowlist_externals = bash + find + +install_command = pip install -v -v -v \ + -c{env:UPPER_CONSTRAINTS_FILE:https://opendev.org/starlingx/root/raw/branch/master/build-tools/requirements/debian/upper-constraints.txt} \ + {opts} {packages} + +# Note the hash seed is set to 0 until can be tested with a +# random hash seed successfully. +setenv = VIRTUAL_ENV={envdir} + PYTHONHASHSEED=0 + PIP_RESOLVER_DEBUG=1 + PYTHONDONTWRITEBYTECODE=1 + OS_TEST_PATH=./k8sapp_dell_storage/tests + LANG=en_US.UTF-8 + LANGUAGE=en_US:en + LC_ALL=C + EVENTS_YAML=./k8sapp_dell_storage/tests/events_for_testing.yaml + SYSINV_TEST_ENV=True + TOX_WORK_DIR={toxworkdir} + PYLINTHOME={toxworkdir} + +deps = -r{toxinidir}/requirements.txt + -r{toxinidir}/test-requirements.txt + -e{[tox]stxdir}/config/sysinv/sysinv/sysinv + -e{[tox]stxdir}/config/tsconfig/tsconfig + -e{[tox]stxdir}/fault/fm-api/source + -e{[tox]stxdir}/fault/python-fmclient/fmclient + -e{[tox]stxdir}/update/sw-patch/cgcs-patch + -e{[tox]stxdir}/utilities/ceph/python-cephclient/python-cephclient + +commands = + find . -type f -name "*.pyc" -delete + +[flake8] +# H series are hacking +# H101 is TODO +# H102 is apache license +# H104 file contains only comments (ie: license) +# H105 author tags +# H306 imports not in alphabetical order +# H401 docstring should not start with a space +# H403 multi line docstrings should end on a new line +# H404 multi line docstring should start without a leading new line +# H405 multi line docstring summary not separated with an empty line +# H701 Empty localization string +# H702 Formatting operation should be outside of localization method call +# H703 Multiple positional placeholders + +# B series are bugbear +# B006 Do not use mutable data structures for argument defaults. Needs to be FIXED. +# B007 Loop control variable not used within the loop body. +# B009 Do not call getattr with a constant attribute value +# B010 Do not call setattr with a constant attribute value +# B012 return/continue/break inside finally blocks cause exceptions to be silenced +# B014 Redundant exception types +# B301 Python 3 does not include `.iter*` methods on dictionaries. (this should be suppressed on a per line basis) + +# W series are warnings +# W503 line break before binary operator +# W504 line break after binary operator +# W605 invalid escape sequence + +# E series are pep8 +# E117 over-indented +# E126 continuation line over-indented for hanging indent +# E127 continuation line over-indented for visual indent +# E128 continuation line under-indented for visual indent +# E402 module level import not at top of file +# E741 ambiguous variable name + +ignore = H101,H102,H104,H105,H306,H401,H403,H404,H405,H701,H702,H703, + B006,B007,B009,B010,B012,B014,B301 + W503,W504,W605, + E117,E126,E127,E128,E402,E741 +exclude = build,dist,tools,.eggs +max-line-length=120 + +[testenv:flake8] +deps = -r{toxinidir}/test-requirements.txt +commands = + flake8 {posargs} . \ + scripts/manage-partitions \ + scripts/query_pci_id + +[testenv:py39] +commands = + stestr run {posargs} + stestr slowest + +[testenv:pep8] +# testenv:flake8 clone +deps = -r{toxinidir}/test-requirements.txt +commands = {[testenv:flake8]commands} + +[testenv:venv] +commands = {posargs} + +[bandit] +# The following bandit tests are being skipped: +# B101: Test for use of assert +# B103: Test for setting permissive file permissions +# B104: Test for binding to all interfaces +# B105: Test for use of hard-coded password strings +# B108: Test for insecure usage of tmp file/directory +# B110: Try, Except, Pass detected. +# B303: Use of insecure MD2, MD4, MD5, or SHA1 hash function. +# B307: Blacklisted call to eval. +# B310: Audit url open for permitted schemes +# B311: Standard pseudo-random generators are not suitable for security/cryptographic purposes +# B314: Blacklisted calls to xml.etree.ElementTree +# B318: Blacklisted calls to xml.dom.minidom +# B320: Blacklisted calls to lxml.etree +# B404: Import of subprocess module +# B405: import xml.etree +# B408: import xml.minidom +# B410: import lxml +# B506: Test for use of yaml load +# B602: Test for use of popen with shell equals true +# B603: Test for use of subprocess without shell equals true +# B604: Test for any function with shell equals true +# B605: Test for starting a process with a shell +# B607: Test for starting a process with a partial path +# B608: Possible SQL injection vector through string-based query +# +# Note: 'skips' entry cannot be split across multiple lines +# +skips = B101,B103,B104,B105,B108,B110,B303,B307,B310,B311,B314,B318,B320,B404,B405,B408,B410,B506,B602,B603,B604,B605,B607,B608 +exclude = tests + +[testenv:bandit] +deps = -r{toxinidir}/test-requirements.txt +commands = bandit --ini tox.ini -n 5 -r k8sapp_dell_storage + +[testenv:pylint] +install_command = pip install -v -v -v \ + -c{env:UPPER_CONSTRAINTS_FILE:https://opendev.org/starlingx/root/raw/branch/master/build-tools/requirements/debian/upper-constraints.txt} \ + {opts} {packages} +commands = + pylint {posargs} k8sapp_dell_storage --rcfile=./pylint.rc + +[testenv:cover] +# not sure is passenv is still needed +passenv = CURL_CA_BUNDLE +deps = {[testenv]deps} +setenv = {[testenv]setenv} + PYTHON=coverage run --parallel-mode + +commands = + {[testenv]commands} + coverage erase + stestr run {posargs} + coverage combine + coverage html -d cover + coverage xml -o cover/coverage.xml + coverage report + +[testenv:pip-missing-reqs] +# do not install test-requirements as that will pollute the virtualenv for +# determining missing packages +# this also means that pip-missing-reqs must be installed separately, outside +# of the requirements.txt files +deps = pip_missing_reqs + -rrequirements.txt +commands=pip-missing-reqs -d --ignore-file=/k8sapp_dell_storage/tests k8sapp_dell_storage diff --git a/python3-k8sapp-dell-storage/k8sapp_dell_storage/upper-constraints.txt b/python3-k8sapp-dell-storage/k8sapp_dell_storage/upper-constraints.txt new file mode 100644 index 0000000..9c30188 --- /dev/null +++ b/python3-k8sapp-dell-storage/k8sapp_dell_storage/upper-constraints.txt @@ -0,0 +1 @@ +# Override upstream constraints based on StarlingX load diff --git a/stx-dell-storage-helm/debian/deb_folder/changelog b/stx-dell-storage-helm/debian/deb_folder/changelog new file mode 100644 index 0000000..41c90d8 --- /dev/null +++ b/stx-dell-storage-helm/debian/deb_folder/changelog @@ -0,0 +1,5 @@ +stx-dell-storage-helm (1.0-1) unstable; urgency=medium + + * Initial release. + + -- Hediberto Cavalcante da Silva Thu, 6 Apr 2023 15:30:00 +0000 diff --git a/stx-dell-storage-helm/debian/deb_folder/control b/stx-dell-storage-helm/debian/deb_folder/control new file mode 100644 index 0000000..2e37394 --- /dev/null +++ b/stx-dell-storage-helm/debian/deb_folder/control @@ -0,0 +1,22 @@ +Source: stx-dell-storage-helm +Section: libs +Priority: optional +Maintainer: StarlingX Developers +Build-Depends: debhelper-compat (= 13), + helm, + python3-k8sapp-dell-storage, + python3-k8sapp-dell-storage-wheels, + csi-powerstore-helm, + csi-unity-helm, + csm-replication-helm, + csm-observability-helm, + csm-application-mobility-helm +Standards-Version: 4.5.1 +Homepage: https://www.starlingx.io + +Package: stx-dell-storage-helm +Section: libs +Architecture: any +Depends: ${misc:Depends} +Description: StarlingX Dell Storage FluxCD Helm Charts + This package contains FluxCD helm charts for the Dell Storage applications. diff --git a/stx-dell-storage-helm/debian/deb_folder/copyright b/stx-dell-storage-helm/debian/deb_folder/copyright new file mode 100644 index 0000000..1f3f6ef --- /dev/null +++ b/stx-dell-storage-helm/debian/deb_folder/copyright @@ -0,0 +1,41 @@ +Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ +Upstream-Name: stx-dell-storage-helm +Source: https://opendev.org/starlingx/app-dell-storage/ + +Files: * +Copyright: (c) 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/stx-dell-storage-helm/debian/deb_folder/rules b/stx-dell-storage-helm/debian/deb_folder/rules new file mode 100644 index 0000000..e201ec4 --- /dev/null +++ b/stx-dell-storage-helm/debian/deb_folder/rules @@ -0,0 +1,52 @@ +#!/usr/bin/make -f +# export DH_VERBOSE = 1 + +export ROOT = debian/tmp +export APP_FOLDER = $(ROOT)/usr/local/share/applications/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 APP_NAME = dell-storage +export APP_VERSION = $(RELEASE)-$(REVISION) +export APP_TARBALL_FLUXCD = $(APP_NAME)-$(APP_VERSION).tgz +export HELM_FOLDER = /usr/lib/helm +export HELM_REPO = stx-platform +export STAGING = staging + +%: + dh $@ + +override_dh_auto_build: + # Setup the staging directory. + mkdir -p $(STAGING) + cp files/metadata.yaml $(STAGING) + cp -Rv fluxcd-manifests $(STAGING) + mkdir -p $(STAGING)/charts + cp $(HELM_FOLDER)/*.tgz $(STAGING)/charts + + # Populate metadata. + sed -i 's/@APP_NAME@/$(APP_NAME)/g' $(STAGING)/metadata.yaml + sed -i 's/@APP_VERSION@/$(APP_VERSION)/g' $(STAGING)/metadata.yaml + sed -i 's/@HELM_REPO@/$(HELM_REPO)/g' $(STAGING)/metadata.yaml + + # Copy the plugins: installed in the buildroot + mkdir -p $(STAGING)/plugins + cp /plugins/${APP_NAME}/*.whl $(STAGING)/plugins + + # Create the app package. + cd $(STAGING) && find . -type f ! -name '*.md5' -print0 | xargs -0 md5sum > checksum.md5 + tar cfz $(APP_TARBALL_FLUXCD) -C $(STAGING)/ . + + # Cleanup staging + 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) + +override_dh_auto_test: + +override_dh_usrlocal: diff --git a/stx-dell-storage-helm/debian/deb_folder/source/format b/stx-dell-storage-helm/debian/deb_folder/source/format new file mode 100644 index 0000000..163aaf8 --- /dev/null +++ b/stx-dell-storage-helm/debian/deb_folder/source/format @@ -0,0 +1 @@ +3.0 (quilt) diff --git a/stx-dell-storage-helm/debian/deb_folder/stx-dell-storage-helm.install b/stx-dell-storage-helm/debian/deb_folder/stx-dell-storage-helm.install new file mode 100644 index 0000000..1b47c6e --- /dev/null +++ b/stx-dell-storage-helm/debian/deb_folder/stx-dell-storage-helm.install @@ -0,0 +1 @@ +usr/local/share/applications/helm/* diff --git a/stx-dell-storage-helm/debian/meta_data.yaml b/stx-dell-storage-helm/debian/meta_data.yaml new file mode 100644 index 0000000..1ff84b3 --- /dev/null +++ b/stx-dell-storage-helm/debian/meta_data.yaml @@ -0,0 +1,9 @@ +--- +debname: stx-dell-storage-helm +debver: 1.0-1 +src_path: stx-dell-storage-helm +revision: + dist: $STX_DIST + GITREVCOUNT: + BASE_SRCREV: 8db8f63466df064069133380243443e3822fa8ce + SRC_DIR: ${MY_REPO}/stx/app-dell-storage diff --git a/stx-dell-storage-helm/stx-dell-storage-helm/files/metadata.yaml b/stx-dell-storage-helm/stx-dell-storage-helm/files/metadata.yaml new file mode 100644 index 0000000..317981e --- /dev/null +++ b/stx-dell-storage-helm/stx-dell-storage-helm/files/metadata.yaml @@ -0,0 +1,18 @@ +app_name: @APP_NAME@ +app_version: @APP_VERSION@ +helm_repo: @HELM_REPO@ +maintain_user_overrides: true +maintain_attributes: true + +disabled_charts: +- csi-unity +- csm-application-mobility +- csm-observability +- csm-replication + +upgrades: + auto_update: true + +behavior: + platform_managed_app: yes + desired_state: uploaded diff --git a/stx-dell-storage-helm/stx-dell-storage-helm/fluxcd-manifests/base/helmrepository.yaml b/stx-dell-storage-helm/stx-dell-storage-helm/fluxcd-manifests/base/helmrepository.yaml new file mode 100644 index 0000000..2e961a4 --- /dev/null +++ b/stx-dell-storage-helm/stx-dell-storage-helm/fluxcd-manifests/base/helmrepository.yaml @@ -0,0 +1,13 @@ +# +# Copyright (c) 2023 Wind River Systems, Inc. +# +# SPDX-License-Identifier: Apache-2.0 +# + +apiVersion: source.toolkit.fluxcd.io/v1beta1 +kind: HelmRepository +metadata: + name: stx-platform +spec: + url: http://192.168.206.1:8080/helm_charts/stx-platform + interval: 1m diff --git a/stx-dell-storage-helm/stx-dell-storage-helm/fluxcd-manifests/base/kustomization.yaml b/stx-dell-storage-helm/stx-dell-storage-helm/fluxcd-manifests/base/kustomization.yaml new file mode 100644 index 0000000..9bc69b1 --- /dev/null +++ b/stx-dell-storage-helm/stx-dell-storage-helm/fluxcd-manifests/base/kustomization.yaml @@ -0,0 +1,8 @@ +# +# Copyright (c) 2023 Wind River Systems, Inc. +# +# SPDX-License-Identifier: Apache-2.0 +# + +resources: + - helmrepository.yaml diff --git a/stx-dell-storage-helm/stx-dell-storage-helm/fluxcd-manifests/base/namespace.yaml b/stx-dell-storage-helm/stx-dell-storage-helm/fluxcd-manifests/base/namespace.yaml new file mode 100644 index 0000000..6c59bec --- /dev/null +++ b/stx-dell-storage-helm/stx-dell-storage-helm/fluxcd-manifests/base/namespace.yaml @@ -0,0 +1,10 @@ +# +# Copyright (c) 2023 Wind River Systems, Inc. +# +# SPDX-License-Identifier: Apache-2.0 +# + +apiVersion: v1 +kind: Namespace +metadata: + name: dell-storage diff --git a/stx-dell-storage-helm/stx-dell-storage-helm/fluxcd-manifests/csi-powerstore/csi-powerstore-static-overrides.yaml b/stx-dell-storage-helm/stx-dell-storage-helm/fluxcd-manifests/csi-powerstore/csi-powerstore-static-overrides.yaml new file mode 100644 index 0000000..bf8d82a --- /dev/null +++ b/stx-dell-storage-helm/stx-dell-storage-helm/fluxcd-manifests/csi-powerstore/csi-powerstore-static-overrides.yaml @@ -0,0 +1,56 @@ +# +# Copyright (c) 2023 Wind River Systems, Inc. +# +# SPDX-License-Identifier: Apache-2.0 +# + +csm: + replication: false + resiliency: false + +app.starlingx.io/component: platform + +controller: + metadataretriever: + image: dellemc/csi-metadata-retriever:v1.3.0 + attacher: + image: k8s.gcr.io/sig-storage/csi-attacher:v4.2.0 + healthMonitor: + image: gcr.io/k8s-staging-sig-storage/csi-external-health-monitor-controller:v0.8.0 + provisioner: + image: k8s.gcr.io/sig-storage/csi-provisioner:v3.4.1 + replication: + image: dellemc/dell-csi-replicator:v1.4.0 + resizer: + image: k8s.gcr.io/sig-storage/csi-resizer:v1.7.0 + vgsnapshot: + image: dellemc/csi-volumegroup-snapshotter:v1.2.0 + snapshot: + image: k8s.gcr.io/sig-storage/csi-snapshotter:v6.2.1 + snapNamePrefix: csi-powerstore-snap + volumeNamePrefix: csi-powerstore-vol + tolerations: + - key: "node-role.kubernetes.io/master" + operator: "Exists" + effect: "NoSchedule" + - key: "node-role.kubernetes.io/control-plane" + operator: "Exists" + effect: "NoSchedule" + +node: + registrar: + image: k8s.gcr.io/sig-storage/csi-node-driver-registrar:v2.6.3 + tolerations: + - operator: "Exists" + +driver: + image: dellemc/csi-powerstore:v2.6.0 + +podmon: + image: dellemc/podmon:v1.5.0 + +secrets: + create: true + arrays: + +storageClasses: diff --git a/stx-dell-storage-helm/stx-dell-storage-helm/fluxcd-manifests/csi-powerstore/csi-powerstore-system-overrides.yaml b/stx-dell-storage-helm/stx-dell-storage-helm/fluxcd-manifests/csi-powerstore/csi-powerstore-system-overrides.yaml new file mode 100644 index 0000000..e69de29 diff --git a/stx-dell-storage-helm/stx-dell-storage-helm/fluxcd-manifests/csi-powerstore/helmrelease.yaml b/stx-dell-storage-helm/stx-dell-storage-helm/fluxcd-manifests/csi-powerstore/helmrelease.yaml new file mode 100644 index 0000000..af4724d --- /dev/null +++ b/stx-dell-storage-helm/stx-dell-storage-helm/fluxcd-manifests/csi-powerstore/helmrelease.yaml @@ -0,0 +1,36 @@ +# +# Copyright (c) 2023 Wind River Systems, Inc. +# +# SPDX-License-Identifier: Apache-2.0 +# + +apiVersion: "helm.toolkit.fluxcd.io/v2beta1" +kind: HelmRelease +metadata: + name: csi-powerstore + labels: + chart_group: dell-storage-charts +spec: + releaseName: csi-powerstore + chart: + spec: + chart: csi-powerstore + version: 2.6.0 + sourceRef: + kind: HelmRepository + name: stx-platform + interval: 1m + timeout: 30m + test: + enable: false + install: + disableHooks: false + upgrade: + disableHooks: false + valuesFrom: + - kind: Secret + name: csi-powerstore-static-overrides + valuesKey: csi-powerstore-static-overrides.yaml + - kind: Secret + name: csi-powerstore-system-overrides + valuesKey: csi-powerstore-system-overrides.yaml diff --git a/stx-dell-storage-helm/stx-dell-storage-helm/fluxcd-manifests/csi-powerstore/kustomization.yaml b/stx-dell-storage-helm/stx-dell-storage-helm/fluxcd-manifests/csi-powerstore/kustomization.yaml new file mode 100644 index 0000000..d00836f --- /dev/null +++ b/stx-dell-storage-helm/stx-dell-storage-helm/fluxcd-manifests/csi-powerstore/kustomization.yaml @@ -0,0 +1,18 @@ +# +# Copyright (c) 2023 Wind River Systems, Inc. +# +# SPDX-License-Identifier: Apache-2.0 +# + +namespace: dell-storage +resources: + - helmrelease.yaml +secretGenerator: + - name: csi-powerstore-static-overrides + files: + - csi-powerstore-static-overrides.yaml + - name: csi-powerstore-system-overrides + files: + - csi-powerstore-system-overrides.yaml +generatorOptions: + disableNameSuffixHash: true diff --git a/stx-dell-storage-helm/stx-dell-storage-helm/fluxcd-manifests/csi-unity/csi-unity-static-overrides.yaml b/stx-dell-storage-helm/stx-dell-storage-helm/fluxcd-manifests/csi-unity/csi-unity-static-overrides.yaml new file mode 100644 index 0000000..9f0e210 --- /dev/null +++ b/stx-dell-storage-helm/stx-dell-storage-helm/fluxcd-manifests/csi-unity/csi-unity-static-overrides.yaml @@ -0,0 +1,44 @@ +# +# Copyright (c) 2023 Wind River Systems, Inc. +# +# SPDX-License-Identifier: Apache-2.0 +# + +csm: + resiliency: false + +app.starlingx.io/component: platform + +controller: + attacher: + image: k8s.gcr.io/sig-storage/csi-attacher:v4.2.0 + healthMonitor: + image: gcr.io/k8s-staging-sig-storage/csi-external-health-monitor-controller:v0.8.0 + provisioner: + image: k8s.gcr.io/sig-storage/csi-provisioner:v3.4.1 + resizer: + image: k8s.gcr.io/sig-storage/csi-resizer:v1.7.0 + snapshot: + image: k8s.gcr.io/sig-storage/csi-snapshotter:v6.2.1 + snapNamePrefix: csi-unity-snap + volumeNamePrefix: csi-unity-vol + tolerations: + - key: "node-role.kubernetes.io/master" + operator: "Exists" + effect: "NoSchedule" + - key: "node-role.kubernetes.io/control-plane" + operator: "Exists" + effect: "NoSchedule" + +node: + registrar: + image: k8s.gcr.io/sig-storage/csi-node-driver-registrar:v2.6.3 + nodeNamePrefix: csi-unity-node + tolerations: + - operator: "Exists" + +driver: + image: dellemc/csi-unity:v2.6.0 + +podmon: + image: dellemc/podmon:v1.5.0 diff --git a/stx-dell-storage-helm/stx-dell-storage-helm/fluxcd-manifests/csi-unity/csi-unity-system-overrides.yaml b/stx-dell-storage-helm/stx-dell-storage-helm/fluxcd-manifests/csi-unity/csi-unity-system-overrides.yaml new file mode 100644 index 0000000..e69de29 diff --git a/stx-dell-storage-helm/stx-dell-storage-helm/fluxcd-manifests/csi-unity/helmrelease.yaml b/stx-dell-storage-helm/stx-dell-storage-helm/fluxcd-manifests/csi-unity/helmrelease.yaml new file mode 100644 index 0000000..492945e --- /dev/null +++ b/stx-dell-storage-helm/stx-dell-storage-helm/fluxcd-manifests/csi-unity/helmrelease.yaml @@ -0,0 +1,36 @@ +# +# Copyright (c) 2023 Wind River Systems, Inc. +# +# SPDX-License-Identifier: Apache-2.0 +# + +apiVersion: "helm.toolkit.fluxcd.io/v2beta1" +kind: HelmRelease +metadata: + name: csi-unity + labels: + chart_group: dell-storage-charts +spec: + releaseName: csi-unity + chart: + spec: + chart: csi-unity + version: 2.6.0 + sourceRef: + kind: HelmRepository + name: stx-platform + interval: 1m + timeout: 30m + test: + enable: false + install: + disableHooks: false + upgrade: + disableHooks: false + valuesFrom: + - kind: Secret + name: csi-unity-static-overrides + valuesKey: csi-unity-static-overrides.yaml + - kind: Secret + name: csi-unity-system-overrides + valuesKey: csi-unity-system-overrides.yaml diff --git a/stx-dell-storage-helm/stx-dell-storage-helm/fluxcd-manifests/csi-unity/kustomization.yaml b/stx-dell-storage-helm/stx-dell-storage-helm/fluxcd-manifests/csi-unity/kustomization.yaml new file mode 100644 index 0000000..d16dede --- /dev/null +++ b/stx-dell-storage-helm/stx-dell-storage-helm/fluxcd-manifests/csi-unity/kustomization.yaml @@ -0,0 +1,18 @@ +# +# Copyright (c) 2023 Wind River Systems, Inc. +# +# SPDX-License-Identifier: Apache-2.0 +# + +namespace: dell-storage +resources: + - helmrelease.yaml +secretGenerator: + - name: csi-unity-static-overrides + files: + - csi-unity-static-overrides.yaml + - name: csi-unity-system-overrides + files: + - csi-unity-system-overrides.yaml +generatorOptions: + disableNameSuffixHash: true diff --git a/stx-dell-storage-helm/stx-dell-storage-helm/fluxcd-manifests/csm-application-mobility/csm-application-mobility-static-overrides.yaml b/stx-dell-storage-helm/stx-dell-storage-helm/fluxcd-manifests/csm-application-mobility/csm-application-mobility-static-overrides.yaml new file mode 100644 index 0000000..b1b3de5 --- /dev/null +++ b/stx-dell-storage-helm/stx-dell-storage-helm/fluxcd-manifests/csm-application-mobility/csm-application-mobility-static-overrides.yaml @@ -0,0 +1,46 @@ +# +# Copyright (c) 2023 Wind River Systems, Inc. +# +# SPDX-License-Identifier: Apache-2.0 +# + +app.starlingx.io/component: platform + +controller: + image: dellemc/csm-application-mobility-controller:v0.3.0 + +licenseName: csm-application-mobility-license + +objectstore: + secretName: velero-cloud-credentials + +veleroNamespace: dell-storage + +velero: + enabled: true + app.starlingx.io/component: platform + credentials: + name: velero-cloud-credentials + image: + repository: velero/velero + tag: v1.8.1 + initContainers: + - name: dell-custom-velero-plugin + image: dellemc/csm-application-mobility-velero-plugin:v0.3.0 + volumeMounts: + - mountPath: /target + name: plugins + kubectl: + image: + repository: docker.io/bitnami/kubectl + tag: latest + tolerations: + - key: "node-role.kubernetes.io/master" + operator: "Exists" + effect: "NoSchedule" + - key: "node-role.kubernetes.io/control-plane" + operator: "Exists" + effect: "NoSchedule" + +rbac: + image: gcr.io/kubebuilder/kube-rbac-proxy:v0.11.0 diff --git a/stx-dell-storage-helm/stx-dell-storage-helm/fluxcd-manifests/csm-application-mobility/csm-application-mobility-system-overrides.yaml b/stx-dell-storage-helm/stx-dell-storage-helm/fluxcd-manifests/csm-application-mobility/csm-application-mobility-system-overrides.yaml new file mode 100644 index 0000000..e69de29 diff --git a/stx-dell-storage-helm/stx-dell-storage-helm/fluxcd-manifests/csm-application-mobility/helmrelease.yaml b/stx-dell-storage-helm/stx-dell-storage-helm/fluxcd-manifests/csm-application-mobility/helmrelease.yaml new file mode 100644 index 0000000..1a23ec7 --- /dev/null +++ b/stx-dell-storage-helm/stx-dell-storage-helm/fluxcd-manifests/csm-application-mobility/helmrelease.yaml @@ -0,0 +1,36 @@ +# +# Copyright (c) 2023 Wind River Systems, Inc. +# +# SPDX-License-Identifier: Apache-2.0 +# + +apiVersion: "helm.toolkit.fluxcd.io/v2beta1" +kind: HelmRelease +metadata: + name: csm-application-mobility + labels: + chart_group: dell-storage-charts +spec: + releaseName: csm-application-mobility + chart: + spec: + chart: csm-application-mobility + version: 0.3.0 + sourceRef: + kind: HelmRepository + name: stx-platform + interval: 1m + timeout: 30m + test: + enable: false + install: + disableHooks: false + upgrade: + disableHooks: false + valuesFrom: + - kind: Secret + name: csm-application-mobility-static-overrides + valuesKey: csm-application-mobility-static-overrides.yaml + - kind: Secret + name: csm-application-mobility-system-overrides + valuesKey: csm-application-mobility-system-overrides.yaml diff --git a/stx-dell-storage-helm/stx-dell-storage-helm/fluxcd-manifests/csm-application-mobility/kustomization.yaml b/stx-dell-storage-helm/stx-dell-storage-helm/fluxcd-manifests/csm-application-mobility/kustomization.yaml new file mode 100644 index 0000000..623010a --- /dev/null +++ b/stx-dell-storage-helm/stx-dell-storage-helm/fluxcd-manifests/csm-application-mobility/kustomization.yaml @@ -0,0 +1,18 @@ +# +# Copyright (c) 2023 Wind River Systems, Inc. +# +# SPDX-License-Identifier: Apache-2.0 +# + +namespace: dell-storage +resources: + - helmrelease.yaml +secretGenerator: + - name: csm-application-mobility-static-overrides + files: + - csm-application-mobility-static-overrides.yaml + - name: csm-application-mobility-system-overrides + files: + - csm-application-mobility-system-overrides.yaml +generatorOptions: + disableNameSuffixHash: true diff --git a/stx-dell-storage-helm/stx-dell-storage-helm/fluxcd-manifests/csm-observability/csm-observability-static-overrides.yaml b/stx-dell-storage-helm/stx-dell-storage-helm/fluxcd-manifests/csm-observability/csm-observability-static-overrides.yaml new file mode 100644 index 0000000..fe92aaa --- /dev/null +++ b/stx-dell-storage-helm/stx-dell-storage-helm/fluxcd-manifests/csm-observability/csm-observability-static-overrides.yaml @@ -0,0 +1,26 @@ +# +# Copyright (c) 2023 Wind River Systems, Inc. +# +# SPDX-License-Identifier: Apache-2.0 +# + +app.starlingx.io/component: platform + +karaviMetricsPowerstore: + enabled: true + image: dellemc/csm-metrics-powerstore:v1.5.0 +karaviMetricsPowerflex: + enabled: false +karaviMetricsPowerscale: + enabled: false +karaviMetricsPowermax: + enabled: false +karaviTopology: + enabled: true + image: dellemc/csm-topology:v1.5.0 +otelCollector: + image: otel/opentelemetry-collector:0.42.0 + nginxProxy: + image: nginxinc/nginx-unprivileged:1.20 +cert-manager: + enabled: false diff --git a/stx-dell-storage-helm/stx-dell-storage-helm/fluxcd-manifests/csm-observability/csm-observability-system-overrides.yaml b/stx-dell-storage-helm/stx-dell-storage-helm/fluxcd-manifests/csm-observability/csm-observability-system-overrides.yaml new file mode 100644 index 0000000..e69de29 diff --git a/stx-dell-storage-helm/stx-dell-storage-helm/fluxcd-manifests/csm-observability/helmrelease.yaml b/stx-dell-storage-helm/stx-dell-storage-helm/fluxcd-manifests/csm-observability/helmrelease.yaml new file mode 100644 index 0000000..eb96992 --- /dev/null +++ b/stx-dell-storage-helm/stx-dell-storage-helm/fluxcd-manifests/csm-observability/helmrelease.yaml @@ -0,0 +1,36 @@ +# +# Copyright (c) 2023 Wind River Systems, Inc. +# +# SPDX-License-Identifier: Apache-2.0 +# + +apiVersion: "helm.toolkit.fluxcd.io/v2beta1" +kind: HelmRelease +metadata: + name: csm-observability + labels: + chart_group: dell-storage-charts +spec: + releaseName: csm-observability + chart: + spec: + chart: karavi-observability + version: 1.5.0 + sourceRef: + kind: HelmRepository + name: stx-platform + interval: 1m + timeout: 30m + test: + enable: false + install: + disableHooks: false + upgrade: + disableHooks: false + valuesFrom: + - kind: Secret + name: csm-observability-static-overrides + valuesKey: csm-observability-static-overrides.yaml + - kind: Secret + name: csm-observability-system-overrides + valuesKey: csm-observability-system-overrides.yaml diff --git a/stx-dell-storage-helm/stx-dell-storage-helm/fluxcd-manifests/csm-observability/kustomization.yaml b/stx-dell-storage-helm/stx-dell-storage-helm/fluxcd-manifests/csm-observability/kustomization.yaml new file mode 100644 index 0000000..43a8500 --- /dev/null +++ b/stx-dell-storage-helm/stx-dell-storage-helm/fluxcd-manifests/csm-observability/kustomization.yaml @@ -0,0 +1,18 @@ +# +# Copyright (c) 2023 Wind River Systems, Inc. +# +# SPDX-License-Identifier: Apache-2.0 +# + +namespace: dell-storage +resources: + - helmrelease.yaml +secretGenerator: + - name: csm-observability-static-overrides + files: + - csm-observability-static-overrides.yaml + - name: csm-observability-system-overrides + files: + - csm-observability-system-overrides.yaml +generatorOptions: + disableNameSuffixHash: true diff --git a/stx-dell-storage-helm/stx-dell-storage-helm/fluxcd-manifests/csm-replication/csm-replication-static-overrides.yaml b/stx-dell-storage-helm/stx-dell-storage-helm/fluxcd-manifests/csm-replication/csm-replication-static-overrides.yaml new file mode 100644 index 0000000..b623d39 --- /dev/null +++ b/stx-dell-storage-helm/stx-dell-storage-helm/fluxcd-manifests/csm-replication/csm-replication-static-overrides.yaml @@ -0,0 +1,11 @@ +# +# Copyright (c) 2023 Wind River Systems, Inc. +# +# SPDX-License-Identifier: Apache-2.0 +# + +app.starlingx.io/component: platform + +image: dellemc/dell-replication-controller:v1.4.0 +containerInit: + image: dellemc/dell-replication-init:v1.0.0 diff --git a/stx-dell-storage-helm/stx-dell-storage-helm/fluxcd-manifests/csm-replication/csm-replication-system-overrides.yaml b/stx-dell-storage-helm/stx-dell-storage-helm/fluxcd-manifests/csm-replication/csm-replication-system-overrides.yaml new file mode 100644 index 0000000..e69de29 diff --git a/stx-dell-storage-helm/stx-dell-storage-helm/fluxcd-manifests/csm-replication/helmrelease.yaml b/stx-dell-storage-helm/stx-dell-storage-helm/fluxcd-manifests/csm-replication/helmrelease.yaml new file mode 100644 index 0000000..c666e4d --- /dev/null +++ b/stx-dell-storage-helm/stx-dell-storage-helm/fluxcd-manifests/csm-replication/helmrelease.yaml @@ -0,0 +1,36 @@ +# +# Copyright (c) 2023 Wind River Systems, Inc. +# +# SPDX-License-Identifier: Apache-2.0 +# + +apiVersion: "helm.toolkit.fluxcd.io/v2beta1" +kind: HelmRelease +metadata: + name: csm-replication + labels: + chart_group: dell-storage-charts +spec: + releaseName: csm-replication + chart: + spec: + chart: csm-replication + version: 1.4.0 + sourceRef: + kind: HelmRepository + name: stx-platform + interval: 1m + timeout: 30m + test: + enable: false + install: + disableHooks: false + upgrade: + disableHooks: false + valuesFrom: + - kind: Secret + name: csm-replication-static-overrides + valuesKey: csm-replication-static-overrides.yaml + - kind: Secret + name: csm-replication-system-overrides + valuesKey: csm-replication-system-overrides.yaml diff --git a/stx-dell-storage-helm/stx-dell-storage-helm/fluxcd-manifests/csm-replication/kustomization.yaml b/stx-dell-storage-helm/stx-dell-storage-helm/fluxcd-manifests/csm-replication/kustomization.yaml new file mode 100644 index 0000000..5b186a3 --- /dev/null +++ b/stx-dell-storage-helm/stx-dell-storage-helm/fluxcd-manifests/csm-replication/kustomization.yaml @@ -0,0 +1,18 @@ +# +# Copyright (c) 2023 Wind River Systems, Inc. +# +# SPDX-License-Identifier: Apache-2.0 +# + +namespace: dell-storage +resources: + - helmrelease.yaml +secretGenerator: + - name: csm-replication-static-overrides + files: + - csm-replication-static-overrides.yaml + - name: csm-replication-system-overrides + files: + - csm-replication-system-overrides.yaml +generatorOptions: + disableNameSuffixHash: true diff --git a/stx-dell-storage-helm/stx-dell-storage-helm/fluxcd-manifests/kustomization.yaml b/stx-dell-storage-helm/stx-dell-storage-helm/fluxcd-manifests/kustomization.yaml new file mode 100644 index 0000000..ee53d9b --- /dev/null +++ b/stx-dell-storage-helm/stx-dell-storage-helm/fluxcd-manifests/kustomization.yaml @@ -0,0 +1,16 @@ +# +# Copyright (c) 2023 Wind River Systems, Inc. +# +# SPDX-License-Identifier: Apache-2.0 +# + +apiVersion: kustomize.config.k8s.io/v1beta1 +kind: Kustomization +namespace: dell-storage +resources: + - base + - csi-powerstore + - csi-unity + - csm-replication + - csm-observability + - csm-application-mobility diff --git a/test-requirements.txt b/test-requirements.txt index 8ae3e22..fa7c694 100644 --- a/test-requirements.txt +++ b/test-requirements.txt @@ -1,3 +1,3 @@ # hacking pulls in flake8 -hacking!=0.13.0,<0.14,>=0.12.0 # Apache-2.0 +hacking>=1.1.0,<=2.0.0 # Apache-2.0 bashate >= 0.2 diff --git a/tox.ini b/tox.ini index 9f259c7..2442671 100644 --- a/tox.ini +++ b/tox.ini @@ -6,7 +6,9 @@ sitepackages=False [testenv] basepython = python3 -install_command = pip install -U {opts} {packages} +install_command = pip install -U \ + {opts} {packages} \ + -c{env:TOX_CONSTRAINTS_FILE:https://opendev.org/starlingx/root/raw/branch/master/build-tools/requirements/debian/upper-constraints.txt} setenv = VIRTUAL_ENV={envdir} OS_STDOUT_CAPTURE=1 @@ -19,6 +21,18 @@ deps = allowlist_externals = bash +[testenv:flake8] +basepython = python3 +description = Dummy environment to allow flake8 to be run in subdir tox + +[testenv:pylint] +basepython = python3 +description = Dummy environment to allow pylint to be run in subdir tox + +[testenv:bandit] +basepython = python3 +description = Dummy environment to allow bandit to be run in subdir tox + [testenv:bashate] # Treat all E* codes as Errors rather than warnings using: -e 'E*' commands =