Skip to content

Commit

Permalink
test: add hubble control plane to scale test
Browse files Browse the repository at this point in the history
Signed-off-by: Alex Castilio dos Santos <[email protected]>
  • Loading branch information
alexcastilio committed Nov 26, 2024
1 parent 5ff1567 commit 9d970b9
Show file tree
Hide file tree
Showing 3 changed files with 33 additions and 4 deletions.
9 changes: 9 additions & 0 deletions .github/workflows/scale-test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,14 @@ on:
image_tag:
description: "Image Tag (if not set, default for this commit will be used)"
type: string
control_plane:
description: "Control Plane"
type: choice
required: true
options:
- "legacy"
- "hubble"
default: "legacy"
num_deployments:
description: "Number of Traffic Deployments"
default: 1000
Expand Down Expand Up @@ -100,6 +108,7 @@ jobs:
IMAGE_NAMESPACE: ${{ github.repository }}
TAG: ${{ inputs.image_tag }}
AZURE_APP_INSIGHTS_KEY: ${{ secrets.AZURE_APP_INSIGHTS_KEY }}
HUBBLE_CONTROL_PLANE: ${{ inputs.control_plane == 'hubble' && true || false }}
shell: bash
run: |
set -euo pipefail
Expand Down
20 changes: 17 additions & 3 deletions test/e2e/jobs/jobs.go
Original file line number Diff line number Diff line change
Expand Up @@ -80,8 +80,23 @@ func DeleteTestInfra(subID, rg, clusterName, location string) *types.Job {
return job
}

func InstallRetina(kubeConfigFilePath, chartPath string) *types.Job {
job := types.NewJob("Install and test Retina with basic metrics")
func InstallRetina(kubeConfigFilePath, chartPath string, hubbleControlPlane bool) *types.Job {
if hubbleControlPlane {
job := types.NewJob("Install Retina with Hubble Control Plane")

// Install Retina with Hubble Control Plane
job.AddStep(&kubernetes.ValidateHubbleStep{
Namespace: common.KubeSystemNamespace,
ReleaseName: "retina",
KubeConfigFilePath: kubeConfigFilePath,
ChartPath: chartPath,
TagEnv: generic.DefaultTagEnv,
}, nil)

return job
}

job := types.NewJob("Install Retina with Legacy Control Plane")

job.AddStep(&kubernetes.InstallHelmChart{
Namespace: common.KubeSystemNamespace,
Expand Down Expand Up @@ -365,4 +380,3 @@ func RunPerfTest(kubeConfigFilePath string, chartPath string) *types.Job {

return job
}

8 changes: 7 additions & 1 deletion test/e2e/scale_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import (
"os"
"path/filepath"
"strconv"
"strings"
"testing"

"github.com/microsoft/retina/test/e2e/common"
Expand Down Expand Up @@ -103,8 +104,13 @@ func TestE2ERetina_Scale(t *testing.T) {
require.NoError(t, err)
opt.AdditionalTelemetryProperty["clusterFqdn"] = fqdn

var hubbleControlPlane bool
if strings.ToLower(os.Getenv("HUBBLE_CONTROL_PLANE")) == "true" {
hubbleControlPlane = true
}

// Install Retina
installRetina := types.NewRunner(t, jobs.InstallRetina(kubeConfigFilePath, chartPath))
installRetina := types.NewRunner(t, jobs.InstallRetina(kubeConfigFilePath, chartPath, hubbleControlPlane))
installRetina.Run(ctx)

t.Cleanup(func() {
Expand Down

0 comments on commit 9d970b9

Please sign in to comment.