Skip to content

[API]: feat: add Topology Policy for StormService #410

[API]: feat: add Topology Policy for StormService

[API]: feat: add Topology Policy for StormService #410

Workflow file for this run

name: Test Helm Chart
on:
workflow_dispatch: # Allows manual trigger
pull_request:
paths:
- 'dist/chart/**'
jobs:
build-images:
name: Build image (${{ matrix.image }})
runs-on: ubuntu-latest
strategy:
matrix:
include:
- image: controller-manager
dockerfile: build/container/Dockerfile
context: .
- image: gateway-plugins
dockerfile: build/container/Dockerfile.gateway
context: .
- image: metadata-service
dockerfile: build/container/Dockerfile.python
context: .
steps:
- name: Check out source repository
uses: actions/checkout@v6
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v4
- name: Build ${{ matrix.image }}
uses: docker/build-push-action@v7
with:
context: ${{ matrix.context }}
file: ${{ matrix.dockerfile }}
tags: aibrix/${{ matrix.image }}:${{ github.sha }}
cache-from: type=gha,scope=chart-${{ matrix.image }}
cache-to: type=gha,mode=max,scope=chart-${{ matrix.image }}
load: true
- name: Save image
run: docker save aibrix/${{ matrix.image }}:${{ github.sha }} > ${{ matrix.image }}.tar
- name: Upload image artifact
uses: actions/upload-artifact@v7
with:
name: ${{ matrix.image }}-image
path: ${{ matrix.image }}.tar
retention-days: 1
test:
needs: [build-images]
runs-on: ubuntu-latest
steps:
- name: Check out source repository
uses: actions/checkout@v6
- name: Set up Helm
uses: azure/setup-helm@v4.2.0
with:
version: v3.17.0
- uses: actions/setup-python@v6
with:
python-version: '3.x'
check-latest: true
- name: Set up chart-testing
uses: helm/chart-testing-action@v2.7.0
- name: Run chart-testing (lint)
run: helm lint ./dist/chart
- name: Create kind cluster
uses: helm/kind-action@v1.12.0
- name: Download image artifacts
uses: actions/download-artifact@v8
with:
pattern: '*-image'
merge-multiple: false
- name: Load images into kind
run: |
set -euo pipefail
sha="${{ github.sha }}"
for image in controller-manager gateway-plugins metadata-service; do
docker load < "${image}-image/${image}.tar"
docker tag "aibrix/${image}:${sha}" "aibrix/${image}:nightly"
done
kind load docker-image \
"aibrix/controller-manager:${sha}" "aibrix/controller-manager:nightly" \
"aibrix/gateway-plugins:${sha}" "aibrix/gateway-plugins:nightly" \
"aibrix/metadata-service:${sha}" "aibrix/metadata-service:nightly" \
--name chart-testing
- name: Install kubectl
uses: azure/setup-kubectl@v4
- name: Install Envoy Gateway
run: |
helm install eg oci://docker.io/envoyproxy/gateway-helm --version v0.0.0-latest -n envoy-gateway-system --create-namespace --wait
- name: Install Kuberay operator
run: |
helm repo add kuberay https://ray-project.github.io/kuberay-helm/
helm install kuberay-operator kuberay/kuberay-operator \
--namespace kuberay-system \
--version 1.2.1 \
--set env[0].name=ENABLE_PROBES_INJECTION \
--set-string env[0].value=false \
--set fullnameOverride=kuberay-operator \
--set featureGates[0].name=RayClusterStatusConditions \
--set featureGates[0].enabled=true \
--create-namespace \
--wait
- name: Install Aibrix CRDs
run: |
kubectl apply -f dist/chart/crds
- name: Chart test
working-directory: ./dist/chart
run: |
kubectl create namespace aibrix-system
ct install --chart-dirs . --charts . --namespace aibrix-system \
--helm-extra-args '--timeout 15m0s'