From 5955293abb023dd8ce854c577afc2864e273ede5 Mon Sep 17 00:00:00 2001 From: Travis Raines <571832+rainest@users.noreply.github.com> Date: Mon, 25 Sep 2023 10:55:13 -0700 Subject: [PATCH 01/18] chore(e2e) use testenv.ClusterVersion() --- test/e2e/features_test.go | 5 +++-- test/e2e/helpers_test.go | 10 +++++----- 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/test/e2e/features_test.go b/test/e2e/features_test.go index cfc32511ce..58e0c540f0 100644 --- a/test/e2e/features_test.go +++ b/test/e2e/features_test.go @@ -34,6 +34,7 @@ import ( "github.com/kong/kubernetes-ingress-controller/v2/test/consts" "github.com/kong/kubernetes-ingress-controller/v2/test/helpers/certificate" "github.com/kong/kubernetes-ingress-controller/v2/test/internal/helpers" + "github.com/kong/kubernetes-ingress-controller/v2/test/internal/testenv" ) // ----------------------------------------------------------------------------- @@ -84,8 +85,8 @@ func TestWebhookUpdate(t *testing.T) { t.Log("building test cluster and environment") clusterBuilder := kind.NewBuilder() clusterBuilder.WithConfigReader(strings.NewReader(webhookKINDConfig)) - if clusterVersionStr != "" { - clusterVersion, err := semver.ParseTolerant(clusterVersionStr) + if testenv.ClusterVersion() != "" { + clusterVersion, err := semver.ParseTolerant(testenv.ClusterVersion()) require.NoError(t, err) t.Logf("k8s cluster version is set to %v", clusterVersion) clusterBuilder.WithClusterVersion(clusterVersion) diff --git a/test/e2e/helpers_test.go b/test/e2e/helpers_test.go index 34ecba22b7..9b4b2b2b17 100644 --- a/test/e2e/helpers_test.go +++ b/test/e2e/helpers_test.go @@ -135,7 +135,7 @@ func getEnvironmentBuilder(ctx context.Context, t *testing.T) (*environments.Bui } clusterType, clusterName := clusterParts[0], clusterParts[1] - if clusterVersionStr != "" { + if testenv.ClusterVersion() != "" { return nil, fmt.Errorf("cannot provide cluster version with existing cluster") } @@ -168,8 +168,8 @@ kubeadmConfigPatches: func createKINDBuilder(t *testing.T) *environments.Builder { clusterBuilder := kind.NewBuilder().WithConfigReader(strings.NewReader(kindConfig)) - if clusterVersionStr != "" { - clusterVersion := semver.MustParse(strings.TrimPrefix(clusterVersionStr, "v")) + if testenv.ClusterVersion() != "" { + clusterVersion := semver.MustParse(strings.TrimPrefix(testenv.ClusterVersion(), "v")) clusterBuilder = clusterBuilder.WithClusterVersion(clusterVersion) } builder := environments.NewBuilder().WithClusterBuilder(clusterBuilder).WithAddons(metallb.New()) @@ -221,8 +221,8 @@ func createGKEBuilder(t *testing.T) (*environments.Builder, error) { WithCreateSubnet(true). WithLabels(gkeTestClusterLabels()) - if clusterVersionStr != "" { - k8sVersion, err := semver.Parse(strings.TrimPrefix(clusterVersionStr, "v")) + if testenv.ClusterVersion() != "" { + k8sVersion, err := semver.Parse(strings.TrimPrefix(testenv.ClusterVersion(), "v")) if err != nil { return nil, err } From 520aa2e71dec353b55ddfa179157ccfca167bfd4 Mon Sep 17 00:00:00 2001 From: Travis Raines <571832+rainest@users.noreply.github.com> Date: Mon, 25 Sep 2023 12:02:11 -0700 Subject: [PATCH 02/18] chore(e2e) use testenv image/tag overrides --- test/e2e/features_test.go | 2 +- test/e2e/helpers_test.go | 4 +-- test/e2e/utils_test.go | 56 ++++++++++++-------------------- test/internal/testenv/testenv.go | 28 ++++++++++++++++ 4 files changed, 52 insertions(+), 38 deletions(-) diff --git a/test/e2e/features_test.go b/test/e2e/features_test.go index 58e0c540f0..3fe2a4c889 100644 --- a/test/e2e/features_test.go +++ b/test/e2e/features_test.go @@ -96,7 +96,7 @@ func TestWebhookUpdate(t *testing.T) { addons := []clusters.Addon{} addons = append(addons, metallb.New()) if shouldLoadImages() { - if b, err := loadimage.NewBuilder().WithImage(controllerImageOverride); err == nil { + if b, err := loadimage.NewBuilder().WithImage(testenv.ControllerImageTag()); err == nil { addons = append(addons, b.Build()) } } diff --git a/test/e2e/helpers_test.go b/test/e2e/helpers_test.go index 9b4b2b2b17..704b3be4de 100644 --- a/test/e2e/helpers_test.go +++ b/test/e2e/helpers_test.go @@ -174,7 +174,7 @@ func createKINDBuilder(t *testing.T) *environments.Builder { } builder := environments.NewBuilder().WithClusterBuilder(clusterBuilder).WithAddons(metallb.New()) if shouldLoadImages() { - builder = builder.WithAddons(buildImageLoadAddon(t, controllerImageOverride, kongImageOverride)) + builder = builder.WithAddons(buildImageLoadAddon(t, testenv.ControllerImageTag(), testenv.KongImageTag())) } return builder } @@ -187,7 +187,7 @@ func createExistingKINDBuilder(t *testing.T, name string) (*environments.Builder builder = builder.WithExistingCluster(cluster) builder = builder.WithAddons(metallb.New()) if shouldLoadImages() { - builder = builder.WithAddons(buildImageLoadAddon(t, controllerImageOverride, kongImageOverride)) + builder = builder.WithAddons(buildImageLoadAddon(t, testenv.ControllerImageTag(), testenv.KongImageTag())) } return builder, nil } diff --git a/test/e2e/utils_test.go b/test/e2e/utils_test.go index 639088dc38..f4202e0ec1 100644 --- a/test/e2e/utils_test.go +++ b/test/e2e/utils_test.go @@ -161,9 +161,9 @@ func getTestManifest(t *testing.T, baseManifestPath string, skipTestPatches bool return manifestsReader } - if kongImageOverride != "" { + if testenv.KongImageTag() != "" { patchReadinessProbeRange := kong.MustNewRange("<" + statusReadyProbeMinimalKongVersion.String()) - kongVersion, err := getKongVersionFromOverrideImageTag() + kongVersion, err := getKongVersionFromOverrideTag() // If we could not get version from kong image, assume they are latest. // So we do not patch the readiness probe path to the legacy path `/status`. if err == nil && patchReadinessProbeRange(kongVersion) { @@ -202,10 +202,10 @@ func extractVersionFromImage(imageName string) (semver.Version, error) { // if the override KIC image is not set, it assumes that the latest image is used, so it never skips // the test if override image is not given. func skipTestIfControllerVersionBelow(t *testing.T, minVersion semver.Version) { - if controllerImageOverride == "" { + if testenv.ControllerImageTag() == "" { return } - v, err := extractVersionFromImage(controllerImageOverride) + v, err := extractVersionFromImage(testenv.ControllerImageTag()) // assume using latest version if failed to extract version from image tag. if err != nil { t.Logf("could not extract version from controller image: %v, assume using the latest version", err) @@ -225,11 +225,11 @@ func getDBLessTestManifestByControllerImageEnv(t *testing.T) string { t.Helper() // if no version specified, we assume that we are using the latest version of KIC. - if controllerImageOverride == "" { + if testenv.ControllerImageTag() == "" { return dblessPath } - v, err := extractVersionFromImage(controllerImageOverride) + v, err := extractVersionFromImage(testenv.ControllerImageTag()) // assume using latest version if failed to extract version from image tag. if err != nil { t.Logf("could not extract version from controller image: %v, assume using the latest version", err) @@ -242,22 +242,16 @@ func getDBLessTestManifestByControllerImageEnv(t *testing.T) string { return dblessPath } -// patchGatewayImageFromEnv will optionally replace a default controller image in manifests with `kongImageOverride` +// patchGatewayImageFromEnv will optionally replace a default controller image in manifests with env overrides. // if it's set. func patchGatewayImageFromEnv(t *testing.T, manifestsReader io.Reader) (io.Reader, error) { t.Helper() - if kongImageOverride != "" { - t.Logf("replace kong image with %s", kongImageOverride) - split := strings.Split(kongImageOverride, ":") - if len(split) < 2 { - return nil, fmt.Errorf("invalid image name '%s', expected : format", kongImageOverride) - } - repo := strings.Join(split[0:len(split)-1], ":") - tag := split[len(split)-1] - manifestsReader, err := patchKongImage(manifestsReader, repo, tag) + if testenv.KongImageTag() != "" { + t.Logf("replace kong image with %s", testenv.KongImageTag()) + manifestsReader, err := patchKongImage(manifestsReader, testenv.KongImage(), testenv.KongTag()) if err != nil { - return nil, fmt.Errorf("failed patching override image '%v'", kongImageOverride) + return nil, fmt.Errorf("failed patching override image '%v'", testenv.KongImageTag()) } return manifestsReader, nil } @@ -277,19 +271,15 @@ func splitImageRepoTag(image string) (string, string, error) { return repo, tag, nil } -// patchControllerImageFromEnv will optionally replace a default controller image in manifests with `controllerImageOverride` +// patchControllerImageFromEnv will optionally replace a default controller image in manifests with env override // if it's set. func patchControllerImageFromEnv(t *testing.T, manifestReader io.Reader) (io.Reader, error) { t.Helper() - if controllerImageOverride != "" { - repo, tag, err := splitImageRepoTag(controllerImageOverride) - if err != nil { - return nil, err - } - manifestReader, err = patchControllerImage(manifestReader, repo, tag) + if testenv.ControllerImageTag() != "" { + manifestReader, err := patchControllerImage(manifestReader, testenv.ControllerImage(), testenv.ControllerTag()) if err != nil { - return nil, fmt.Errorf("failed patching override image '%v': %w", controllerImageOverride, err) + return nil, fmt.Errorf("failed patching override image '%v': %w", testenv.ControllerImageTag(), err) } return manifestReader, nil } @@ -298,22 +288,18 @@ func patchControllerImageFromEnv(t *testing.T, manifestReader io.Reader) (io.Rea return manifestReader, nil } -// getKongVersionFromImageTag parses Kong version from tags of Kong image. -// If environment variable `TEST_KONG_EFFECTIVE_VERSION` is set, override with its value. -func getKongVersionFromOverrideImageTag() (kong.Version, error) { +// getKongVersionFromOverrideTag parses Kong version from env effective version or override tag. The effective version +// takes precedence. +func getKongVersionFromOverrideTag() (kong.Version, error) { if kongEffectiveVersion := testenv.KongEffectiveVersion(); kongEffectiveVersion != "" { return kong.ParseSemanticVersion(kongEffectiveVersion) } - if kongImageOverride == "" { - return kong.Version{}, errors.New("No Kong image provided") + if testenv.KongImageTag() == "" { + return kong.Version{}, errors.New("No Kong tag provided") } - _, tag, err := splitImageRepoTag(kongImageOverride) - if err != nil { - return kong.Version{}, err - } - return kong.ParseSemanticVersion(tag) + return kong.ParseSemanticVersion(testenv.KongTag()) } // getKongProxyIP takes a Service with Kong proxy ports and returns and its IP, or fails the test if it cannot. diff --git a/test/internal/testenv/testenv.go b/test/internal/testenv/testenv.go index f3626ff85f..d501b92d9c 100644 --- a/test/internal/testenv/testenv.go +++ b/test/internal/testenv/testenv.go @@ -1,6 +1,7 @@ package testenv import ( + "fmt" "os" "time" ) @@ -40,6 +41,33 @@ func KongTag() string { return os.Getenv("TEST_KONG_TAG") } +// KongImageTag is the combined Kong image and tag if both are set, or empty string if not. +func KongImageTag() string { + if KongImage() != "" && KongTag() != "" { + return fmt.Sprintf("%s:%s", KongImage(), KongTag()) + } + return "" +} + +// ControllerImage is the Kong image to use in lieu of the default. +func ControllerImage() string { + return os.Getenv("TEST_CONTROLLER_IMAGE") +} + +// ControllerTag is the Kong image tag to use in tests. +func ControllerTag() string { + return os.Getenv("TEST_CONTROLLER_TAG") +} + +// ControllerImageTag is the combined Controller image and tag if both are set, or empty string if not. +func ControllerImageTag() string { + if ControllerImage() != "" && ControllerTag() != "" { + return fmt.Sprintf("%s:%s", ControllerImage(), ControllerTag()) + } + return "" +} + +// KongEffectiveVersion is the effective semver of kong gateway. // KongEffectiveVersion is the effective semver of kong gateway. // When testing against "nightly" image of kong gateway, we need to set the effective version for parsing semver in chart templates. func KongEffectiveVersion() string { From fa0868c8f970c11f14d40c0c10ed6394bbc00758 Mon Sep 17 00:00:00 2001 From: Travis Raines <571832+rainest@users.noreply.github.com> Date: Mon, 25 Sep 2023 12:04:11 -0700 Subject: [PATCH 03/18] chore(e2e) use testenv pull credentials --- test/e2e/helpers_test.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/test/e2e/helpers_test.go b/test/e2e/helpers_test.go index 704b3be4de..ea34c8ebbc 100644 --- a/test/e2e/helpers_test.go +++ b/test/e2e/helpers_test.go @@ -776,7 +776,7 @@ func buildImageLoadAddon(t *testing.T, images ...string) clusters.Addon { func createKongImagePullSecret(ctx context.Context, t *testing.T, env environments.Environment) { t.Helper() - if kongImagePullUsername == "" || kongImagePullPassword == "" { + if testenv.KongPullUsername() == "" || testenv.KongPullPassword() == "" { return } kubeconfigFilename := getTemporaryKubeconfig(t, env) @@ -786,8 +786,8 @@ func createKongImagePullSecret(ctx context.Context, t *testing.T, env environmen ctx, "kubectl", "--kubeconfig", kubeconfigFilename, "create", "secret", "docker-registry", secretName, - "--docker-username="+kongImagePullUsername, - "--docker-password="+kongImagePullPassword, + "--docker-username="+testenv.KongPullUsername(), + "--docker-password="+testenv.KongPullPassword(), ) out, err := cmd.CombinedOutput() require.NoError(t, err, "command output: "+string(out)) From a4cb0e64efc8566cfcfbdc19200ea9a923e9e6ec Mon Sep 17 00:00:00 2001 From: Travis Raines <571832+rainest@users.noreply.github.com> Date: Mon, 25 Sep 2023 12:10:55 -0700 Subject: [PATCH 04/18] chore(e2e) use testenv cluster info --- .github/workflows/_e2e_tests.yaml | 2 +- test/e2e/helpers_test.go | 16 ++++++++-------- test/internal/testenv/testenv.go | 5 +++++ 3 files changed, 14 insertions(+), 9 deletions(-) diff --git a/.github/workflows/_e2e_tests.yaml b/.github/workflows/_e2e_tests.yaml index 1235ab6c4e..74842cfbe1 100644 --- a/.github/workflows/_e2e_tests.yaml +++ b/.github/workflows/_e2e_tests.yaml @@ -205,7 +205,7 @@ jobs: KONG_LICENSE_DATA: ${{ steps.license.outputs.license }} TEST_KONG_KONNECT_ACCESS_TOKEN: ${{ secrets.K8S_TEAM_KONNECT_ACCESS_TOKEN }} KONG_CLUSTER_VERSION: ${{ matrix.kubernetes-version }} - KONG_TEST_CLUSTER_PROVIDER: gke + KONG_CLUSTER_PROVIDER: gke E2E_TEST_RUN: ${{ matrix.test }} GOTESTSUM_JUNITFILE: "e2e-gke-${{ matrix.test }}-${{ matrix.kubernetes-version }}-tests.xml" GOOGLE_APPLICATION_CREDENTIALS: ${{ secrets.GOOGLE_APPLICATION_CREDENTIALS }} diff --git a/test/e2e/helpers_test.go b/test/e2e/helpers_test.go index ea34c8ebbc..f41defbb18 100644 --- a/test/e2e/helpers_test.go +++ b/test/e2e/helpers_test.go @@ -117,9 +117,9 @@ func setupE2ETest(t *testing.T, addons ...clusters.Addon) (context.Context, envi func getEnvironmentBuilder(ctx context.Context, t *testing.T) (*environments.Builder, error) { t.Helper() - if existingCluster == "" { + if testenv.ExistingClusterName() == "" { t.Logf("no existing cluster provided, creating a new one for %q type", clusterProvider) - switch clusterProvider { + switch testenv.ClusterProvider() { case string(gke.GKEClusterType): t.Log("creating a GKE cluster builder") return createGKEBuilder(t) @@ -129,9 +129,9 @@ func getEnvironmentBuilder(ctx context.Context, t *testing.T) (*environments.Bui } } - clusterParts := strings.Split(existingCluster, ":") + clusterParts := strings.Split(testenv.ExistingClusterName(), ":") if len(clusterParts) < 2 { - return nil, fmt.Errorf("expected existing cluster in format :, got %s", existingCluster) + return nil, fmt.Errorf("expected existing cluster in format :, got %s", testenv.ExistingClusterName()) } clusterType, clusterName := clusterParts[0], clusterParts[1] @@ -845,18 +845,18 @@ func getTemporaryKubeconfig(t *testing.T, env environments.Environment) string { func runOnlyOnKindClusters(t *testing.T) { t.Helper() - existingClusterIsKind := strings.Split(existingCluster, ":")[0] == string(kind.KindClusterType) + existingClusterIsKind := strings.Split(testenv.ExistingClusterName(), ":")[0] == string(kind.KindClusterType) if existingClusterIsKind { return } - clusterProviderIsKind := clusterProvider == string(kind.KindClusterType) + clusterProviderIsKind := testenv.ClusterProvider() == string(kind.KindClusterType) if clusterProviderIsKind { return } - clusterProviderUnspecified := clusterProvider == "" - existingClusterUnspecified := existingCluster == "" + clusterProviderUnspecified := testenv.ClusterProvider() == "" + existingClusterUnspecified := testenv.ExistingClusterName() == "" if clusterProviderUnspecified && existingClusterUnspecified { return } diff --git a/test/internal/testenv/testenv.go b/test/internal/testenv/testenv.go index d501b92d9c..f762f6dadc 100644 --- a/test/internal/testenv/testenv.go +++ b/test/internal/testenv/testenv.go @@ -109,6 +109,11 @@ func ClusterVersion() string { return os.Getenv("KONG_CLUSTER_VERSION") } +// ClusterProvider indicates the Kubernetes cluster provider. +func ClusterProvider() string { + return os.Getenv("KONG_CLUSTER_PROVIDER") +} + // ControllerFeatureGates contains the feature gates that should be enabled // for test runs in the controller. // If none specified, we fall back to default values. From 7d1bf5295f939e7a9a0258fbe3fede2850c2634a Mon Sep 17 00:00:00 2001 From: Travis Raines <571832+rainest@users.noreply.github.com> Date: Mon, 25 Sep 2023 12:16:14 -0700 Subject: [PATCH 05/18] chore(e2e) use testenv image load flag --- test/e2e/features_test.go | 2 +- test/e2e/helpers_test.go | 4 ++-- test/internal/testenv/testenv.go | 5 +++++ 3 files changed, 8 insertions(+), 3 deletions(-) diff --git a/test/e2e/features_test.go b/test/e2e/features_test.go index 3fe2a4c889..70ad8c352e 100644 --- a/test/e2e/features_test.go +++ b/test/e2e/features_test.go @@ -95,7 +95,7 @@ func TestWebhookUpdate(t *testing.T) { require.NoError(t, err) addons := []clusters.Addon{} addons = append(addons, metallb.New()) - if shouldLoadImages() { + if testenv.ClusterLoadImages() != "" { if b, err := loadimage.NewBuilder().WithImage(testenv.ControllerImageTag()); err == nil { addons = append(addons, b.Build()) } diff --git a/test/e2e/helpers_test.go b/test/e2e/helpers_test.go index f41defbb18..c41c0c0d37 100644 --- a/test/e2e/helpers_test.go +++ b/test/e2e/helpers_test.go @@ -173,7 +173,7 @@ func createKINDBuilder(t *testing.T) *environments.Builder { clusterBuilder = clusterBuilder.WithClusterVersion(clusterVersion) } builder := environments.NewBuilder().WithClusterBuilder(clusterBuilder).WithAddons(metallb.New()) - if shouldLoadImages() { + if testenv.ClusterLoadImages() != "" { builder = builder.WithAddons(buildImageLoadAddon(t, testenv.ControllerImageTag(), testenv.KongImageTag())) } return builder @@ -186,7 +186,7 @@ func createExistingKINDBuilder(t *testing.T, name string) (*environments.Builder builder = builder.WithExistingCluster(cluster) builder = builder.WithAddons(metallb.New()) - if shouldLoadImages() { + if testenv.ClusterLoadImages() != "" { builder = builder.WithAddons(buildImageLoadAddon(t, testenv.ControllerImageTag(), testenv.KongImageTag())) } return builder, nil diff --git a/test/internal/testenv/testenv.go b/test/internal/testenv/testenv.go index f762f6dadc..704e9f8cbb 100644 --- a/test/internal/testenv/testenv.go +++ b/test/internal/testenv/testenv.go @@ -114,6 +114,11 @@ func ClusterProvider() string { return os.Getenv("KONG_CLUSTER_PROVIDER") } +// ClusterLoadImages loads images into test clusters when set. +func ClusterLoadImages() string { + return os.Getenv("TEST_KONG_LOAD_IMAGES") +} + // ControllerFeatureGates contains the feature gates that should be enabled // for test runs in the controller. // If none specified, we fall back to default values. From 34081c155b9238e82f35b2c26b46c125ede19275 Mon Sep 17 00:00:00 2001 From: Travis Raines <571832+rainest@users.noreply.github.com> Date: Mon, 25 Sep 2023 12:18:33 -0700 Subject: [PATCH 06/18] addtl provider --- test/e2e/helpers_test.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/e2e/helpers_test.go b/test/e2e/helpers_test.go index c41c0c0d37..35e1e0fe75 100644 --- a/test/e2e/helpers_test.go +++ b/test/e2e/helpers_test.go @@ -118,7 +118,7 @@ func getEnvironmentBuilder(ctx context.Context, t *testing.T) (*environments.Bui t.Helper() if testenv.ExistingClusterName() == "" { - t.Logf("no existing cluster provided, creating a new one for %q type", clusterProvider) + t.Logf("no existing cluster provided, creating a new one for %q type", testenv.ClusterProvider()) switch testenv.ClusterProvider() { case string(gke.GKEClusterType): t.Log("creating a GKE cluster builder") From ad28eaecee2a20b267d933a73e527463f9eb0959 Mon Sep 17 00:00:00 2001 From: Travis Raines <571832+rainest@users.noreply.github.com> Date: Mon, 25 Sep 2023 12:24:37 -0700 Subject: [PATCH 07/18] chore(e2e) move Github env into testenv --- test/e2e/konnect_test.go | 5 +++-- test/internal/testenv/testenv.go | 17 +++++++++++++++++ 2 files changed, 20 insertions(+), 2 deletions(-) diff --git a/test/e2e/konnect_test.go b/test/e2e/konnect_test.go index f8679a464a..4440abe8e4 100644 --- a/test/e2e/konnect_test.go +++ b/test/e2e/konnect_test.go @@ -35,6 +35,7 @@ import ( rgc "github.com/kong/kubernetes-ingress-controller/v2/internal/konnect/runtimegroupsconfig" "github.com/kong/kubernetes-ingress-controller/v2/test/helpers/certificate" "github.com/kong/kubernetes-ingress-controller/v2/test/internal/helpers" + "github.com/kong/kubernetes-ingress-controller/v2/test/internal/testenv" ) const ( @@ -179,9 +180,9 @@ func generateTestKonnectRuntimeGroupDescription(t *testing.T) string { t.Helper() desc := fmt.Sprintf("runtime group for test %s", t.Name()) - if githubServerURL != "" && githubRepo != "" && githubRunID != "" { + if testenv.GithubServerURL() != "" && testenv.GithubRepo() != "" && testenv.GithubRunID() != "" { githubRunURL := fmt.Sprintf("%s/%s/actions/runs/%s", - githubServerURL, githubRepo, githubRunID) + testenv.GithubServerURL(), testenv.GithubRepo(), testenv.GithubRunID()) desc += ", github workflow run " + githubRunURL } diff --git a/test/internal/testenv/testenv.go b/test/internal/testenv/testenv.go index 704e9f8cbb..5ec9cb744c 100644 --- a/test/internal/testenv/testenv.go +++ b/test/internal/testenv/testenv.go @@ -119,6 +119,23 @@ func ClusterLoadImages() string { return os.Getenv("TEST_KONG_LOAD_IMAGES") } +// See: https://docs.github.com/en/actions/learn-github-actions/variables#default-environment-variables + +// GithubServerURL returns a Github server URL from a Github Actions environment. +func GithubServerURL() string { + return os.Getenv("GITHUB_SERVER_URL") +} + +// GithubRepo returns a Github repository from a Github Actions environment. +func GithubRepo() string { + return os.Getenv("GITHUB_REPOSITORY") +} + +// GithubRunID returns a Github run ID from a Github Actions environment. +func GithubRunID() string { + return os.Getenv("GITHUB_RUN_ID") +} + // ControllerFeatureGates contains the feature gates that should be enabled // for test runs in the controller. // If none specified, we fall back to default values. From 13bf62f6d97dda860c276655ab5289f41148fff7 Mon Sep 17 00:00:00 2001 From: Travis Raines <571832+rainest@users.noreply.github.com> Date: Mon, 25 Sep 2023 12:25:24 -0700 Subject: [PATCH 08/18] chore(e2e) remove e2e-specific envvars --- test/e2e/environment.go | 43 ----------------------------------------- 1 file changed, 43 deletions(-) delete mode 100644 test/e2e/environment.go diff --git a/test/e2e/environment.go b/test/e2e/environment.go deleted file mode 100644 index 5dd846a314..0000000000 --- a/test/e2e/environment.go +++ /dev/null @@ -1,43 +0,0 @@ -package e2e - -import "os" - -var ( - // clusterVersionStr indicates the Kubernetes cluster version to use when - // generating a testing environment and allows the caller to provide a specific - // version. If no version is provided the default version for the cluster - // provisioner in the testing framework will be used. - clusterVersionStr = os.Getenv("KONG_CLUSTER_VERSION") - - // controllerImageOverride is the controller image to use in lieu of the default. - controllerImageOverride = os.Getenv("TEST_KONG_CONTROLLER_IMAGE_OVERRIDE") - - // imageLoad is a boolean flag that indicates whether the controller and kong images should be loaded into the cluster. - imageLoad = os.Getenv("TEST_KONG_LOAD_IMAGES") - - // kongImageOverride is the Kong image to use in lieu of the default. - kongImageOverride = os.Getenv("TEST_KONG_IMAGE_OVERRIDE") - kongImagePullUsername = os.Getenv("TEST_KONG_PULL_USERNAME") - kongImagePullPassword = os.Getenv("TEST_KONG_PULL_PASSWORD") - - // KONG_TEST_CLUSTER is to be filled when an already existing cluster should be used - // in tests. It should be in a `:` format. - // It takes precedence over KONG_TEST_CLUSTER_PROVIDER. - existingCluster = os.Getenv("KONG_TEST_CLUSTER") - - // KONG_TEST_CLUSTER_PROVIDER is to be filled when a cluster of a given kind should - // be created in tests. It can be either `gke` or `kind`. - // It's not used when KONG_TEST_CLUSTER is set. - clusterProvider = os.Getenv("KONG_TEST_CLUSTER_PROVIDER") - - // githubServerURL, githubRepo, githubRunID are used to locate the run of github wokflow. - // See: https://docs.github.com/en/actions/learn-github-actions/variables#default-environment-variables - githubServerURL = os.Getenv("GITHUB_SERVER_URL") - githubRepo = os.Getenv("GITHUB_REPOSITORY") - githubRunID = os.Getenv("GITHUB_RUN_ID") -) - -// shouldLoadImages tells whether the controller and kong images should be loaded into the cluster. -func shouldLoadImages() bool { - return imageLoad == "true" -} From b00334e5b1628e5e0d44c6e672ddae310fee65e4 Mon Sep 17 00:00:00 2001 From: Travis Raines <571832+rainest@users.noreply.github.com> Date: Mon, 25 Sep 2023 12:43:56 -0700 Subject: [PATCH 09/18] more image info --- test/e2e/helpers_test.go | 2 +- test/e2e/utils_test.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/test/e2e/helpers_test.go b/test/e2e/helpers_test.go index 35e1e0fe75..f2ffd328cc 100644 --- a/test/e2e/helpers_test.go +++ b/test/e2e/helpers_test.go @@ -239,7 +239,7 @@ type ManifestDeploy struct { Path string // SkipTestPatches is a flag that controls whether to apply standard test patches (e.g. replace controller - // image when TEST_KONG_CONTROLLER_IMAGE_OVERRIDE set, etc.) to the manifests before deploying them. + // image when TEST_CONTROLLER_IMAGE set, etc.) to the manifests before deploying them. SkipTestPatches bool // AdditionalSecrets is a list of additional secrets to create before deploying the manifest. diff --git a/test/e2e/utils_test.go b/test/e2e/utils_test.go index f4202e0ec1..38b54f7757 100644 --- a/test/e2e/utils_test.go +++ b/test/e2e/utils_test.go @@ -218,7 +218,7 @@ func skipTestIfControllerVersionBelow(t *testing.T, minVersion semver.Version) { } // getDBLessTestManifestByControllerImageEnv gets the proper manifest for dbless deployment. -// It takes into account the TEST_KONG_CONTROLLER_IMAGE_OVERRIDE environment variable. +// It takes into account the TEST_CONTROLLER_IMAGE and TEST_CONTROLLER_TAG environment variables. // This is needed because KIC does not support Gateway Discovery in versions below 2.9, // and hence we need to use the legacy manifest for those versions. func getDBLessTestManifestByControllerImageEnv(t *testing.T) string { From 3ec8376fc1687cdd9aa0da7fd26226aabb46e40e Mon Sep 17 00:00:00 2001 From: Travis Raines <571832+rainest@users.noreply.github.com> Date: Mon, 25 Sep 2023 13:05:10 -0700 Subject: [PATCH 10/18] chore(e2e) update workflow envvars --- .github/workflows/_e2e_tests.yaml | 25 +++++++++++++++++++++++-- 1 file changed, 23 insertions(+), 2 deletions(-) diff --git a/.github/workflows/_e2e_tests.yaml b/.github/workflows/_e2e_tests.yaml index 74842cfbe1..acd139eaab 100644 --- a/.github/workflows/_e2e_tests.yaml +++ b/.github/workflows/_e2e_tests.yaml @@ -126,6 +126,25 @@ jobs: with: password: ${{ secrets.PULP_PASSWORD }} + - name: split image and tag + id: split + env: + KONG: ${{ inputs.kong-image }} + CONTROLLER: ${{ inputs.controller-image }} + run: | + if [ "${{ inputs.kong-image }}" != "" ]; then + export kong_image=$(echo ${{ inputs.kong-image }} | awk '{split($0,a,":"); print a[1]}') + export kong_tag=$(awk '{split($0,a,":"); print a[2]}') + echo "kong-image=$kong_image" >> $GITHUB_OUTPUT + echo "kong-tag=$kong_tag" >> $GITHUB_OUTPUT + fi + if [ "${{ inputs.kic-image }}" != "" ]; then + export kic_image=$(awk '{split($0,a,":"); print a[1]}') + export kic_tag=$(awk '{split($0,a,":"); print a[2]}') + echo "kic-image=$kic_image" >> $GITHUB_OUTPUT + echo "kic-tag=$kic_tag" >> $GITHUB_OUTPUT + fi + # We need to pull the Gateway image locally if loading local image was specified. # This is a "workaround" of the fact that we bind the env variable - responsible for # indicating whether we'd like to load the images - for both controller @@ -141,9 +160,11 @@ jobs: env: E2E_TEST_RUN: ${{ matrix.test }} KONG_CLUSTER_VERSION: ${{ matrix.kubernetes-version }} - TEST_KONG_CONTROLLER_IMAGE_OVERRIDE: ${{ inputs.kic-image }} + TEST_CONTROLLER_IMAGE: ${{ steps.split.outputs.kic-image }} + TEST_CONTROLLER_TAG: ${{ steps.split.outputs.kic-tag }} TEST_KONG_LOAD_IMAGES: ${{ inputs.load-local-image }} - TEST_KONG_IMAGE_OVERRIDE: ${{ inputs.kong-image }} + TEST_KONG_IMAGE: ${{ steps.split.outputs.kong-image }} + TEST_KONG_TAG: ${{ steps.split.outputs.kong-tag }} TEST_KONG_KONNECT_ACCESS_TOKEN: ${{ secrets.K8S_TEAM_KONNECT_ACCESS_TOKEN }} KONG_LICENSE_DATA: ${{ steps.license.outputs.license }} GOTESTSUM_JUNITFILE: "e2e-${{ matrix.test }}${{ matrix.kubernetes-version }}-tests.xml" From 55f29684a3f93bdb9224d9707c298b5b2c932a86 Mon Sep 17 00:00:00 2001 From: Travis Raines <571832+rainest@users.noreply.github.com> Date: Mon, 25 Sep 2023 14:14:39 -0700 Subject: [PATCH 11/18] fix(e2e) confirm image load true --- test/e2e/features_test.go | 2 +- test/e2e/helpers_test.go | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/test/e2e/features_test.go b/test/e2e/features_test.go index 70ad8c352e..77c227af9a 100644 --- a/test/e2e/features_test.go +++ b/test/e2e/features_test.go @@ -95,7 +95,7 @@ func TestWebhookUpdate(t *testing.T) { require.NoError(t, err) addons := []clusters.Addon{} addons = append(addons, metallb.New()) - if testenv.ClusterLoadImages() != "" { + if testenv.ClusterLoadImages() == "true" { if b, err := loadimage.NewBuilder().WithImage(testenv.ControllerImageTag()); err == nil { addons = append(addons, b.Build()) } diff --git a/test/e2e/helpers_test.go b/test/e2e/helpers_test.go index f2ffd328cc..032365d98b 100644 --- a/test/e2e/helpers_test.go +++ b/test/e2e/helpers_test.go @@ -173,7 +173,7 @@ func createKINDBuilder(t *testing.T) *environments.Builder { clusterBuilder = clusterBuilder.WithClusterVersion(clusterVersion) } builder := environments.NewBuilder().WithClusterBuilder(clusterBuilder).WithAddons(metallb.New()) - if testenv.ClusterLoadImages() != "" { + if testenv.ClusterLoadImages() == "true" { builder = builder.WithAddons(buildImageLoadAddon(t, testenv.ControllerImageTag(), testenv.KongImageTag())) } return builder @@ -186,7 +186,7 @@ func createExistingKINDBuilder(t *testing.T, name string) (*environments.Builder builder = builder.WithExistingCluster(cluster) builder = builder.WithAddons(metallb.New()) - if testenv.ClusterLoadImages() != "" { + if testenv.ClusterLoadImages() == "true" { builder = builder.WithAddons(buildImageLoadAddon(t, testenv.ControllerImageTag(), testenv.KongImageTag())) } return builder, nil From c2a34eedd6a71d135d3eb82f8d46db1be00e440e Mon Sep 17 00:00:00 2001 From: Travis Raines <571832+rainest@users.noreply.github.com> Date: Mon, 25 Sep 2023 14:32:47 -0700 Subject: [PATCH 12/18] fix(e2e) populate inputs properly --- .github/workflows/_e2e_tests.yaml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/_e2e_tests.yaml b/.github/workflows/_e2e_tests.yaml index acd139eaab..b1e2a758c7 100644 --- a/.github/workflows/_e2e_tests.yaml +++ b/.github/workflows/_e2e_tests.yaml @@ -134,13 +134,13 @@ jobs: run: | if [ "${{ inputs.kong-image }}" != "" ]; then export kong_image=$(echo ${{ inputs.kong-image }} | awk '{split($0,a,":"); print a[1]}') - export kong_tag=$(awk '{split($0,a,":"); print a[2]}') + export kong_tag=$(echo ${{ inputs.kong-image }} | awk '{split($0,a,":"); print a[2]}') echo "kong-image=$kong_image" >> $GITHUB_OUTPUT echo "kong-tag=$kong_tag" >> $GITHUB_OUTPUT fi if [ "${{ inputs.kic-image }}" != "" ]; then - export kic_image=$(awk '{split($0,a,":"); print a[1]}') - export kic_tag=$(awk '{split($0,a,":"); print a[2]}') + export kic_image=$(echo ${{ inputs.kic-image }} | awk '{split($0,a,":"); print a[1]}') + export kic_tag=$(echo ${{ inputs.kic-image }} | awk '{split($0,a,":"); print a[2]}') echo "kic-image=$kic_image" >> $GITHUB_OUTPUT echo "kic-tag=$kic_tag" >> $GITHUB_OUTPUT fi From 8b26165804ec59469f5d2981bc5403e2e815b6b6 Mon Sep 17 00:00:00 2001 From: Travis Raines <571832+rainest@users.noreply.github.com> Date: Mon, 25 Sep 2023 16:17:20 -0700 Subject: [PATCH 13/18] chore(e2e) removed unused util --- test/e2e/utils_test.go | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/test/e2e/utils_test.go b/test/e2e/utils_test.go index 38b54f7757..1e4cf69ae9 100644 --- a/test/e2e/utils_test.go +++ b/test/e2e/utils_test.go @@ -260,17 +260,6 @@ func patchGatewayImageFromEnv(t *testing.T, manifestsReader io.Reader) (io.Reade return manifestsReader, nil } -// splitImageRepoTag splits repo and tag from given image name, like kong:3.4.0 => kong, 3.4.0. -func splitImageRepoTag(image string) (string, string, error) { - split := strings.Split(image, ":") - if len(split) < 2 { - return "", "", fmt.Errorf("could not parse override image '%v', expected : format", image) - } - repo := strings.Join(split[0:len(split)-1], ":") - tag := split[len(split)-1] - return repo, tag, nil -} - // patchControllerImageFromEnv will optionally replace a default controller image in manifests with env override // if it's set. func patchControllerImageFromEnv(t *testing.T, manifestReader io.Reader) (io.Reader, error) { From 33c9a9f723eb976bab6f4bebd6a4b91b1447629a Mon Sep 17 00:00:00 2001 From: Travis Raines <571832+rainest@users.noreply.github.com> Date: Fri, 13 Oct 2023 14:49:36 -0700 Subject: [PATCH 14/18] pr: fail on load image errors --- test/e2e/features_test.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/test/e2e/features_test.go b/test/e2e/features_test.go index 77c227af9a..801605a797 100644 --- a/test/e2e/features_test.go +++ b/test/e2e/features_test.go @@ -98,6 +98,8 @@ func TestWebhookUpdate(t *testing.T) { if testenv.ClusterLoadImages() == "true" { if b, err := loadimage.NewBuilder().WithImage(testenv.ControllerImageTag()); err == nil { addons = append(addons, b.Build()) + } else { + requite.NoError(t, err) } } builder := environments.NewBuilder().WithExistingCluster(cluster).WithAddons(addons...) From 61b0cbab0b3454450e99c710349b66ebf020438d Mon Sep 17 00:00:00 2001 From: Travis Raines <571832+rainest@users.noreply.github.com> Date: Fri, 20 Oct 2023 12:40:16 -0700 Subject: [PATCH 15/18] fix: give Istio test new vars --- .github/workflows/_e2e_tests.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/_e2e_tests.yaml b/.github/workflows/_e2e_tests.yaml index fafbffae1e..23631c83c3 100644 --- a/.github/workflows/_e2e_tests.yaml +++ b/.github/workflows/_e2e_tests.yaml @@ -294,9 +294,9 @@ jobs: - name: run Istio tests run: make test.istio env: - TEST_KONG_CONTROLLER_IMAGE_OVERRIDE: ${{ inputs.kic-image }} + TEST_CONTROLLER_IMAGE: ${{ inputs.kic-image }} TEST_KONG_LOAD_IMAGES: ${{ inputs.load-local-image }} - TEST_KONG_IMAGE_OVERRIDE: ${{ inputs.kong-image }} + TEST_KONG_IMAGE: ${{ inputs.kong-image }} KONG_LICENSE_DATA: ${{ steps.license.outputs.license }} KONG_CLUSTER_VERSION: ${{ matrix.kind }} ISTIO_VERSION: ${{ matrix.istio }} From 97c8025ac2973d0e7c71a03da8143c1c75375d9f Mon Sep 17 00:00:00 2001 From: Travis Raines <571832+rainest@users.noreply.github.com> Date: Fri, 20 Oct 2023 12:47:38 -0700 Subject: [PATCH 16/18] chore: disable staticcheck unused on utils --- test/e2e/utils_test.go | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/test/e2e/utils_test.go b/test/e2e/utils_test.go index 93fba10352..f6d5147dc4 100644 --- a/test/e2e/utils_test.go +++ b/test/e2e/utils_test.go @@ -161,6 +161,8 @@ func getTestManifest(t *testing.T, baseManifestPath string, skipTestPatches bool // extractVersionFromImage extracts semver of image from image tag. If tag is not given, // or is not in a semver format, it returns an error. // for example: kong/kubernetes-ingress-controller:2.9.3 => semver.Version{Major:2,Minor:9,Patch:3}. +// +//lint:ignore U1000 retained for future use func extractVersionFromImage(imageName string) (semver.Version, error) { //nolint:unused split := strings.Split(imageName, ":") if len(split) < 2 { @@ -179,6 +181,8 @@ func extractVersionFromImage(imageName string) (semver.Version, error) { //nolin // below the minVersion. // if the override KIC image is not set, it assumes that the latest image is used, so it never skips // the test if override image is not given. +// +//lint:ignore U1000 retained for future use func skipTestIfControllerVersionBelow(t *testing.T, minVersion semver.Version) { //nolint:unused if testenv.ControllerImageTag() == "" { return @@ -231,6 +235,8 @@ func patchControllerImageFromEnv(t *testing.T, manifestReader io.Reader) (io.Rea // getKongVersionFromOverrideTag parses Kong version from env effective version or override tag. The effective version // takes precedence. +// +//lint:ignore U1000 retained for future use func getKongVersionFromOverrideTag() (kong.Version, error) { //nolint:unused if kongEffectiveVersion := testenv.KongEffectiveVersion(); kongEffectiveVersion != "" { return kong.ParseSemanticVersion(kongEffectiveVersion) From 0aebfdfcef61035b4a0018840a1eab76a1091a58 Mon Sep 17 00:00:00 2001 From: Travis Raines <571832+rainest@users.noreply.github.com> Date: Fri, 20 Oct 2023 13:49:35 -0700 Subject: [PATCH 17/18] chore: linter linter what hast thou donst --- test/e2e/utils_test.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/test/e2e/utils_test.go b/test/e2e/utils_test.go index f6d5147dc4..d4490a082f 100644 --- a/test/e2e/utils_test.go +++ b/test/e2e/utils_test.go @@ -163,7 +163,7 @@ func getTestManifest(t *testing.T, baseManifestPath string, skipTestPatches bool // for example: kong/kubernetes-ingress-controller:2.9.3 => semver.Version{Major:2,Minor:9,Patch:3}. // //lint:ignore U1000 retained for future use -func extractVersionFromImage(imageName string) (semver.Version, error) { //nolint:unused +func extractVersionFromImage(imageName string) (semver.Version, error) { split := strings.Split(imageName, ":") if len(split) < 2 { return semver.Version{}, fmt.Errorf("could not parse override image '%s', expected : format", imageName) @@ -183,7 +183,7 @@ func extractVersionFromImage(imageName string) (semver.Version, error) { //nolin // the test if override image is not given. // //lint:ignore U1000 retained for future use -func skipTestIfControllerVersionBelow(t *testing.T, minVersion semver.Version) { //nolint:unused +func skipTestIfControllerVersionBelow(t *testing.T, minVersion semver.Version) { if testenv.ControllerImageTag() == "" { return } @@ -237,7 +237,7 @@ func patchControllerImageFromEnv(t *testing.T, manifestReader io.Reader) (io.Rea // takes precedence. // //lint:ignore U1000 retained for future use -func getKongVersionFromOverrideTag() (kong.Version, error) { //nolint:unused +func getKongVersionFromOverrideTag() (kong.Version, error) { if kongEffectiveVersion := testenv.KongEffectiveVersion(); kongEffectiveVersion != "" { return kong.ParseSemanticVersion(kongEffectiveVersion) } From dca814a1445f8271e32e5375a4781dcb8d4482be Mon Sep 17 00:00:00 2001 From: Travis Raines <571832+rainest@users.noreply.github.com> Date: Fri, 20 Oct 2023 14:13:07 -0700 Subject: [PATCH 18/18] fix: add new image steps to other tests --- .github/workflows/_e2e_tests.yaml | 47 ++++++++++++++++++++++++++++--- 1 file changed, 43 insertions(+), 4 deletions(-) diff --git a/.github/workflows/_e2e_tests.yaml b/.github/workflows/_e2e_tests.yaml index 23631c83c3..cfe9309966 100644 --- a/.github/workflows/_e2e_tests.yaml +++ b/.github/workflows/_e2e_tests.yaml @@ -220,6 +220,21 @@ jobs: with: password: ${{ secrets.PULP_PASSWORD }} + - name: split image and tag + id: split + env: + KONG: ${{ inputs.kong-image }} + CONTROLLER: ${{ inputs.controller-image }} + run: | + if [ "${{ inputs.kong-image }}" != "" ]; then + export kong_image=$(echo ${{ inputs.kong-image }} | awk '{split($0,a,":"); print a[1]}') + export kong_tag=$(echo ${{ inputs.kong-image }} | awk '{split($0,a,":"); print a[2]}') + echo "kong-image=$kong_image" >> $GITHUB_OUTPUT + echo "kong-tag=$kong_tag" >> $GITHUB_OUTPUT + fi + # see the https://github.com/Kong/kubernetes-testing-framework/issues/587 TODO below + # if we add local image GKE support, we probably need to split it into components here + - name: run ${{ matrix.test }} run: make test.e2e env: @@ -227,8 +242,10 @@ jobs: # therefore we need to use the nightly one. # TODO: Once we have a way to load images into GKE, we can use the local image. # KTF issue that should enable it: https://github.com/Kong/kubernetes-testing-framework/issues/587 - TEST_KONG_CONTROLLER_IMAGE_OVERRIDE: "kong/nightly-ingress-controller:nightly" - TEST_KONG_IMAGE_OVERRIDE: ${{ inputs.kong-image }} + TEST_CONTROLLER_IMAGE: "kong/nightly-ingress-controller" + TEST_CONTROLLER_TAG: "nightly" + TEST_KONG_IMAGE: ${{ steps.split.outputs.kong-image }} + TEST_KONG_TAG: ${{ steps.split.outputs.kong-tag }} TEST_KONG_EFFECTIVE_VERSION: ${{ inputs.kong-effective-version }} KONG_LICENSE_DATA: ${{ steps.license.outputs.license }} TEST_KONG_KONNECT_ACCESS_TOKEN: ${{ secrets.K8S_TEAM_KONNECT_ACCESS_TOKEN }} @@ -291,12 +308,34 @@ jobs: with: password: ${{ secrets.PULP_PASSWORD }} + - name: split image and tag + id: split + env: + KONG: ${{ inputs.kong-image }} + CONTROLLER: ${{ inputs.controller-image }} + run: | + if [ "${{ inputs.kong-image }}" != "" ]; then + export kong_image=$(echo ${{ inputs.kong-image }} | awk '{split($0,a,":"); print a[1]}') + export kong_tag=$(echo ${{ inputs.kong-image }} | awk '{split($0,a,":"); print a[2]}') + echo "kong-image=$kong_image" >> $GITHUB_OUTPUT + echo "kong-tag=$kong_tag" >> $GITHUB_OUTPUT + fi + if [ "${{ inputs.kic-image }}" != "" ]; then + export kic_image=$(echo ${{ inputs.kic-image }} | awk '{split($0,a,":"); print a[1]}') + export kic_tag=$(echo ${{ inputs.kic-image }} | awk '{split($0,a,":"); print a[2]}') + echo "kic-image=$kic_image" >> $GITHUB_OUTPUT + echo "kic-tag=$kic_tag" >> $GITHUB_OUTPUT + fi + + - name: run Istio tests run: make test.istio env: - TEST_CONTROLLER_IMAGE: ${{ inputs.kic-image }} + TEST_CONTROLLER_IMAGE: ${{ steps.split.outputs.kic-image }} + TEST_CONTROLLER_TAG: ${{ steps.split.outputs.kic-tag }} TEST_KONG_LOAD_IMAGES: ${{ inputs.load-local-image }} - TEST_KONG_IMAGE: ${{ inputs.kong-image }} + TEST_KONG_IMAGE: ${{ steps.split.outputs.kong-image }} + TEST_KONG_TAG: ${{ steps.split.outputs.kong-tag }} KONG_LICENSE_DATA: ${{ steps.license.outputs.license }} KONG_CLUSTER_VERSION: ${{ matrix.kind }} ISTIO_VERSION: ${{ matrix.istio }}