Skip to content

SpinKube Performance Tests #53

SpinKube Performance Tests

SpinKube Performance Tests #53

Workflow file for this run

# TODO: use TF cloud
name: SpinKube Performance Tests
on:
workflow_dispatch:
inputs:
apps_nodepool_sku:
type: string
description: "SKU for the node(s) running SpinApps"
default: 'Standard_D2s_v5'
datadog_dashboard_id:
type: string
description: 'ID of datadog dashboard'
default: 'x5w-93r-msb'
containerd_shim_spin_version:
type: string
description: 'Version of containerd-shim-spin to install'
default: 'v0.15.1'
env:
REGISTRY_URL: spinkubeperf.azurecr.io
SPIN_V_VERSION: "2.6.0"
# Terraform env vars associated with configuration variables
TF_VAR_prefix: ci-spinkube-perf
TF_VAR_apps_nodepool_sku: ${{ github.event.inputs.apps_nodepool_sku }}
jobs:
tests:
name: Run SpinKube Performance Tests (AKS)
runs-on: ubuntu-latest
outputs:
kubeconfig: ${{ steps.provision.outputs.kubeconfig }}
steps:
- uses: actions/checkout@v4
- name: Azure login
uses: azure/login@v2
with:
creds: ${{ secrets.AZURE_CREDENTIALS }}
- name: Terraform init
working-directory: terraform/azure/aks
run: terraform init
- name: Terraform plan
working-directory: terraform/azure/aks
run: terraform plan -input=false -out=tf.plan
- name: Terraform apply
working-directory: terraform/azure/aks
run: terraform apply -input=false -auto-approve tf.plan
- name: Export kubeconfig
working-directory: terraform/azure/aks
run: |
mkdir -p $HOME/.kube
terraform output -raw kube_config > $HOME/.kube/config
sudo chown $(id -u):$(id -g) $HOME/.kube/config
- name: Setup cluster
env:
DATADOG_API_KEY: ${{ secrets.DATADOG_API_KEY }}
READINESS_TIMEOUT: "120s"
SHIM_VERSION: ${{ github.event.inputs.containerd_shim_spin_version }}
run: ./environment/spin-kube-k8s.sh
- name: Run tests
env:
TEST_ID: ${{ github.run_id }}
run: |
echo "TEST_START_UTC=$(date '+%s%3N')" >> "$GITHUB_ENV"
make run-tests
- name: Get DataDog dashboard URL
if: ${{ always() }}
env:
TEST_ID: ${{ github.run_id }}
DASHBOARD_ID: ${{ github.event.inputs.datadog_dashboard_id }}
run: |
source utils.sh && export_node_info
export TEST_END_UTC=$(date '+%s%3N')
export VARIABLE_KEYS=node_instance_type,node_os,node_arch,host,test_id
export VARIABLE_VALS=$NODE_INSTANCE_TYPE,$NODE_OS,$NODE_ARCH,$NODE_HOST,$TEST_ID
. ./dashboard/datadog/datadog-dashboard-url.sh
echo '### Datadog Dashboard URL:' >> $GITHUB_STEP_SUMMARY
echo "${DATADOG_DASHBOARD_URL}" >> $GITHUB_STEP_SUMMARY
- name: Deprovision K8s cluster (AKS)
if: ${{ always() }}
working-directory: terraform/azure/aks
run: terraform destroy -input=false -auto-approve