Skip to content
Open
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
64 changes: 64 additions & 0 deletions .github/workflows/tb_controller_integration_test.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
name: Tensorboard Controller Integration Test
on:
pull_request:
paths:
- components/tensorboard-controller/**
- releasing/version/VERSION
branches:
- main
- v*-branch
- notebooks-v1

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}-${{ github.event.number }}
cancel-in-progress: true

env:
IMG: ghcr.io/kubeflow/notebooks/tensorboard-controller
TAG: integration-test

jobs:
build:
runs-on: ubuntu-22.04
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Build Tensorboard Controller Image
run: |
cd components/tensorboard-controller
make docker-build

- 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: Build & Apply manifests
run: |
cd components/tensorboard-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 overlays/kubeflow \
| sed "s|${CURRENT_IMAGE}:[a-zA-Z0-9_.-]*|${PR_IMAGE}|g" \
| kubectl apply -f -

kubectl wait pods -n kubeflow -l app=tensorboard-controller --for=condition=Ready --timeout=300s
37 changes: 37 additions & 0 deletions .github/workflows/tb_controller_multi_arch_test.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
name: TensorBoard Controller Multi-Arch Build Test
on:
pull_request:
paths:
- components/tensorboard-controller/**
- releasing/version/VERSION
branches:
- main
- v*-branch
- notebooks-v1

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}-${{ github.event.number }}
cancel-in-progress: true

env:
IMG: ghcr.io/kubeflow/notebooks/tensorboard-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/tensorboard-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
4 changes: 2 additions & 2 deletions components/tensorboard-controller/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ run: manifests generate fmt vet ## Run a controller from your host.
# Build the docker image
.PHONY: docker-build
docker-build:
cd ../ && docker build -t ${IMG}:${TAG} -f tensorboard-controller/Dockerfile .
cd ../ && docker build -t ${IMG}:${TAG} -f tensorboard-controller/Dockerfile .

# Push the docker image
.PHONY: docker-push
Expand All @@ -86,7 +86,7 @@ docker-build-multi-arch: ## Build multi-arch docker images with docker buildx


.PHONY: docker-build-push-multi-arch
docker-build-push-multi-arch: ## Build multi-arch docker images with docker buildx and push to docker registry
docker-build-push-multi-arch: ## Build multi-arch docker images with docker buildx and push to docker registry
cd ../ && docker buildx build --platform ${ARCH} --tag ${IMG}:${TAG} --push -f tensorboard-controller/Dockerfile .

##@ Deployment
Expand Down