Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: change zfs-controller to a deployment from statefulset #513

Merged
merged 9 commits into from
Mar 22, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
56 changes: 34 additions & 22 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v4

- name: Shellcheck
uses: reviewdog/action-shellcheck@v1
Expand All @@ -48,13 +48,18 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v4

- name: Unit test
run: make test

- name: Upload Coverage Report
uses: codecov/codecov-action@v1
uses: codecov/codecov-action@v4
with:
token: ${{ secrets.CODECOV_TOKEN }}
file: ./coverage.txt
name: coverage-$(date +%s)
flags: unittests

bdd-test:
needs: ['unit-test']
Expand All @@ -65,7 +70,7 @@ jobs:
kubernetes: [v1.27.3]
steps:
- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v4

- name: Installation
run: |
Expand Down Expand Up @@ -106,12 +111,20 @@ jobs:
make ci
make sanity

- 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

ansible:
runs-on: ubuntu-latest
needs: ['lint', 'unit-test', 'bdd-test']
steps:
- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v4

- name: Set Image Org
# sets the default IMAGE_ORG to openebs
Expand All @@ -120,13 +133,13 @@ jobs:
echo "IMAGE_ORG=${IMAGE_ORG}" >> $GITHUB_ENV

- name: Login to Docker Hub
uses: docker/login-action@v2
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@v2
uses: docker/build-push-action@v5
with:
file: ./e2e-tests/Dockerfile
push: true
Expand All @@ -140,7 +153,7 @@ jobs:
needs: ['lint', 'bdd-test']
steps:
- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v4

- name: Set Image Org
# sets the default IMAGE_ORG to openebs
Expand All @@ -161,60 +174,59 @@ jobs:
- name: Set Build Date
id: date
run: |
echo "::set-output name=DATE::$(date -u +'%Y-%m-%dT%H:%M:%S%Z')"
echo "DATE=$(date -u +'%Y-%m-%dT%H:%M:%S%Z')" >> $GITHUB_OUTPUT

- name: Docker meta
id: docker_meta
uses: crazy-max/ghaction-docker-meta@v1
uses: docker/metadata-action@v4
with:
# add each registry to which the image needs to be pushed here
images: |
${{ env.IMAGE_ORG }}/zfs-driver
quay.io/${{ env.IMAGE_ORG }}/zfs-driver
ghcr.io/${{ env.IMAGE_ORG }}/zfs-driver
tag-latest: false
tag-custom-only: true
tag-custom: |
${{ env.TAG }}
tags: |
type=raw,value=latest,enable=false
type=raw,value=${{ env.TAG }}

- name: Print Tag info
run: |
echo "BRANCH: ${BRANCH}"
echo "${{ steps.docker_meta.outputs.tags }}"

- name: Set up QEMU
uses: docker/setup-qemu-action@v1
uses: docker/setup-qemu-action@v3
with:
platforms: all

- name: Set up Docker Buildx
id: buildx
uses: docker/setup-buildx-action@v1
uses: docker/setup-buildx-action@v3
with:
version: v0.4.2

version: v0.13.1
- name: Login to Docker Hub
uses: docker/login-action@v2
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}

- name: Login to Quay
uses: docker/login-action@v2
uses: docker/login-action@v3
with:
registry: quay.io
username: ${{ secrets.QUAY_USERNAME }}
password: ${{ secrets.QUAY_TOKEN }}

- name: Login to GHCR
uses: docker/login-action@v2
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Build & Push Image
uses: docker/build-push-action@v2
uses: docker/build-push-action@v5
with:
context: .
file: ./buildscripts/zfs-driver/zfs-driver.Dockerfile
Expand Down
17 changes: 9 additions & 8 deletions .github/workflows/chart-lint-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,35 +17,36 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Set up Helm
uses: azure/setup-helm@v1
uses: azure/setup-helm@v4
with:
version: v3.4.0
version: v3.14.3

- uses: actions/setup-python@v2
- uses: actions/setup-python@v5
with:
python-version: 3.7
python-version: '3.10'
check-latest: true

- name: Set up chart-testing
uses: helm/chart-testing-action@v2.0.1
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 "::set-output name=changed::true"
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.2.0
uses: helm/kind-action@v1.9.0
if: steps.list-changed.outputs.changed == 'true'

- name: Run chart-testing (install)
Expand Down
32 changes: 23 additions & 9 deletions .github/workflows/pull_request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v4

- name: Shellcheck
uses: reviewdog/action-shellcheck@v1
Expand All @@ -47,13 +47,18 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v4

- name: Unit test
run: make test

- name: Upload Coverage Report
uses: codecov/codecov-action@v1
uses: codecov/codecov-action@v4
with:
token: ${{ secrets.CODECOV_TOKEN }}
file: ./coverage.txt
name: coverage-$(date +%s)
flags: unittests

bdd-test:
needs: ['unit-test']
Expand All @@ -64,7 +69,7 @@ jobs:
kubernetes: [v1.27.3]
steps:
- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v4

- name: Installation
run: |
Expand Down Expand Up @@ -105,30 +110,39 @@ jobs:
make ci
make sanity

- 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:
runs-on: ubuntu-latest
needs: ['lint', 'bdd-test']
steps:
- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v4

- name: Set up QEMU
uses: docker/setup-qemu-action@v1
uses: docker/setup-qemu-action@v3
with:
platforms: all

- name: Set up Docker Buildx
id: buildx
uses: docker/setup-buildx-action@v1
uses: docker/setup-buildx-action@v3
with:
version: v0.4.2
version: v0.13.1

- name: Build
uses: docker/build-push-action@v2
uses: docker/build-push-action@v5
with:
context: .
file: ./buildscripts/zfs-driver/zfs-driver.Dockerfile
push: false
platforms: linux/amd64, linux/arm64
tags: |
openebs/zfs-driver:ci

8 changes: 4 additions & 4 deletions .github/workflows/release-charts.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v4
with:
fetch-depth: 0

Expand All @@ -22,9 +22,9 @@ jobs:
git config user.email "$GITHUB_ACTOR@openebs.io"

- name: Install Helm
uses: azure/setup-helm@v1
uses: azure/setup-helm@v4
with:
version: v3.4.0
version: v3.14.3

- name: Copy generated CRDs
run: make helm
Expand All @@ -40,7 +40,7 @@ jobs:
fi

- name: Run chart-releaser
uses: helm/chart-releaser-action@v1.1.0
uses: helm/chart-releaser-action@v1.6.0
env:
CR_TOKEN: "${{ secrets.CR_TOKEN }}"
with:
Expand Down
Loading
Loading