Skip to content

Support metrics multi labels for different models #446

Support metrics multi labels for different models

Support metrics multi labels for different models #446

name: Installation Tests
on:
push:
branches: [ "main" ]
paths:
- 'config/**'
- 'pkg/**'
- 'cmd/**'
- 'python/**'
- 'Makefile'
- 'go.mod'
- 'go.sum'
pull_request:
branches: [ "main" ]
paths:
- 'config/**'
- 'pkg/**'
- 'cmd/**'
- 'python/**'
- 'Makefile'
- 'go.mod'
- 'go.sum'
jobs:
build-images:
runs-on: ubuntu-latest
strategy:
matrix:
image: [controller-manager, plugins, runtime, users]
steps:
- name: Check out code
uses: actions/checkout@v4
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Build ${{ matrix.image }}
run: |
GIT_COMMIT_HASH=${{ github.sha }} make docker-build-${{ matrix.image }}
- name: Save image
run: |
docker save aibrix/${{ matrix.image }}:${{ github.sha }} > ${{ matrix.image }}.tar
- name: Upload image artifact
uses: actions/upload-artifact@v3
with:
name: ${{ matrix.image }}-image
path: ${{ matrix.image }}.tar
retention-days: 1
installation-test:
needs: build-images
runs-on: ubuntu-latest
steps:
- name: Check out code
uses: actions/checkout@v4
- name: Download all image artifacts
uses: actions/download-artifact@v3
- name: Install kind
run: |
[ $(uname -m) = x86_64 ] && curl -Lo ./kind https://kind.sigs.k8s.io/dl/v0.24.0/kind-linux-amd64
chmod +x ./kind
mv ./kind /usr/local/bin/kind
kind version
- name: Install kustomize
run: |
curl -L https://github.com/kubernetes-sigs/kustomize/releases/download/kustomize/v5.4.3/kustomize_v5.4.3_$(go env GOOS)_$(go env GOARCH).tar.gz | tar -xz -C /usr/local/bin/
kustomize version
- name: Set up testing environment
run: |
# Set up the cluster with kind or other Kubernetes environment needed
kind create cluster --name installation-test
kubectl cluster-info --context kind-installation-test
- name: Load image into Kind
run: |
for image in controller-manager plugins runtime users; do
docker load < ${image}-image/${image}.tar
kind load docker-image aibrix/${image}:${{ github.sha }} --name installation-test
done
- name: Deploy controller with the built image
run: |
kubectl create -k config/dependency
cd config/manager && kustomize edit set image controller=aibrix/controller-manager:${{ github.sha }}
cd ${{ github.workspace }}
cd config/gateway && kustomize edit set image plugins=aibrix/plugins:${{ github.sha }} && kustomize edit set image users=aibrix/users:${{ github.sha }}
cd ${{ github.workspace }}
kubectl create -k config/default
- name: Check pod status
run: |
sleep 60s
kubectl get pods --all-namespaces
kubectl wait pod --all --for=condition=ready --all-namespaces --timeout=300s
- name: Clean up
run: kind delete cluster --name installation-test