-
Notifications
You must be signed in to change notification settings - Fork 18
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #18 from ThinkParQ/finalize-migration
Finalize Migration Steps
- Loading branch information
Showing
20 changed files
with
5,551 additions
and
28 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -10,6 +10,9 @@ on: | |
pull_request: | ||
branches: | ||
- "master" | ||
paths-ignore: | ||
- "**/*.md" | ||
- "**/*.txt" | ||
|
||
env: | ||
# Container image registry to publish images to: | ||
|
@@ -57,8 +60,13 @@ jobs: | |
- name: Install test dependencies | ||
run: | | ||
go install github.com/onsi/ginkgo/v2/[email protected] | ||
go install github.com/google/[email protected] | ||
timeout-minutes: 5 | ||
|
||
- name: Verify license compliance and the NOTICE file is updated | ||
run: | | ||
make test-licenses | ||
- name: Run unit tests | ||
run: | | ||
ACK_GINKGO_DEPRECATIONS=1.16.5 TESTARGS="-v -ginkgo.v" make test | ||
|
@@ -172,11 +180,11 @@ jobs: | |
echo -e "\nimages:\n - name: ${{ env.IMAGE_NAME }}\n newName: ${{ env.TEST_IMAGE_NAME }}\n newTag: ${{ github.sha }}" >> deploy/k8s/overlays/default/kustomization.yaml | ||
kubectl apply -k deploy/k8s/overlays/default | ||
# TODO (BCSI-7): Actually run e2e tests using Ginko with an appropriate timeout. | ||
# TODO (https://github.com/ThinkParQ/beegfs-csi-driver/issues/21): Actually run e2e tests using Ginko with an appropriate timeout. | ||
|
||
- name: Deploy all examples to verify the driver is available | ||
run: | | ||
echo "${{ secrets.CONN_AUTH_SECRET }}" | sudo tee /etc/beegfs/connAuth | ||
echo "${{ secrets.CONN_AUTH_SECRET }}" | sudo tee /etc/beegfs/connAuth > /dev/null | ||
sudo sed -i '0,/connAuthFile[[:space:]]*=[[:space:]]*/s//connAuthFile = \/etc\/beegfs\/connAuth/' /etc/beegfs/beegfs-client.conf | ||
sudo sed -i '0,/sysMgmtdHost[[:space:]]*=[[:space:]]*/s//sysMgmtdHost = localhost/' /etc/beegfs/beegfs-client.conf | ||
sudo beegfs-ctl --cfgFile=/etc/beegfs/beegfs-client.conf --unmounted --createdir /k8s | ||
|
@@ -269,11 +277,13 @@ jobs: | |
chmod +x install.sh | ||
./install.sh v0.25.0 | ||
# Test using a base64 encoded secret for the Operator based deployment to | ||
# ensure the broadest coverage for how we handle base64 encoded secrets. | ||
- name: Deploy BeeGFS ${{ matrix.beegfs-version }} for testing and expose as a service to the host OS | ||
run: | | ||
export BEEGFS_VERSION=$(echo ${{ matrix.beegfs-version }}) | ||
export BEEGFS_SECRET=$(echo ${{ secrets.CONN_AUTH_SECRET }}) | ||
envsubst < test/env/beegfs-ubuntu/beegfs-fs-1.yaml | kubectl apply -f - | ||
export BEEGFS_SECRET=$(echo ${{ secrets.CONN_AUTH_BASE64_SECRET }}) | ||
envsubst < test/env/beegfs-ubuntu/beegfs-fs-2.yaml | kubectl apply -f - | ||
MAX_ATTEMPTS=36 | ||
SLEEP_TIME=5 | ||
|
@@ -282,7 +292,7 @@ jobs: | |
# If we try to expose the service to the host OS before the pod is ready we'll get an error. | ||
# Make sure the BeeGFS FS started before we continue. | ||
while [ $COUNTER -lt $MAX_ATTEMPTS ]; do | ||
POD_STATUS=$(kubectl get pods beegfs-fs-1-0 -o jsonpath='{.status.phase}') | ||
POD_STATUS=$(kubectl get pods beegfs-fs-2-0 -o jsonpath='{.status.phase}') | ||
echo "Pod status: ${POD_STATUS}" | ||
if [ "${POD_STATUS}" == "Running" ]; then | ||
echo "Verified BeeGFS FS pod is running." | ||
|
@@ -297,7 +307,7 @@ jobs: | |
if [ $COUNTER -eq $MAX_ATTEMPTS ]; then | ||
echo "BeeGFS FS pod did not reach 'Running' status within the maximum allowed time. Outputting debug information and exiting with error..." | ||
kubectl get pods -A | ||
kubectl describe pod beegfs-fs-1-0 | ||
kubectl describe pod beegfs-fs-2-0 | ||
docker images | ||
exit 1 | ||
fi | ||
|
@@ -306,7 +316,7 @@ jobs: | |
# Exposes the service directly to the host operating system. | ||
# This is required to mount BeeGFS since the kernel module is outside the container. | ||
# For some reason we don't need to override the ephemeral port and can use the actual 800* ports. | ||
minikube service beegfs-fs-1-svc | ||
minikube service beegfs-fs-2-svc | ||
# TODO: Cache BeeGFS packages https://docs.github.com/en/actions/using-workflows/caching-dependencies-to-speed-up-workflows | ||
# https://stackoverflow.com/questions/59269850/caching-apt-packages-in-github-actions-workflow | ||
|
@@ -331,19 +341,19 @@ jobs: | |
run: | | ||
operator-sdk run bundle ${{ env.OPERATOR_TEST_BUNDLE_NAME }}:${{ github.sha }} | ||
# TODO (BCSI-7): Actually run e2e tests using Ginko with an appropriate timeout. | ||
# TODO (https://github.com/ThinkParQ/beegfs-csi-driver/issues/21): Actually run e2e tests using Ginko with an appropriate timeout. | ||
|
||
- name: Deploy a BeeGFSDriver object | ||
run: | | ||
export CSI_IMAGE_NAME=$(echo ${{ env.TEST_IMAGE_NAME }}) | ||
export CSI_IMAGE_TAG=$(echo ${{ github.sha }}) | ||
export BEEGFS_SECRET=$(echo ${{ secrets.CONN_AUTH_SECRET }}) | ||
export BEEGFS_SECRET=$(echo ${{ secrets.CONN_AUTH_BASE64_SECRET }}) | ||
export BEEGFS_MGMTD=$(kubectl get nodes -o=jsonpath='{.items[0].status.addresses[?(@.type=="InternalIP")].address}') | ||
envsubst < test/env/beegfs-ubuntu/csi-beegfs-cr.yaml | kubectl apply -f - | ||
- name: Deploy all examples to verify the driver is available | ||
run: | | ||
minikube ssh "sudo echo ${{ secrets.CONN_AUTH_SECRET }} | sudo tee /etc/beegfs/connAuth" | ||
minikube ssh "sudo echo ${{ secrets.CONN_AUTH_BASE64_SECRET }} | base64 --decode | sudo tee /etc/beegfs/connAuth > /dev/null" | ||
minikube ssh "sudo sed -i '0,/connAuthFile[[:space:]]*=[[:space:]]*/s//connAuthFile = \/etc\/beegfs\/connAuth/' /etc/beegfs/beegfs-client.conf" | ||
minikube ssh "sudo sed -i '0,/sysMgmtdHost[[:space:]]*=[[:space:]]*/s//sysMgmtdHost = localhost/' /etc/beegfs/beegfs-client.conf" | ||
minikube ssh "sudo beegfs-ctl --cfgFile=/etc/beegfs/beegfs-client.conf --unmounted --createdir /k8s" | ||
|
@@ -407,17 +417,17 @@ jobs: | |
with: | ||
cosign-release: "v2.1.1" | ||
|
||
- name: Pull tested CSI driver image from ghcr.io | ||
run: | | ||
docker pull ${{ env.TEST_IMAGE_NAME }}:${{ github.sha }} | ||
- name: Log in to the GitHub Container Registry | ||
uses: docker/login-action@v2 | ||
with: | ||
registry: ${{ env.REGISTRY }} | ||
username: ${{ github.actor }} | ||
password: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
- name: Pull tested CSI driver image from ghcr.io | ||
run: | | ||
docker pull ${{ env.TEST_IMAGE_NAME }}:${{ github.sha }} | ||
# This uses the semantic versioning option for https://github.com/docker/metadata-action#semver | ||
- name: Extract metadata for CSI driver container image | ||
id: meta | ||
|
@@ -507,7 +517,7 @@ jobs: | |
cleanup-test-images: | ||
runs-on: ubuntu-22.04 | ||
timeout-minutes: 3 | ||
needs: publish-images | ||
needs: [publish-images, e2e-tests, operator-e2e-tests] | ||
if: always() | ||
steps: | ||
- name: Extract CSI driver test package name | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.