-
Notifications
You must be signed in to change notification settings - Fork 65
ci: add PVCViewer test workflows #601
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
Merged
google-oss-prow
merged 5 commits into
kubeflow:notebooks-v1
from
noalimoy:feature/migrate_pvcvc_tests_to_notebooks
Sep 30, 2025
Merged
Changes from all commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
1df4177
feat: migrate PVCViewer Controller CI workflows to notebooks repo
noalimoy 4b74cbe
Update pvcviewer_controller_test.go
noalimoy db91f6a
Update README.md
noalimoy fdc0111
Update README.md
noalimoy 54e91bf
Revert README.md
noalimoy File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
70 changes: 70 additions & 0 deletions
70
.github/workflows/pvcviewer_controller_integration_test.yaml
This file contains hidden or 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 |
---|---|---|
@@ -0,0 +1,70 @@ | ||
name: PVCViewer Controller Integration Test | ||
on: | ||
pull_request: | ||
paths: | ||
- components/pvcviewer-controller/** | ||
- releasing/version/VERSION | ||
branches: | ||
- main | ||
- notebooks-v1 | ||
- 'v*-branch' | ||
|
||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.ref }}-${{ github.event.number }} | ||
cancel-in-progress: true | ||
|
||
env: | ||
IMG: ghcr.io/kubeflow/notebooks/pvcviewer-controller | ||
TAG: integration-test | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-22.04 | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
|
||
- name: Setup Docker Buildx | ||
uses: docker/setup-buildx-action@v3 | ||
|
||
- name: Build PVCViewer Controller Image | ||
run: | | ||
cd components/pvcviewer-controller | ||
make docker-build-multi-arch | ||
|
||
- name: Install KinD | ||
run: ./components/testing/gh-actions/install_kind.sh | ||
|
||
- name: Create KinD Cluster | ||
run: kind create cluster --config components/testing/gh-actions/kind-1-25.yaml | ||
|
||
- name: Load Images into KinD Cluster | ||
run: | | ||
kind load docker-image "${IMG}:${TAG}" | ||
|
||
- name: Install kustomize | ||
run: ./components/testing/gh-actions/install_kustomize.sh | ||
|
||
- name: Install Istio | ||
run: ./components/testing/gh-actions/install_istio.sh | ||
|
||
- name: Install cert-manager | ||
run: ./components/testing/gh-actions/install_cert_manager.sh | ||
|
||
- name: Build & Apply manifests | ||
run: | | ||
cd components/pvcviewer-controller/config | ||
kubectl create ns kubeflow | ||
|
||
export CURRENT_IMAGE="${IMG}" | ||
export PR_IMAGE="${IMG}:${TAG}" | ||
|
||
# escape "." in the image names, as it is a special characters in sed | ||
export CURRENT_IMAGE=$(echo "$CURRENT_IMAGE" | sed 's|\.|\\.|g') | ||
export PR_IMAGE=$(echo "$PR_IMAGE" | sed 's|\.|\\.|g') | ||
|
||
kustomize build base \ | ||
| sed "s|${CURRENT_IMAGE}:[a-zA-Z0-9_.-]*|${PR_IMAGE}|g" \ | ||
| kubectl apply -f - | ||
|
||
kubectl wait pods -n kubeflow -l app=pvcviewer --for=condition=Ready --timeout=300s |
37 changes: 37 additions & 0 deletions
37
.github/workflows/pvcviewer_controller_multi_arch_test.yaml
This file contains hidden or 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 |
---|---|---|
@@ -0,0 +1,37 @@ | ||
name: PVCViewer Controller Multi-Arch Build Test | ||
on: | ||
pull_request: | ||
paths: | ||
- components/pvcviewer-controller/** | ||
- releasing/version/VERSION | ||
branches: | ||
noalimoy marked this conversation as resolved.
Show resolved
Hide resolved
|
||
- main | ||
- notebooks-v1 | ||
- 'v*-branch' | ||
|
||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.ref }}-${{ github.event.number }} | ||
cancel-in-progress: true | ||
|
||
env: | ||
IMG: ghcr.io/kubeflow/notebooks/pvcviewer-controller | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-22.04 | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
|
||
- name: Setup QEMU | ||
uses: docker/setup-qemu-action@v3 | ||
|
||
- name: Setup Docker Buildx | ||
uses: docker/setup-buildx-action@v3 | ||
|
||
- name: Build multi-arch Image | ||
run: | | ||
cd components/pvcviewer-controller | ||
ARCH=linux/amd64 make docker-build-multi-arch | ||
ARCH=linux/ppc64le make docker-build-multi-arch | ||
ARCH=linux/arm64/v8 make docker-build-multi-arch |
This file contains hidden or 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 |
---|---|---|
@@ -0,0 +1,28 @@ | ||
name: Run PVCViewer Controller unit tests | ||
on: | ||
pull_request: | ||
paths: | ||
- components/pvcviewer-controller/** | ||
- releasing/version/VERSION | ||
branches: | ||
noalimoy marked this conversation as resolved.
Show resolved
Hide resolved
|
||
- main | ||
- notebooks-v1 | ||
- 'v*-branch' | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-22.04 | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
|
||
- name: Install Go | ||
uses: actions/setup-go@v5 | ||
with: | ||
go-version: "1.22.2" | ||
check-latest: true | ||
|
||
- name: Run unit tests | ||
run: | | ||
cd components/pvcviewer-controller | ||
make test |
This file contains hidden or 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 |
---|---|---|
@@ -0,0 +1,15 @@ | ||
#!/bin/bash | ||
|
||
set -euo pipefail | ||
|
||
CERT_MANAGER_VERSION="1.12.10" | ||
CERT_MANAGER_URL="https://github.com/cert-manager/cert-manager/releases/download/v${CERT_MANAGER_VERSION}/cert-manager.yaml" | ||
|
||
echo "Fetching cert-manager ${CERT_MANAGER_VERSION} manifests..." | ||
curl -sL -o cert-manager.yaml "$CERT_MANAGER_URL" | ||
|
||
echo "Applying cert-manager manifests..." | ||
kubectl apply -f cert-manager.yaml | ||
|
||
echo "Waiting for cert-manager to be ready..." | ||
kubectl wait --for=condition=ready pod -l 'app in (cert-manager,webhook)' --timeout=180s -n cert-manager |
This file contains hidden or 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 |
---|---|---|
@@ -0,0 +1,15 @@ | ||
#!/bin/bash | ||
|
||
set -euo pipefail | ||
|
||
ISTIO_VERSION="1.17.8" | ||
ISTIO_URL="https://istio.io/downloadIstio" | ||
|
||
echo "Installing Istio ${ISTIO_VERSION} ..." | ||
mkdir istio_tmp | ||
pushd istio_tmp >/dev/null | ||
curl -sL "$ISTIO_URL" | ISTIO_VERSION=${ISTIO_VERSION} sh - | ||
cd istio-${ISTIO_VERSION} | ||
export PATH=$PWD/bin:$PATH | ||
istioctl install -y | ||
popd |
This file contains hidden or 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 |
---|---|---|
@@ -0,0 +1,17 @@ | ||
#!/bin/bash | ||
|
||
set -euo pipefail | ||
|
||
KIND_VERSION="0.22.0" | ||
KIND_URL="https://kind.sigs.k8s.io/dl/v${KIND_VERSION}/kind-linux-amd64" | ||
|
||
echo "Setting up kind environment..." | ||
sudo swapoff -a | ||
sudo rm -f /swapfile | ||
sudo mkdir -p /tmp/etcd | ||
sudo mount -t tmpfs tmpfs /tmp/etcd | ||
|
||
echo "Installing kind ${KIND_VERSION} ..." | ||
curl -sL -o kind "$KIND_URL" | ||
chmod +x ./kind | ||
sudo mv kind /usr/local/bin |
This file contains hidden or 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 |
---|---|---|
@@ -0,0 +1,12 @@ | ||
#!/bin/bash | ||
|
||
set -euo pipefail | ||
|
||
KUSTOMIZE_VERSION="5.4.1" | ||
KUSTOMIZE_URL="https://github.com/kubernetes-sigs/kustomize/releases/download/kustomize/v${KUSTOMIZE_VERSION}/kustomize_v${KUSTOMIZE_VERSION}_linux_amd64.tar.gz" | ||
|
||
echo "Installing kustomize ${KUSTOMIZE_VERSION} ..." | ||
curl -sL -o kustomize.tar.gz "$KUSTOMIZE_URL" | ||
tar -xzf kustomize.tar.gz | ||
chmod +x kustomize | ||
sudo mv kustomize /usr/local/bin |
This file contains hidden or 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 |
---|---|---|
@@ -0,0 +1,24 @@ | ||
apiVersion: kind.x-k8s.io/v1alpha4 | ||
kind: Cluster | ||
# Configure registry for KinD. | ||
containerdConfigPatches: | ||
- |- | ||
[plugins."io.containerd.grpc.v1.cri".registry.mirrors."$REGISTRY_NAME:$REGISTRY_PORT"] | ||
endpoint = ["http://$REGISTRY_NAME:$REGISTRY_PORT"] | ||
# This is needed in order to support projected volumes with service account tokens. | ||
# See: https://kubernetes.slack.com/archives/CEKK1KTN2/p1600268272383600 | ||
kubeadmConfigPatches: | ||
- | | ||
apiVersion: kubeadm.k8s.io/v1beta2 | ||
kind: ClusterConfiguration | ||
metadata: | ||
name: config | ||
apiServer: | ||
extraArgs: | ||
"service-account-issuer": "kubernetes.default.svc" | ||
"service-account-signing-key-file": "/etc/kubernetes/pki/sa.key" | ||
nodes: | ||
- role: control-plane | ||
image: kindest/node:v1.25.3@sha256:f52781bc0d7a19fb6c405c2af83abfeb311f130707a0e219175677e366cc45d1 | ||
- role: worker | ||
image: kindest/node:v1.25.3@sha256:f52781bc0d7a19fb6c405c2af83abfeb311f130707a0e219175677e366cc45d1 |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.