From 34049cb6ba5e48251862f40d5db6c6d6368ca962 Mon Sep 17 00:00:00 2001 From: Diwakar Sharma Date: Mon, 30 Sep 2024 06:25:55 +0000 Subject: [PATCH 1/5] chore: helm changes to use OPENEBS_NAMESPACE Signed-off-by: Diwakar Sharma --- deploy/helm/charts/Chart.yaml | 6 +++--- deploy/helm/charts/charts/crds/Chart.yaml | 2 +- deploy/helm/charts/templates/lvm-controller.yaml | 2 +- deploy/helm/charts/templates/lvm-node.yaml | 2 +- deploy/helm/charts/values.yaml | 2 +- 5 files changed, 7 insertions(+), 7 deletions(-) diff --git a/deploy/helm/charts/Chart.yaml b/deploy/helm/charts/Chart.yaml index d89f5eff..ee72696a 100644 --- a/deploy/helm/charts/Chart.yaml +++ b/deploy/helm/charts/Chart.yaml @@ -1,8 +1,8 @@ apiVersion: v2 name: lvm-localpv description: CSI Driver for dynamic provisioning of LVM Persistent Local Volumes. -version: 1.6.2 -appVersion: 1.6.1 +version: 1.7.0-develop +appVersion: 1.7.0-develop icon: https://raw.githubusercontent.com/cncf/artwork/master/projects/openebs/icon/color/openebs-icon-color.png home: https://openebs.io/ keywords: @@ -16,5 +16,5 @@ sources: - https://github.com/openebs/lvm-localpv dependencies: - name: crds - version: 1.6.2 + version: 1.7.0-develop condition: crds.enabled diff --git a/deploy/helm/charts/charts/crds/Chart.yaml b/deploy/helm/charts/charts/crds/Chart.yaml index 16f48daf..c5d90db1 100644 --- a/deploy/helm/charts/charts/crds/Chart.yaml +++ b/deploy/helm/charts/charts/crds/Chart.yaml @@ -1,4 +1,4 @@ apiVersion: v2 name: crds -version: 1.6.2 +version: 1.7.0-develop description: A Helm chart that collects CustomResourceDefinitions (CRDs) from lvm-localpv. diff --git a/deploy/helm/charts/templates/lvm-controller.yaml b/deploy/helm/charts/templates/lvm-controller.yaml index 4d65181b..345e497f 100644 --- a/deploy/helm/charts/templates/lvm-controller.yaml +++ b/deploy/helm/charts/templates/lvm-controller.yaml @@ -109,7 +109,7 @@ spec: value: controller - name: OPENEBS_CSI_ENDPOINT value: unix:///var/lib/csi/sockets/pluginproxy/csi.sock - - name: LVM_NAMESPACE + - name: OPENEBS_NAMESPACE valueFrom: fieldRef: fieldPath: metadata.namespace diff --git a/deploy/helm/charts/templates/lvm-node.yaml b/deploy/helm/charts/templates/lvm-node.yaml index a72c83e8..209f5a00 100644 --- a/deploy/helm/charts/templates/lvm-node.yaml +++ b/deploy/helm/charts/templates/lvm-node.yaml @@ -91,7 +91,7 @@ spec: value: unix:///plugin/csi.sock - name: OPENEBS_NODE_DRIVER value: agent - - name: LVM_NAMESPACE + - name: OPENEBS_NAMESPACE valueFrom: fieldRef: fieldPath: metadata.namespace diff --git a/deploy/helm/charts/values.yaml b/deploy/helm/charts/values.yaml index 255ca067..aa4453b4 100644 --- a/deploy/helm/charts/values.yaml +++ b/deploy/helm/charts/values.yaml @@ -149,7 +149,7 @@ lvmPlugin: repository: openebs/lvm-driver pullPolicy: IfNotPresent # Overrides the image tag whose default is the chart appVersion. - tag: 1.6.1 + tag: 1.7.0-develop ioLimits: enabled: false containerRuntime: containerd From 4a67df3e90df79bfb28315f1e58343848da40229 Mon Sep 17 00:00:00 2001 From: Diwakar Sharma Date: Mon, 30 Sep 2024 06:26:58 +0000 Subject: [PATCH 2/5] ci: enable new ci and build.yml changes Signed-off-by: Diwakar Sharma --- .../{build.yml => build_and_push.yml} | 138 ++++++------------ .github/workflows/chart-lint-test.yml | 56 ------- .github/workflows/pull_request.yml | 54 +++---- .github/workflows/release-charts.yml | 34 ----- ci/ci-test.sh | 9 +- 5 files changed, 74 insertions(+), 217 deletions(-) rename .github/workflows/{build.yml => build_and_push.yml} (58%) delete mode 100644 .github/workflows/chart-lint-test.yml delete mode 100644 .github/workflows/release-charts.yml diff --git a/.github/workflows/build.yml b/.github/workflows/build_and_push.yml similarity index 58% rename from .github/workflows/build.yml rename to .github/workflows/build_and_push.yml index 5c9dc2c2..0c61b65c 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build_and_push.yml @@ -1,66 +1,43 @@ -# Copyright 2020 The OpenEBS Authors. All rights reserved. -# -# 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. -name: build +name: Build and Push on: - create: push: branches: - - 'develop' - - 'v*' + - develop + - "release/**" paths-ignore: - - '*.md' - - 'BUILDMETA' - - 'changelogs/**' - - 'deploy/helm/**' - - 'docs/**' - - 'LICENSE' - - 'MAINTAINERS' + - "*.md" + - "BUILDMETA" + - "changelogs/**" + - "docs/**" + - "design/**" + - "LICENSE" + - "MAINTAINERS" jobs: lint: - # to ignore builds on release - if: ${{ (github.event.ref_type != 'tag') }} runs-on: ubuntu-latest steps: - name: Checkout uses: actions/checkout@v4 - - - name: Shellcheck - uses: reviewdog/action-shellcheck@v1 with: - github_token: ${{ secrets.github_token }} - reporter: github-pr-review - path: '.' - pattern: '*.sh' - exclude: './.git/*' + fetch-depth: 0 - - name: Set up Go 1.19 - uses: actions/setup-go@v5 + - uses: cachix/install-nix-action@v22 + - uses: rrbutani/use-nix-shell-action@v1.1.0 with: - go-version: 1.19.9 - cache: false + file: shell.nix - - name: Lint Check - uses: golangci/golangci-lint-action@v4 - with: - version: v1.56.2 - args: -E exportloopref,dupl,revive,bodyclose,goconst,misspell -D structcheck --timeout 5m0s + - name: Check if the chart follows a valid semver version + run: | + BRANCH=${{ github.ref_name }} + ./scripts/validate-chart-version.sh --branch $BRANCH + + - name: Run chart-testing lint + run: | + ct lint --config ct.yaml - unit-test: - # to ignore builds on release - if: ${{ (github.event.ref_type != 'tag') }} + unit-tests: runs-on: ubuntu-latest steps: - name: Checkout @@ -76,15 +53,15 @@ jobs: run: make test - name: Upload Coverage Report - uses: codecov/codecov-action@v4 + uses: codecov/codecov-action@v4 with: token: ${{ secrets.CODECOV_TOKEN }} file: ./coverage.txt name: coverage-$(date +%s) flags: unittests - bdd-test: - needs: ['unit-test'] + bdd-tests: + needs: ["unit-tests"] runs-on: ubuntu-latest strategy: fail-fast: true @@ -108,7 +85,7 @@ jobs: driver: none kubernetes-version: ${{ matrix.kubernetes }} cni: calico - start-args: '--install-addons=false' + start-args: "--install-addons=false" - name: Build images locally run: make lvm-driver-image || exit 1; @@ -117,6 +94,8 @@ jobs: run: make bootstrap - name: Running tests + env: + OPENEBS_NAMESPACE: "openebs" run: ./ci/ci-test.sh - name: Upload Coverage Report @@ -127,44 +106,14 @@ jobs: name: coverage-bdd_coverage-$(date +%s) flags: bddtests - ansible: - runs-on: ubuntu-latest - needs: ['lint', 'unit-test', 'bdd-test'] - steps: - - name: Checkout - uses: actions/checkout@v4 - - - name: Set Image Org - # sets the default IMAGE_ORG to openebs - run: | - [ -z "${{ secrets.IMAGE_ORG }}" ] && IMAGE_ORG=openebs || IMAGE_ORG=${{ secrets.IMAGE_ORG}} - echo "IMAGE_ORG=${IMAGE_ORG}" >> $GITHUB_ENV - - - name: Login to Docker Hub - uses: docker/login-action@v3 - with: - username: ${{ secrets.DOCKERHUB_USERNAME }} - password: ${{ secrets.DOCKERHUB_TOKEN }} - - - name: Build and push the ansible image - uses: docker/build-push-action@v5 - with: - file: ./e2e-tests/Dockerfile - push: true - load: false - platforms: linux/amd64 - tags: | - ${{ env.IMAGE_ORG }}/lvm-localpv-e2e:ci - csi-driver: runs-on: ubuntu-latest - needs: ['lint', 'unit-test', 'bdd-test'] + needs: ["lint", "bdd-tests"] steps: - name: Checkout uses: actions/checkout@v4 - name: Set Image Org - # sets the default IMAGE_ORG to openebs run: | [ -z "${{ secrets.IMAGE_ORG }}" ] && IMAGE_ORG=openebs || IMAGE_ORG=${{ secrets.IMAGE_ORG }} echo "IMAGE_ORG=${IMAGE_ORG}" >> $GITHUB_ENV @@ -174,15 +123,11 @@ jobs: run: | echo "DATE=$(date -u +'%Y-%m-%dT%H:%M:%S%Z')" >> $GITHUB_OUTPUT - - name: Set Tag + - name: Set IMAGE_TAG and BRANCH run: | - BRANCH="${GITHUB_REF##*/}" - CI_TAG=${BRANCH#v}-ci - if [ ${BRANCH} = "develop" ]; then - CI_TAG="ci" - fi - echo "TAG=${CI_TAG}" >> $GITHUB_ENV - echo "BRANCH=${BRANCH}" >> $GITHUB_ENV + BRANCH=${{ github.ref_name }} + echo "BRANCH=$BRANCH" >> $GITHUB_ENV + echo "IMAGE_TAG=$(awk -F': ' '/^version:/ {print $2}' deploy/helm/charts/Chart.yaml)" >> $GITHUB_ENV - name: Docker meta id: docker_meta @@ -195,11 +140,11 @@ jobs: ghcr.io/${{ env.IMAGE_ORG }}/lvm-driver tags: | type=raw,value=latest,enable=false - type=raw,value=${{ env.TAG }} + type=raw,value=${{ env.IMAGE_TAG }} - name: Print Tag info run: | - echo "BRANCH: ${BRANCH}" + echo "BRANCH: ${{ env.BRANCH }}" echo "${{ steps.docker_meta.outputs.tags }}" - name: Set up QEMU @@ -247,3 +192,14 @@ jobs: DBUILD_REPO_URL=https://github.com/openebs/lvm-localpv DBUILD_SITE_URL=https://openebs.io BRANCH=${{ env.BRANCH }} + + release-chart: + runs-on: ubuntu-latest + needs: ["csi-driver"] + steps: + - uses: actions/checkout@v4 + - name: Publish lvm localpv develop or prerelease helm chart + uses: stefanprodan/helm-gh-pages@master + with: + token: ${{ secrets.GITHUB_TOKEN }} + charts_dir: ./deploy/helm diff --git a/.github/workflows/chart-lint-test.yml b/.github/workflows/chart-lint-test.yml deleted file mode 100644 index fa686075..00000000 --- a/.github/workflows/chart-lint-test.yml +++ /dev/null @@ -1,56 +0,0 @@ -name: Chart Lint and Test - -#on: -# push: -# paths: -# - 'deploy/helm/**' -# branches: -# - develop -# pull_request: -# paths: -# - 'deploy/helm/**' -# branches: -# - 'develop' -# - 'release/**' - -jobs: - lint-test: - runs-on: ubuntu-latest - steps: - - name: Checkout - uses: actions/checkout@v4 - with: - fetch-depth: 0 - - - name: Set up Helm - uses: azure/setup-helm@v4 - with: - version: v3.14.3 - - - uses: actions/setup-python@v5 - with: - python-version: '3.10' - check-latest: true - - - name: Set up chart-testing - uses: helm/chart-testing-action@v2.6.1 - - - name: Run chart-testing (list-changed) - id: list-changed - run: | - changed=$(ct list-changed --config ct.yaml) - if [[ -n "$changed" ]]; then - echo "changed=true" >> $GITHUB_OUTPUT - fi - - - name: Run chart-testing (lint) - run: ct lint --config ct.yaml - - - name: Create kind cluster - uses: helm/kind-action@v1.9.0 - if: steps.list-changed.outputs.changed == 'true' - with: - config: buildscripts/kind_config.yaml - - - name: Run chart-testing (install) - run: ct install --config ct.yaml diff --git a/.github/workflows/pull_request.yml b/.github/workflows/pull_request.yml index 47e18d80..9d39acc2 100644 --- a/.github/workflows/pull_request.yml +++ b/.github/workflows/pull_request.yml @@ -3,16 +3,16 @@ name: Pull Request CI on: pull_request: branches: - - 'develop' - - 'release/**' + - develop + - "release/**" paths-ignore: - - '*.md' - - 'BUILDMETA' - - 'changelogs/**' - - 'docs/**' - - 'design/**' - - 'LICENSE' - - 'MAINTAINERS' + - "*.md" + - "BUILDMETA" + - "changelogs/**" + - "docs/**" + - "design/**" + - "LICENSE" + - "MAINTAINERS" jobs: lint: @@ -29,12 +29,6 @@ jobs: go-version: 1.19.9 cache: false - - name: Format test - run: make format - - - name: bootstrap - run: make bootstrap - - name: Lint Check uses: golangci/golangci-lint-action@v4 with: @@ -46,19 +40,19 @@ jobs: with: github_token: ${{ secrets.github_token }} reporter: github-pr-review - path: '.' - pattern: '*.sh' + path: "." + pattern: "*.sh" - uses: cachix/install-nix-action@v22 - uses: rrbutani/use-nix-shell-action@v1.1.0 with: file: shell.nix - # - name: Check if the chart follows a valid semver version - # run: | - # branch_name="${{ github.event.pull_request.base.ref }}" - # ./scripts/validate-chart-version.sh --branch $branch_name - + - name: Check if the chart follows a valid semver version + run: | + branch_name="${{ github.event.pull_request.base.ref }}" + ./scripts/validate-chart-version.sh --branch $branch_name + - name: Run chart-testing lint run: | ct lint --config ct.yaml @@ -79,7 +73,7 @@ jobs: run: make test - name: Upload Coverage Report - uses: codecov/codecov-action@v4 + uses: codecov/codecov-action@v4 with: token: ${{ secrets.CODECOV_TOKEN }} file: ./coverage.txt @@ -87,7 +81,7 @@ jobs: flags: unittests bdd-tests: - needs: ['unit-tests'] + needs: ["unit-tests"] runs-on: ubuntu-latest strategy: fail-fast: true @@ -96,11 +90,6 @@ jobs: steps: - name: Checkout uses: actions/checkout@v4 - - - uses: cachix/install-nix-action@v22 - - uses: rrbutani/use-nix-shell-action@v1.1.0 - with: - file: shell.nix - name: Set up Go 1.19 uses: actions/setup-go@v5 @@ -119,17 +108,18 @@ jobs: driver: none kubernetes-version: ${{ matrix.kubernetes }} cni: calico - start-args: '--install-addons=false' + start-args: "--install-addons=false" - name: Setting environment variables run: | echo "KUBECONFIG=$HOME/.kube/config" >> $GITHUB_ENV - echo "OPENEBS_NAMESPACE=openebs" >> $GITHUB_ENV - name: bootstrap run: make bootstrap - name: Running tests + env: + OPENEBS_NAMESPACE: "openebs" run: ./ci/ci-test.sh - name: Upload Coverage Report @@ -142,7 +132,7 @@ jobs: csi-driver: runs-on: ubuntu-latest - needs: ['lint', 'unit-tests', 'bdd-tests'] + needs: ["lint", "unit-tests", "bdd-tests"] steps: - name: Checkout uses: actions/checkout@v4 diff --git a/.github/workflows/release-charts.yml b/.github/workflows/release-charts.yml deleted file mode 100644 index 29b90c41..00000000 --- a/.github/workflows/release-charts.yml +++ /dev/null @@ -1,34 +0,0 @@ -name: Release Charts - -on: - push: - paths: - - 'deploy/helm/**' - branches: - - develop - -jobs: - release: - runs-on: ubuntu-latest - steps: - - name: Checkout - uses: actions/checkout@v4 - with: - fetch-depth: 0 - - - name: Configure Git - run: | - git config user.name "$GITHUB_ACTOR" - git config user.email "$GITHUB_ACTOR@users.noreply.github.com" - - - name: Install Helm - uses: azure/setup-helm@v4 - with: - version: v3.14.3 - - - name: Run chart-releaser - uses: helm/chart-releaser-action@v1.6.0 - env: - CR_TOKEN: "${{ secrets.CR_TOKEN }}" - with: - charts_dir: deploy/helm diff --git a/ci/ci-test.sh b/ci/ci-test.sh index 5b80a065..0d884afd 100755 --- a/ci/ci-test.sh +++ b/ci/ci-test.sh @@ -15,6 +15,7 @@ fi # foreign systemid for the testing environment. FOREIGN_LVM_SYSTEMID="openebs-ci-test-system" FOREIGN_LVM_CONFIG="global{system_id_source=lvmlocal}local{system_id=${FOREIGN_LVM_SYSTEMID}}" +CRDS_TO_DELETE_ON_CLEANUP="lvmnodes.local.openebs.io lvmsnapshots.local.openebs.io lvmvolumes.local.openebs.io volumesnapshotclasses.snapshot.storage.k8s.io volumesnapshotcontents.snapshot.storage.k8s.io volumesnapshots.snapshot.storage.k8s.io" # Clean up generated resources for successive tests. cleanup_loopdev() { @@ -41,10 +42,11 @@ cleanup() { cleanup_foreign_lvmvg - kubectl delete pvc -n openebs lvmpv-pvc + kubectl delete pvc -n "$OPENEBS_NAMESPACE" lvmpv-pvc kubectl delete -f "${SNAP_CLASS}" helm uninstall lvm-localpv -n "$OPENEBS_NAMESPACE" || true + kubectl delete crds "$CRDS_TO_DELETE_ON_CLEANUP" # always return true return 0 } @@ -70,7 +72,6 @@ sudo sed -i '/^[^#]*thin_pool_autoextend_percent/ s/= .*/= 20/' /etc/lvm/lvm.con # Prepare env for running BDD tests # Minikube is already running - helm install lvm-localpv ./deploy/helm/charts -n "$OPENEBS_NAMESPACE" --create-namespace --set lvmPlugin.pullPolicy=Never --set analytics.enabled=false kubectl apply -f "${SNAP_CLASS}" @@ -160,10 +161,10 @@ echo "get sc details" kubectl get sc --all-namespaces -oyaml echo "get lvm volume details" -kubectl get lvmvolumes.local.openebs.io -n openebs -oyaml +kubectl get lvmvolumes.local.openebs.io -n "$OPENEBS_NAMESPACE" -oyaml echo "get lvm snapshot details" -kubectl get lvmsnapshots.local.openebs.io -n openebs -oyaml +kubectl get lvmsnapshots.local.openebs.io -n "$OPENEBS_NAMESPACE" -oyaml exit 1 fi From bd0e6a36481bfcd1328fcf2f9d133c7fc1e63696 Mon Sep 17 00:00:00 2001 From: Diwakar Sharma Date: Fri, 27 Sep 2024 09:56:24 +0000 Subject: [PATCH 3/5] ci: add branch preparation and release CI changes Signed-off-by: Diwakar Sharma --- .github/workflows/branch_preparation.yml | 121 ++++++++++++ .github/workflows/release.yml | 153 ++++++++++++--- scripts/test-update-chart-version.sh | 96 ++++++++++ scripts/update-chart-version.sh | 227 +++++++++++++++++++++++ 4 files changed, 576 insertions(+), 21 deletions(-) create mode 100644 .github/workflows/branch_preparation.yml create mode 100755 scripts/test-update-chart-version.sh create mode 100755 scripts/update-chart-version.sh diff --git a/.github/workflows/branch_preparation.yml b/.github/workflows/branch_preparation.yml new file mode 100644 index 00000000..10a59ff2 --- /dev/null +++ b/.github/workflows/branch_preparation.yml @@ -0,0 +1,121 @@ +name: Branch Preparation + +on: + push: + branches: + - 'release/**' + tags: + - 'v[0-9]+.[0-9]+.[0-9]+**' + +jobs: + update_release_branch_after_release: + runs-on: ubuntu-latest + if: ${{ github.ref_type == 'tag' }} + steps: + - uses: actions/checkout@v4 + + - uses: cachix/install-nix-action@v22 + - name: Pre-populate nix-shell + run: | + export NIX_PATH=nixpkgs=$(jq '.nixpkgs.url' nix/sources.json -r) + echo "NIX_PATH=$NIX_PATH" >> $GITHUB_ENV + nix-shell --pure --run "echo" ./shell.nix + - name: Test the chart version updater script + run: | + nix-shell --pure --run "./scripts/test-update-chart-version.sh" ./shell.nix + - name: Modify the chart version based on the tag + run: | + tag=${{ github.ref_name }} + echo "BASE=$(nix-shell --pure --run "./scripts/update-chart-version.sh --tag $tag" ./shell.nix)" >> $GITHUB_ENV + - name: Create Pull Request to release + if: ${{ env.BASE }} + id: cpr + uses: peter-evans/create-pull-request@v5 + with: + base: ${{ env.BASE }} + commit-message: "chore(ci): update helm chart versions and/or git submodules" + committer: GitHub + author: ${{ github.actor }} <${{ github.actor }}@users.noreply.github.com> + title: "Prepare release branch after release ${{ github.ref_name }}" + labels: | + update-release-branch + automated-pr + draft: false + signoff: true + branch: "create-pull-request/patch-${{ env.BASE }}" + token: ${{ secrets.GITHUB_TOKEN }} + + update_develop_branch_on_release_branch_creation: + runs-on: ubuntu-latest + if: ${{ github.ref_type == 'branch' }} + steps: + - uses: actions/checkout@v4 + with: + fetch-depth: 0 + - run: | + git checkout develop + - uses: cachix/install-nix-action@v22 + - name: Pre-populate nix-shell + run: | + export NIX_PATH=nixpkgs=$(jq '.nixpkgs.url' nix/sources.json -r) + echo "NIX_PATH=$NIX_PATH" >> $GITHUB_ENV + nix-shell --pure --run "echo" ./shell.nix + - name: Test the chart version updater script + run: | + nix-shell --pure --run "./scripts/test-update-chart-version.sh" ./shell.nix + - name: Modify the chart version based on the branch name for develop + run: | + branch_name=${{ github.ref_name }} + nix-shell --pure --run "./scripts/update-chart-version.sh --branch $branch_name --type develop" ./shell.nix + - name: Create Pull Request to develop + id: cpr + uses: peter-evans/create-pull-request@v5 + with: + base: develop + commit-message: "chore(ci): update helm chart versions and/or git submodules" + committer: GitHub + author: ${{ github.actor }} <${{ github.actor }}@users.noreply.github.com> + title: "Prepare develop branch on ${{ github.ref_name }} creation" + labels: | + update-develop-branch + automated-pr + draft: false + signoff: true + branch: "create-pull-request/patch-develop" + token: ${{ secrets.GITHUB_TOKEN }} + + prepare_release_branch_on_creation: + runs-on: ubuntu-latest + if: ${{ github.ref_type == 'branch' }} + steps: + - uses: actions/checkout@v4 + + - uses: cachix/install-nix-action@v22 + - name: Pre-populate nix-shell + run: | + export NIX_PATH=nixpkgs=$(jq '.nixpkgs.url' nix/sources.json -r) + echo "NIX_PATH=$NIX_PATH" >> $GITHUB_ENV + nix-shell --pure --run "echo" ./shell.nix + - name: Test the chart version updater script + run: | + nix-shell --pure --run "./scripts/test-update-chart-version.sh" ./shell.nix + - name: Modify the chart version based on the branch name for release + run: | + branch_name=${{ github.ref_name }} + nix-shell --pure --run "./scripts/update-chart-version.sh --branch $branch_name --type release" ./shell.nix + - name: Create Pull Request to release + id: cpr + uses: peter-evans/create-pull-request@v5 + with: + base: ${{ github.ref_name }} + commit-message: "chore(ci): update helm chart versions and/or git submodules" + committer: GitHub + author: ${{ github.actor }} <${{ github.actor }}@users.noreply.github.com> + title: "Prepare ${{ github.ref_name }} branch" + labels: | + prepare-release-branch + automated-pr + draft: false + signoff: true + branch: "create-pull-request/patch-${{ github.ref_name }}" + token: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 64bfc281..cc48c033 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -1,17 +1,4 @@ -# Copyright 2020 The OpenEBS Authors. All rights reserved. -# -# 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. -name: release +name: Release Images and Charts on: release: @@ -19,13 +6,113 @@ on: - 'created' jobs: + lint: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v4 + with: + fetch-depth: 0 + + - uses: cachix/install-nix-action@v22 + - uses: rrbutani/use-nix-shell-action@v1.1.0 + with: + file: shell.nix + + - name: Check if the chart is publishable + run: | + TAG=${{ github.event.release.tag_name }} + ./scripts/update-chart-version.sh --tag $TAG --publish-release + - name: Run chart-testing lint + run: | + ct lint --config ct.yaml + + unit-tests: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: Unit test + run: make test + + - name: Upload Coverage Report + uses: codecov/codecov-action@v4 + with: + token: ${{ secrets.CODECOV_TOKEN }} + file: ./coverage.txt + name: coverage-$(date +%s) + flags: unittests + + bdd-tests: + runs-on: ubuntu-latest + needs: ["unit-tests"] + strategy: + fail-fast: true + matrix: + kubernetes: [v1.27.3] + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: Set up Go 1.19 + uses: actions/setup-go@v4 + with: + go-version: 1.19.9 + cache: false + + - name: Build images locally + run: make lvm-driver-image || exit 1; + + - name: Setup Minikube-Kubernetes + uses: medyagh/setup-minikube@latest + with: + cache: false + minikube-version: 1.31.1 + driver: none + kubernetes-version: ${{ matrix.kubernetes }} + cni: calico + start-args: "--install-addons=false" + + - name: Setting environment variables + run: | + echo "KUBECONFIG=$HOME/.kube/config" >> $GITHUB_ENV + echo "OPENEBS_NAMESPACE=openebs" >> $GITHUB_ENV + + - name: bootstrap + run: make bootstrap + + - name: Running tests + run: | + make ci + + - name: Upload CI Test Coverage Report + uses: codecov/codecov-action@v4 + with: + token: ${{ secrets.CODECOV_TOKEN }} + file: ./tests/bdd_coverage.txt + name: coverage-bdd_coverage-$(date +%s) + flags: bddtests + csi-driver: if: contains(github.ref, 'tags/v') runs-on: ubuntu-latest + needs: ["lint", "bdd-tests"] steps: - name: Checkout uses: actions/checkout@v4 + - uses: cachix/install-nix-action@v22 + - name: Pre-populate nix-shell + run: | + export NIX_PATH=nixpkgs=$(jq '.nixpkgs.url' nix/sources.json -r) + echo "NIX_PATH=$NIX_PATH" >> $GITHUB_ENV + nix-shell --pure --run "echo" ./shell.nix + - name: Check if the chart is publishable + run: | + TAG=${{ github.event.release.tag_name }} + nix-shell --pure --run "./scripts/update-chart-version.sh --tag $TAG --publish-release" ./shell.nix + - name: Set Image Org # sets the default IMAGE_ORG to openebs run: | @@ -37,11 +124,11 @@ jobs: run: | echo "DATE=$(date -u +'%Y-%m-%dT%H:%M:%S%Z')" >> $GITHUB_OUTPUT - - name: Set Tag + - name: Set IMAGE_TAG and BRANCH run: | - TAG="${GITHUB_REF#refs/*/v}" - echo "TAG=${TAG}" >> $GITHUB_ENV - echo "RELEASE_TAG=${TAG}" >> $GITHUB_ENV + BRANCH=${{ github.ref_name }} + echo "BRANCH=$BRANCH" >> $GITHUB_ENV + echo "IMAGE_TAG=$(awk -F': ' '/^version:/ {print $2}' deploy/helm/charts/Chart.yaml)" >> $GITHUB_ENV - name: Docker meta id: docker_meta @@ -54,11 +141,12 @@ jobs: ghcr.io/${{ env.IMAGE_ORG }}/lvm-driver tags: | type=semver,pattern={{version}} + type=raw,value=${{ env.IMAGE_TAG }} - name: Print Tag info run: | + echo "BRANCH: ${{ env.BRANCH }}" echo "${{ steps.docker_meta.outputs.tags }}" - echo "RELEASE TAG: ${RELEASE_TAG}" - name: Set up QEMU uses: docker/setup-qemu-action@v3 @@ -72,7 +160,7 @@ jobs: version: v0.13.1 - name: Login to Docker Hub - uses: docker/login-action@v3 + uses: docker/login-action@v3 with: username: ${{ secrets.DOCKERHUB_USERNAME }} password: ${{ secrets.DOCKERHUB_TOKEN }} @@ -104,4 +192,27 @@ jobs: DBUILD_DATE=${{ steps.date.outputs.DATE }} DBUILD_REPO_URL=https://github.com/openebs/lvm-localpv DBUILD_SITE_URL=https://openebs.io - RELEASE_TAG=${{ env.RELEASE_TAG }} + BRANCH=${{ env.BRANCH }} + + release-chart: + runs-on: ubuntu-latest + needs: ["csi-driver"] + steps: + - uses: actions/checkout@v4 + + - uses: cachix/install-nix-action@v22 + - name: Pre-populate nix-shell + run: | + export NIX_PATH=nixpkgs=$(jq '.nixpkgs.url' nix/sources.json -r) + echo "NIX_PATH=$NIX_PATH" >> $GITHUB_ENV + nix-shell --pure --run "echo" ./shell.nix + - name: Check if the chart is publishable + run: | + TAG=${{ github.event.release.tag_name }} + nix-shell --pure --run "./scripts/update-chart-version.sh --tag $TAG --publish-release" ./shell.nix + + - name: Publish lvm localpv develop or prerelease helm chart + uses: stefanprodan/helm-gh-pages@master + with: + token: ${{ secrets.GITHUB_TOKEN }} + charts_dir: ./deploy/helm diff --git a/scripts/test-update-chart-version.sh b/scripts/test-update-chart-version.sh new file mode 100755 index 00000000..db15c732 --- /dev/null +++ b/scripts/test-update-chart-version.sh @@ -0,0 +1,96 @@ +#!/usr/bin/env bash + +set -euo pipefail + +# Path to the script to be tested +SCRIPT_DIR="$(dirname "$(realpath "${BASH_SOURCE[0]:-"$0"}")")" +SCRIPT_TO_TEST="$SCRIPT_DIR/update-chart-version.sh" +FAILED= + +# Function to run a test case +run_test() { + local test_name=$1 + local expected_output=$2 + shift 2 + local output + + echo "Running: $test_name" + set +e + output=$("$SCRIPT_TO_TEST" "$@" 2>&1) + set -e + if [ "$output" == "$expected_output" ]; then + echo "PASS" + else + echo "FAIL" + echo "Expected: $expected_output" + echo "Got: $output" + FAILED=1 + fi + echo "----------------------------------------" +} + +# Define test cases +run_test "Test 1: On branch creation, version to be reflected on release branch" \ + "1.2.0-prerelease" \ + --branch "release/1.2" --type "release" --dry-run --chart-version "1.2.0-develop" + +run_test "Test 2: On branch creation, version to be reflected on develop branch" \ + "1.3.0-develop" \ + --branch "release/1.2" --type "develop" --dry-run --chart-version "1.2.0-prerelease" + +run_test "Test 3: After branch creation on push, version to be reflected on release branch" \ + "" \ + --branch "release/1.2" --type "release" --dry-run --chart-version "1.2.0-prerelease" + +run_test "Test 4: After branch creation on push, version to be reflected on develop branch" \ + "" \ + --branch "release/1.2" --type "develop" --dry-run --chart-version "1.3.0-develop" + +run_test "Test 5: On branch creation, version to be reflected on release branch, x.y is newer" \ + "1.5.0-prerelease" \ + --branch "release/1.5" --type "release" --dry-run --chart-version "1.2.0-develop" + +run_test "Test 6: On branch creation, version to be reflected on develop branch, x.y is newer" \ + "1.6.0-develop" \ + --branch "release/1.5" --type "develop" --dry-run --chart-version "1.2.0-develop" + +run_test "Test 7: On branch creation, version to be reflected on release branch, x.y is older" \ + "1.2.0-prerelease" \ + --branch "release/1.2" --type "release" --dry-run --chart-version "1.5.0-develop" + +run_test "Test 8: On branch creation, version to be reflected on develop branch, x.y is older" \ + "" \ + --branch "release/1.2" --type "develop" --dry-run --chart-version "1.5.0-develop" + +run_test "Test 9: On tag creation, version to be reflected on release/x.y branch" \ + "1.2.1-prerelease" \ + --tag "v1.2.0" --dry-run --chart-version "1.2.0-prerelease" + +run_test "Test 10: On tag creation, version to be reflected on release/x.y branch, tag is in future" \ + "For release/x.y branch the current chart version(1.2.0-prerelease)'s X.Y must exactly match X.Y from tag (1.5.0)" \ + --tag "v1.5.0" --dry-run --chart-version "1.2.0-prerelease" + +run_test "Test 11: On tag creation, version to be reflected on release/x.y branch, tag is in past" \ + "For release/x.y branch the current chart version(1.2.0-prerelease)'s X.Y must exactly match X.Y from tag (1.0.0)" \ + --tag "v1.0.0" --dry-run --chart-version "1.2.0-prerelease" + +run_test "Test 12: On tag creation, version to be reflected on release/x.y branch, the current chart version is not prerelease" \ + "Chart version(1.2.0-develop) should be a prerelease format to proceed for tag creation flow" \ + --tag "v1.0.0" --dry-run --chart-version "1.2.0-develop" + +run_test "Test 13: rc tag, with chart type prerelease" \ + "" \ + --tag "v1.2.3-rc" --dry-run --chart-version "1.2.3-prerelease" + +run_test "Test 14: Actual release tag to modify the chart versions" \ + "1.2.3" \ + --tag "v1.2.3" --dry-run --chart-version "1.2.3-prerelease" --publish-release + +run_test "Test 15: Actual release rc tag to modify the chart versions" \ + "1.2.3-rc" \ + --tag "v1.2.3-rc" --dry-run --chart-version "1.2.3-prerelease" --publish-release + +if [ -n "$FAILED" ]; then + echo "Some of the tests have failed..." + exit 1 +fi diff --git a/scripts/update-chart-version.sh b/scripts/update-chart-version.sh new file mode 100755 index 00000000..2e6fa163 --- /dev/null +++ b/scripts/update-chart-version.sh @@ -0,0 +1,227 @@ +#!/usr/bin/env bash + +# Write output to error output stream. +echo_stderr() { + echo -e "${1}" >&2 +} + +die() +{ + local _return="${2:-1}" + echo_stderr "$1" + exit "${_return}" +} + +help() { + cat < Name of the target branch. + --tag Release tag. + --type Which branch to modify. + --chart-version Version of the current chart. + --publish-release To modify the charts for a release. + +Examples: + $(basename "$0") --branch release/x.y +EOF +} + +check_tag_is_valid() { + local tag="$1" + local current_chart_version="$2" + + if [[ "$(semver validate $tag)" != "valid" ]]; then + die "Tag is not a valid sevmer complaint version" + fi + + if [[ $current_chart_version != *"-prerelease" ]]; then + die "Chart version($current_chart_version) should be a prerelease format to proceed for tag creation flow" + fi + + allowed_diff=("" "patch" "prerelease") + diff="$(semver diff "$tag" "$current_chart_version")" + if ! [[ " ${allowed_diff[*]} " =~ " $diff " ]]; then + die "For release/x.y branch the current chart version($current_chart_version)'s X.Y must exactly match X.Y from tag ($tag)" + fi +} + +# yq-go eats up blank lines +# this function gets around that using diff with --ignore-blank-lines +yq_ibl() +{ + set +e + diff_out=$(diff -B <(yq '.' "$2") <(yq "$1" "$2")) + error=$? + if [ "$error" != "0" ] && [ "$error" != "1" ]; then + exit "$error" + fi + if [ -n "$diff_out" ]; then + echo "$diff_out" | patch --quiet --no-backup-if-mismatch "$2" - + fi + set -euo pipefail +} + +# RULES: This would run only when changes are pushed to a release/x.y branch. +# 1. Branch name can only be of format release/x.y +# 2. If current chart version of type develop(on branch creation), +# then version generated is of format x.y.0-prerelease if type is "release" +# 3. If current chart version of type develop(on branch creation), +# then version generated is of format x.y+1.0-develop if type is develop. +# 4. If current chart version of type prerelease(after branch creation), +# then for type release it's a no op as it's already a prerelease format. +# 5. If current chart version of type prerelease(after branch creation), +# then for type develop it's a no op as the version to be would be same as it is currently. +# 6. Let's say for somereason someone tries to create a release/x.y branch from develop but chart version +# on develop is newer than x.y, example, release/2.2 and develop chart version is 2.5.0-develop. +# In that case for type release, the version would be 2.2.0-prerelease and for type develop it would be +# a no op as develop is already newer. +create_version_from_release_branch() { + if [[ "$BRANCH_NAME" =~ ^(release/[0-9]+\.[0-9]+)$ ]]; then + local EXTRACTED_VERSION=$(echo "$BRANCH_NAME" | grep -oP '(?<=release/)\d+\.\d+') + if [[ "$TYPE" == "release" ]]; then + if [[ "$CURRENT_CHART_VERSION" == *"-develop" ]]; then + VERSION="${EXTRACTED_VERSION}.0-prerelease" + elif [[ "$CURRENT_CHART_VERSION" == *"-prerelease" ]]; then + NO_OP=1 + else + die "Current chart version doesn't match a develop or prerel format" + fi + elif [[ "$TYPE" == "develop" ]]; then + EXPECTED_VERSION="$(semver bump minor "$EXTRACTED_VERSION.0")-develop" + if [[ "$(semver compare $EXPECTED_VERSION $CURRENT_CHART_VERSION)" == 1 ]]; then + VERSION=$EXPECTED_VERSION + else + NO_OP=1 + fi + fi + else + die "Branch name($BRANCH_NAME) is not of format release/x.y" + fi +} + +# RULES: This would run only when tag is created. +# 1. Tag should be of format vX.Y.Z. +# 2. If tag is of format vX.Y.Z-rc, it would be a no op for the workflow. +# 3. The tag can only be vX.Y.Z if the current chart version is X.Y*-prerelease. Ex, v2.6.1 for v2.6.*-prerelease +# 4. For release branches if all the above holds then it bumps the patch version. Ex, v2.6.1 --> 2.6.2-prerelease +create_version_from_tag() { + if [[ "$TAG" =~ ^(v[0-9]+\.[0-9]+\.[0-9]+)$ ]]; then + local EXTRACTED_VERSION=$(echo "$TAG" | grep -oP '(?<=v)\d+\.\d+.\d+') + check_tag_is_valid "$EXTRACTED_VERSION" "$CURRENT_CHART_VERSION" + if [[ -z $PUBLISH_RELEASE ]]; then + VERSION="$(semver bump patch $EXTRACTED_VERSION)-prerelease" + if [[ -z $DRY_RUN ]]; then + echo "release/$(echo $EXTRACTED_VERSION | cut -d'.' -f1,2)" + fi + else + VERSION="$EXTRACTED_VERSION" + fi + elif [[ "$TAG" == *"-rc" ]]; then + if [[ -z $PUBLISH_RELEASE ]]; then + NO_OP=1 + else + local EXTRACTED_VERSION=$(echo "$TAG" | grep -oP '(?<=v)\d+\.\d+\.\d+(-\w+)?') + check_tag_is_valid "$EXTRACTED_VERSION" "$CURRENT_CHART_VERSION" + VERSION="$EXTRACTED_VERSION" + fi + else + die "Invalid tag format. Expected 'vX.Y.Z'" + fi +} + +update_chart_yaml() { + local VERSION=$1 + local APP_VERSION=$2 + + yq_ibl ".version = \"$VERSION\" | .appVersion = \"$APP_VERSION\"" "$CHART_YAML" + yq_ibl ".version = \"$VERSION\"" "$CRD_CHART_YAML" + yq_ibl "(.dependencies[] | select(.name == \"crds\") | .version) = \"$VERSION\"" "$CHART_YAML" + yq_ibl ".lvmPlugin.image.tag = \"$VERSION\"" "$VALUES_YAML" +} + +set -euo pipefail + +DRY_RUN= +NO_OP= +CURRENT_CHART_VERSION= +PUBLISH_RELEASE= +# Set the path to the Chart.yaml file +SCRIPT_DIR="$(dirname "$(realpath "${BASH_SOURCE[0]:-"$0"}")")" +ROOT_DIR="$SCRIPT_DIR/.." +CHART_DIR="$ROOT_DIR/deploy/helm/charts" +CHART_YAML="$CHART_DIR/Chart.yaml" +VALUES_YAML="$CHART_DIR/values.yaml" +CRD_CHART_NAME="crds" +CRD_CHART_YAML="$CHART_DIR/charts/$CRD_CHART_NAME/Chart.yaml" +# Final computed version to be set in this. +VERSION="" + +# Parse arguments +while [ "$#" -gt 0 ]; do + case $1 in + -d|--dry-run) + DRY_RUN=1 + shift + ;; + -h|--help) + help + exit 0 + ;; + -b|--branch) + shift + BRANCH_NAME=$1 + shift + ;; + -t|--tag) + shift + TAG=$1 + shift + ;; + --type) + shift + TYPE=$1 + shift + ;; + --chart-version) + shift + CURRENT_CHART_VERSION=$1 + shift + ;; + --publish-release) + PUBLISH_RELEASE=1 + shift + ;; + *) + help + die "Unknown option: $1" + ;; + esac +done + +if [[ -z $CURRENT_CHART_VERSION ]]; then + CURRENT_CHART_VERSION=$(yq e '.version' "$CHART_YAML") +fi + +if [[ -n "${BRANCH_NAME-}" && -n "${TYPE-}" ]]; then + create_version_from_release_branch +elif [[ -n "${TAG-}" ]]; then + create_version_from_tag +else + help + die "Either --branch and --type or --tag and must be specified." +fi + +if [[ -z $NO_OP ]]; then + if [[ -n $VERSION ]]; then + if [[ -z $DRY_RUN ]];then + update_chart_yaml "$VERSION" "$VERSION" + else + echo "$VERSION" + fi + else + die "Failed to update the chart versions" + fi +fi \ No newline at end of file From 46d06a3ebd8486f0209f3e17b2244dd3156acc86 Mon Sep 17 00:00:00 2001 From: Abhinandan Purkait Date: Fri, 8 Nov 2024 10:46:49 +0530 Subject: [PATCH 4/5] ci: add Fossa CLI workflow (#346) Signed-off-by: Abhinandan Purkait --- .github/workflows/fossa.yml | 17 +++++++++++++++++ README.md | 14 ++++++-------- 2 files changed, 23 insertions(+), 8 deletions(-) create mode 100644 .github/workflows/fossa.yml diff --git a/.github/workflows/fossa.yml b/.github/workflows/fossa.yml new file mode 100644 index 00000000..84e5792b --- /dev/null +++ b/.github/workflows/fossa.yml @@ -0,0 +1,17 @@ +name: Fossa CLI +on: + push: + branches: + - 'develop' + - 'release/**' + +jobs: + fossa-scan: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + with: + submodules: recursive + - uses: fossas/fossa-action@v1.4.0 + with: + api-key: ${{ secrets.FOSSA_API_KEY }} diff --git a/README.md b/README.md index d838a4ab..219771eb 100644 --- a/README.md +++ b/README.md @@ -1,11 +1,9 @@ ## OpenEBS - LocalPV-LVM CSI Driver -[![FOSSA Status](https://app.fossa.io/api/projects/git%2Bgithub.com%2Fopenebs%2Flvm-localpv.svg?type=shield)](https://app.fossa.io/projects/git%2Bgithub.com%2Fopenebs%2Flvm-localpv?ref=badge_shield) -[![CII Best Practices](https://bestpractices.coreinfrastructure.org/projects/3523/badge)](https://bestpractices.coreinfrastructure.org/en/projects/4548) -[![Slack](https://img.shields.io/badge/chat!!!-slack-ff1493.svg?style=flat-square)](https://kubernetes.slack.com/messages/openebs) -[![Community Meetings](https://img.shields.io/badge/Community-Meetings-blue)](https://hackmd.io/yJb407JWRyiwLU-XDndOLA?view) +[![FOSSA Status](https://app.fossa.com/api/projects/custom%2B162%2Fgithub.com%2Fopenebs%2Flvm-localpv.svg?type=shield&issueType=license)](https://app.fossa.com/projects/custom%2B162%2Fgithub.com%2Fopenebs%2Flvm-localpv?ref=badge_shield&issueType=license) +[![OpenSSF Best Practices](https://www.bestpractices.dev/projects/4548/badge)](https://www.bestpractices.dev/projects/4548) +[![Slack](https://img.shields.io/badge/chat-slack-ff1493.svg?style=flat-square)](https://kubernetes.slack.com/messages/openebs) +[![Community Meetings](https://img.shields.io/badge/Community-Meetings-blue)](https://us05web.zoom.us/j/87535654586?pwd=CigbXigJPn38USc6Vuzt7qSVFoO79X.1) [![Go Report](https://goreportcard.com/badge/github.com/openebs/lvm-localpv)](https://goreportcard.com/report/github.com/openebs/lvm-localpv) -[![FOSSA Status](https://app.fossa.com/api/projects/git%2Bgithub.com%2Fopenebs%2Flvm-localpv.svg?type=shield)](https://app.fossa.com/projects/git%2Bgithub.com%2Fopenebs%2Flvm-localpv?ref=badge_shield) - | [![Linux LVM2](https://github.com/openebs/website/blob/main/website/public/images/png/LVM_logo_1.png "Linux LVM2")](https://github.com/openebs/website/blob/main/website/public/images/png/LVM_logo_1.png) | The OpenEBS LocalPV-LVM Data-Engine is a mature and well deployed production grade CSI driver for dynamically provisioning Node Local Volumes into a K8s cluster utilizing the LINUX LVM2 Data / storage Mgmt stack as the storage backend. It integrates LVM2 into the OpenEBS platform and exposes many LVM2 services and capabilities. | | :--- | :--- | @@ -259,5 +257,5 @@ Features - Resize of volumes with snapshot is not supported -## License -[![FOSSA Status](https://app.fossa.com/api/projects/git%2Bgithub.com%2Fopenebs%2Flvm-localpv.svg?type=large)](https://app.fossa.com/projects/git%2Bgithub.com%2Fopenebs%2Flvm-localpv?ref=badge_large) +## License Compliance +[![FOSSA Status](https://app.fossa.com/api/projects/custom%2B162%2Fgithub.com%2Fopenebs%2Flvm-localpv.svg?type=large&issueType=license)](https://app.fossa.com/projects/custom%2B162%2Fgithub.com%2Fopenebs%2Flvm-localpv?ref=badge_large&issueType=license) From a49ab33543f6cf087f6070a9e03cf55b6856b759 Mon Sep 17 00:00:00 2001 From: Diwakar Sharma Date: Thu, 5 Dec 2024 12:23:36 +0000 Subject: [PATCH 5/5] chore: fix README mention about PV and VG creation Signed-off-by: Diwakar Sharma --- README.md | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index 219771eb..1dbbecb2 100644 --- a/README.md +++ b/README.md @@ -53,9 +53,8 @@ The orignal v1.0 dev roadmap [is here ](https://github.com/orgs/openebs/projects
### Supported System @@ -81,9 +80,8 @@ sudo losetup -f /tmp/disk.img --show ``` > [!NOTE] -> - This is the old maual config process
-> - LocalPV-LVM will num dynamically provision the VG fro you
-> - The PV, VG and LV names will be dynamically provisioned by OpenEBS LocalPV-LVM as K8s unique entities (for safety, you cannot provide your own PV, VG or LV names) +> - LocalPV-LVM will not provision the VG for the user
+> - The required Physical Volumes(PV) and Volume Group(VG) names will need to be created and present beforehand. Create the Volume group on all the nodes, which will be used by the LVM2 Driver for provisioning the volumes