From fd8accd9d906994a92cf2707a34b153b80ee275e Mon Sep 17 00:00:00 2001 From: Carlos Eduardo Arango Gutierrez Date: Mon, 26 May 2025 09:35:55 +0200 Subject: [PATCH 1/6] Refactor the instance manager to make CLI easier to interact with Signed-off-by: Carlos Eduardo Arango Gutierrez --- cmd/cli/create/create.go | 18 ++++++++++++++++ cmd/cli/delete/delete.go | 38 --------------------------------- cmd/cli/list/list.go | 1 - internal/instances/instances.go | 7 ++++-- 4 files changed, 23 insertions(+), 41 deletions(-) diff --git a/cmd/cli/create/create.go b/cmd/cli/create/create.go index 81c720988..a0d148f91 100644 --- a/cmd/cli/create/create.go +++ b/cmd/cli/create/create.go @@ -30,6 +30,7 @@ import ( "github.com/NVIDIA/holodeck/pkg/utils" cli "github.com/urfave/cli/v2" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" ) type options struct { @@ -200,6 +201,23 @@ func runProvision(log *logger.FunLogger, opts *options) error { opts.cfg.Status = opts.cache.Status if err = p.Run(opts.cfg); err != nil { + // Set degraded condition when provisioning fails + opts.cfg.Status.Conditions = []metav1.Condition{ + { + Type: v1alpha1.ConditionDegraded, + Status: metav1.ConditionTrue, + LastTransitionTime: metav1.Now(), + Reason: "ProvisioningFailed", + Message: fmt.Sprintf("Failed to provision environment: %v", err), + }, + } + data, err := jyaml.MarshalYAML(opts.cfg) + if err != nil { + return fmt.Errorf("failed to marshal environment: %v", err) + } + if err := os.WriteFile(opts.cachePath, data, 0600); err != nil { + return fmt.Errorf("failed to update cache file with provisioning status: %v", err) + } return fmt.Errorf("failed to run provisioner: %v", err) } diff --git a/cmd/cli/delete/delete.go b/cmd/cli/delete/delete.go index bfa88bf0c..396c89281 100644 --- a/cmd/cli/delete/delete.go +++ b/cmd/cli/delete/delete.go @@ -24,7 +24,6 @@ import ( "github.com/NVIDIA/holodeck/api/holodeck/v1alpha1" "github.com/NVIDIA/holodeck/internal/instances" "github.com/NVIDIA/holodeck/internal/logger" - "github.com/NVIDIA/holodeck/pkg/jyaml" cli "github.com/urfave/cli/v2" ) @@ -32,7 +31,6 @@ import ( type command struct { log *logger.FunLogger cachePath string - envFile string cfg v1alpha1.Environment } @@ -57,50 +55,14 @@ func (m command) build() *cli.Command { Destination: &m.cachePath, Value: filepath.Join(os.Getenv("HOME"), ".cache", "holodeck"), }, - &cli.StringFlag{ - Name: "envFile", - Aliases: []string{"f"}, - Usage: "Path to the Environment file", - Destination: &m.envFile, - }, &cli.StringFlag{ Name: "instance-id", Aliases: []string{"i"}, Usage: "Instance ID to delete", }, }, - Before: func(c *cli.Context) error { - // Check that either envFile or instance-id is provided, but not both - hasEnvFile := c.IsSet("envFile") - hasInstanceID := c.IsSet("instance-id") - - if hasEnvFile && hasInstanceID { - return fmt.Errorf("cannot specify both --envFile and --instance-id") - } - if !hasEnvFile && !hasInstanceID { - return fmt.Errorf("must specify either --envFile or --instance-id") - } - // Read the config file if provided - if hasEnvFile { - var err error - m.cfg, err = jyaml.UnmarshalFromFile[v1alpha1.Environment](m.envFile) - if err != nil { - return fmt.Errorf("error reading config file: %s", err) - } - } - return nil - }, Action: func(c *cli.Context) error { - if c.IsSet("envFile") { - // Delete using environment file - instanceID := m.cfg.Labels[instances.InstanceLabelKey] - if instanceID == "" { - return fmt.Errorf("environment file does not contain an instance ID") - } - return m.run(c, instanceID) - } - // Delete using instance ID instanceID := c.String("instance-id") return m.run(c, instanceID) diff --git a/cmd/cli/list/list.go b/cmd/cli/list/list.go index 5979b02c6..33cf368b7 100644 --- a/cmd/cli/list/list.go +++ b/cmd/cli/list/list.go @@ -82,7 +82,6 @@ func (m command) run(c *cli.Context) error { for _, instance := range instances { // Skip instances without an ID (old cache files) if instance.ID == "" { - m.log.Warning("Found old cache file without instance ID, skipping: %s", instance.CacheFile) continue } diff --git a/internal/instances/instances.go b/internal/instances/instances.go index 0ca8ca617..772add770 100644 --- a/internal/instances/instances.go +++ b/internal/instances/instances.go @@ -111,7 +111,11 @@ func (m *Manager) getProviderStatus(env v1alpha1.Environment, cacheFile string) } case v1alpha1.ConditionDegraded: if condition.Status == metav1.ConditionTrue { - status = "degraded" + if condition.Reason != "" { + status = fmt.Sprintf("degraded (%s)", condition.Reason) + } else { + status = "degraded" + } statusFound = true } case v1alpha1.ConditionProgressing: @@ -173,7 +177,6 @@ func (m *Manager) ListInstances() ([]Instance, error) { env.Labels[InstanceLabelKey] = instanceID } else { // Skip files that don't have an instance ID and aren't UUIDs - m.log.Warning("Found old cache file without instance ID, skipping: %s", cacheFile) continue } } From 7142fcb8bb026abefeba4a500e4b57d620e8978c Mon Sep 17 00:00:00 2001 From: Carlos Eduardo Arango Gutierrez Date: Mon, 26 May 2025 09:36:33 +0200 Subject: [PATCH 2/6] Fix Templates after v.2.8 changes Signed-off-by: Carlos Eduardo Arango Gutierrez --- pkg/provisioner/templates/kernel.go | 6 ------ pkg/provisioner/templates/kubernetes.go | 12 +++++------- pkg/provisioner/templates/nv-driver.go | 11 ++++++++++- 3 files changed, 15 insertions(+), 14 deletions(-) diff --git a/pkg/provisioner/templates/kernel.go b/pkg/provisioner/templates/kernel.go index 41eaa42a7..293853660 100644 --- a/pkg/provisioner/templates/kernel.go +++ b/pkg/provisioner/templates/kernel.go @@ -38,8 +38,6 @@ echo "Current kernel version: $CURRENT_KERNEL" KERNEL_VERSION="{{ .Spec.Kernel.Version }}" if [ "${CURRENT_KERNEL}" != "${KERNEL_VERSION}" ]; then - echo "--------------Upgrading kernel to ${KERNEL_VERSION}--------------" - # Update package lists sudo apt-get update -y || true @@ -61,10 +59,6 @@ if [ "${CURRENT_KERNEL}" != "${KERNEL_VERSION}" ]; then echo "Rebooting..." # Run the reboot command with nohup to avoid abrupt SSH closure issues nohup sudo reboot & - - echo "--------------Kernel upgrade completed--------------" -else - echo "--------------Kernel upgrade not required, current kernel version ${KERNEL_VERSION}--------------" fi {{- end }} ` diff --git a/pkg/provisioner/templates/kubernetes.go b/pkg/provisioner/templates/kubernetes.go index 498c6fdaa..7fee9bac3 100644 --- a/pkg/provisioner/templates/kubernetes.go +++ b/pkg/provisioner/templates/kubernetes.go @@ -104,10 +104,8 @@ export KUBECONFIG="${HOME}/.kube/config" # Install Calico # based on https://docs.tigera.io/calico/latest/getting-started/kubernetes/quickstart -with_retry 3 10s kubectl --kubeconfig $KUBECONFIG create -f https://raw.githubusercontent.com/projectcalico/calico/${CALICO_VERSION}/manifests/tigera-operator.yaml -# Calico CRDs created. Now we sleep for 10s to ensure they are fully registered in the K8s etcd -sleep 10s -with_retry 3 10s kubectl --kubeconfig $KUBECONFIG apply -f https://raw.githubusercontent.com/projectcalico/calico/${CALICO_VERSION}/manifests/custom-resources.yaml +with_retry 5 10s kubectl --kubeconfig $KUBECONFIG create -f https://raw.githubusercontent.com/projectcalico/calico/${CALICO_VERSION}/manifests/tigera-operator.yaml +with_retry 5 10s kubectl --kubeconfig $KUBECONFIG create -f https://raw.githubusercontent.com/projectcalico/calico/${CALICO_VERSION}/manifests/custom-resources.yaml # Make single-node cluster schedulable kubectl taint nodes --all node-role.kubernetes.io/control-plane:NoSchedule- kubectl label node --all node-role.kubernetes.io/worker= @@ -445,7 +443,7 @@ func GetCRISocket(runtime string) (string, error) { } } -// isLegacyKubernetesVersion checks if the Kubernetes version is older than v1.30.0 +// isLegacyKubernetesVersion checks if the Kubernetes version is older than v1.32.0 // which requires using legacy kubeadm init flags instead of config file func isLegacyKubernetesVersion(version string) bool { // Remove 'v' prefix if present @@ -461,6 +459,6 @@ func isLegacyKubernetesVersion(version string) bool { major, _ := strconv.Atoi(parts[0]) minor, _ := strconv.Atoi(parts[1]) - // Return true if version is older than v1.30.0 - return major < 1 || (major == 1 && minor < 30) + // Return true if version is older than v1.32.0 + return major < 1 || (major == 1 && minor < 32) } diff --git a/pkg/provisioner/templates/nv-driver.go b/pkg/provisioner/templates/nv-driver.go index 5d6b83948..2436a7672 100644 --- a/pkg/provisioner/templates/nv-driver.go +++ b/pkg/provisioner/templates/nv-driver.go @@ -34,8 +34,17 @@ wget https://developer.download.nvidia.com/compute/cuda/repos/$distribution/x86_ sudo dpkg -i cuda-keyring_1.1-1_all.deb with_retry 3 10s sudo apt-get update -install_packages_with_retry cuda-drivers{{if .Version}}={{.Version}}{{else if .Branch}}-{{.Branch}}{{end}} +install_packages_with_retry nvidia-driver{{if .Version}}={{.Version}}{{else if .Branch}}-{{.Branch}}{{end}} +# Check if NVIDIA module is loaded, if not load it +if ! lsmod | grep -q "^nvidia "; then + sudo modprobe nvidia +fi + +# Start nvidia-persistenced +sudo nvidia-persistenced --persistence-mode + +# Quick check to see if the driver is installed nvidia-smi ` From 3e70307d4e5b5e9aa051038628406999b57c148c Mon Sep 17 00:00:00 2001 From: Carlos Eduardo Arango Gutierrez Date: Mon, 26 May 2025 09:40:41 +0200 Subject: [PATCH 3/6] E2E run provision during E2E Signed-off-by: Carlos Eduardo Arango Gutierrez --- tests/aws_test.go | 38 +++++++++++++++++++++++++++++++++++++- 1 file changed, 37 insertions(+), 1 deletion(-) diff --git a/tests/aws_test.go b/tests/aws_test.go index 132be250d..4cc5f9099 100644 --- a/tests/aws_test.go +++ b/tests/aws_test.go @@ -28,10 +28,17 @@ import ( "github.com/NVIDIA/holodeck/internal/logger" "github.com/NVIDIA/holodeck/pkg/jyaml" "github.com/NVIDIA/holodeck/pkg/provider" + "github.com/NVIDIA/holodeck/pkg/provider/aws" "github.com/NVIDIA/holodeck/pkg/provisioner" "github.com/NVIDIA/holodeck/tests/common" ) +// AWSEnvironmentTests contains end-to-end tests for AWS environment provisioning and management. +// These tests verify the complete lifecycle of AWS environments, including: +// - Environment creation and validation +// - Kubernetes cluster setup (when enabled) +// - Resource provisioning and cleanup +// - Configuration validation var _ = Describe("AWS Environment", func() { // Test configuration structure type testConfig struct { @@ -112,7 +119,8 @@ var _ = Describe("AWS Environment", func() { } } - // Run each test configuration sequentially + // Run each test configuration sequentially to ensure proper resource management + // and avoid potential conflicts between concurrent test runs for _, config := range testConfigs { config := config // Create a new variable to avoid closure issues When("testing "+config.name, Ordered, func() { @@ -166,6 +174,34 @@ var _ = Describe("AWS Environment", func() { It("should have valid environment name", func() { Expect(state.opts.cfg.Name).NotTo(BeEmpty(), "Environment name should not be empty") }) + It("should provision the environment successfully", func() { + By("Reading the environment file") + env, err := jyaml.UnmarshalFromFile[v1alpha1.Environment](state.opts.cachefile) + Expect(err).NotTo(HaveOccurred(), "Failed to read environment file") + + var hostUrl string + for _, p := range env.Status.Properties { + if p.Name == aws.PublicDnsName { + hostUrl = p.Value + break + } + } + Expect(hostUrl).NotTo(BeEmpty(), "Host URL should not be empty") + + By("Provisioning the environment") + p, err := provisioner.New(state.log, state.opts.cfg.Spec.PrivateKey, state.opts.cfg.Spec.Username, hostUrl) + Expect(err).NotTo(HaveOccurred(), "Failed to create provisioner") + + // Ensure client is properly closed after test + defer func() { + if err := p.Client.Close(); err != nil { + state.log.Error(err) + } + }() + + By("Running the provisioner") + Expect(p.Run(env)).To(Succeed(), "Failed to provision environment") + }) }) }) From 2c8eb4cb208457560d7c3b37d98cdca3d71c97a8 Mon Sep 17 00:00:00 2001 From: Carlos Eduardo Arango Gutierrez Date: Mon, 26 May 2025 09:50:44 +0200 Subject: [PATCH 4/6] Fix remaining lints Signed-off-by: Carlos Eduardo Arango Gutierrez --- cmd/cli/delete/delete.go | 2 -- 1 file changed, 2 deletions(-) diff --git a/cmd/cli/delete/delete.go b/cmd/cli/delete/delete.go index 396c89281..19149b5f5 100644 --- a/cmd/cli/delete/delete.go +++ b/cmd/cli/delete/delete.go @@ -21,7 +21,6 @@ import ( "os" "path/filepath" - "github.com/NVIDIA/holodeck/api/holodeck/v1alpha1" "github.com/NVIDIA/holodeck/internal/instances" "github.com/NVIDIA/holodeck/internal/logger" @@ -31,7 +30,6 @@ import ( type command struct { log *logger.FunLogger cachePath string - cfg v1alpha1.Environment } // NewCommand constructs the delete command with the specified logger From 6266b4460b9cb3854591d040001a8e74d2ee059f Mon Sep 17 00:00:00 2001 From: Carlos Eduardo Arango Gutierrez Date: Mon, 26 May 2025 10:01:18 +0200 Subject: [PATCH 5/6] Update unit tests after recent changes Signed-off-by: Carlos Eduardo Arango Gutierrez --- .github/workflows/e2e.yaml | 8 ++++- pkg/provisioner/templates/kubernetes_test.go | 32 +++++++++---------- pkg/provisioner/templates/nv-driver_test.go | 33 ++++++++++++++++++-- 3 files changed, 53 insertions(+), 20 deletions(-) diff --git a/.github/workflows/e2e.yaml b/.github/workflows/e2e.yaml index 3b74612ac..c3f666199 100644 --- a/.github/workflows/e2e.yaml +++ b/.github/workflows/e2e.yaml @@ -50,7 +50,13 @@ jobs: AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }} AWS_SSH_KEY: ${{ secrets.AWS_SSH_KEY }} LOG_ARTIFACT_DIR: e2e_logs - run: make -f tests/Makefile test + run: | + e2e_ssh_key=$(mktemp) + echo "${{ secrets.AWS_SSH_KEY }}" > "$e2e_ssh_key" + chmod 600 "$e2e_ssh_key" + export E2E_SSH_KEY="$e2e_ssh_key" + + make -f tests/Makefile test - name: Archive Ginkgo logs uses: actions/upload-artifact@v4 diff --git a/pkg/provisioner/templates/kubernetes_test.go b/pkg/provisioner/templates/kubernetes_test.go index a21d71198..40c871309 100644 --- a/pkg/provisioner/templates/kubernetes_test.go +++ b/pkg/provisioner/templates/kubernetes_test.go @@ -16,23 +16,23 @@ func TestIsLegacyKubernetesVersion(t *testing.T) { want bool }{ { - name: "legacy version v1.29.0", - version: "v1.29.0", + name: "legacy version v1.31.0", + version: "v1.31.0", want: true, }, { - name: "legacy version v1.28.0", - version: "v1.28.0", + name: "legacy version v1.30.0", + version: "v1.30.0", want: true, }, { - name: "supported version v1.30.0", - version: "v1.30.0", + name: "supported version v1.32.0", + version: "v1.32.0", want: false, }, { - name: "supported version v1.31.0", - version: "v1.31.0", + name: "supported version v1.32.1", + version: "v1.32.1", want: false, }, { @@ -81,7 +81,7 @@ func TestNewKubernetes(t *testing.T) { CniPluginsVersion: defaultCNIPluginsVersion, CalicoVersion: defaultCalicoVersion, CrictlVersion: defaultCRIVersion, - UseLegacyInit: false, + UseLegacyInit: true, CriSocket: "unix:///run/containerd/containerd.sock", }, wantErr: false, @@ -91,7 +91,7 @@ func TestNewKubernetes(t *testing.T) { env: v1alpha1.Environment{ Spec: v1alpha1.EnvironmentSpec{ Kubernetes: v1alpha1.Kubernetes{ - KubernetesVersion: "v1.29.0", + KubernetesVersion: "v1.31.0", }, ContainerRuntime: v1alpha1.ContainerRuntime{ Name: "containerd", @@ -99,7 +99,7 @@ func TestNewKubernetes(t *testing.T) { }, }, want: &Kubernetes{ - Version: "v1.29.0", + Version: "v1.31.0", KubeletReleaseVersion: defaultKubeletReleaseVersion, Arch: defaultArch, CniPluginsVersion: defaultCNIPluginsVersion, @@ -136,7 +136,7 @@ func TestNewKubernetes(t *testing.T) { CalicoVersion: "v3.30.0", CrictlVersion: "v1.32.0", K8sFeatureGates: "Feature1=true,Feature2=false", - UseLegacyInit: false, + UseLegacyInit: true, CriSocket: "unix:///run/cri-dockerd.sock", }, wantErr: false, @@ -199,7 +199,7 @@ func TestKubernetes_Execute(t *testing.T) { env: v1alpha1.Environment{ Spec: v1alpha1.EnvironmentSpec{ Kubernetes: v1alpha1.Kubernetes{ - KubernetesVersion: "v1.29.0", + KubernetesVersion: "v1.31.0", KubernetesInstaller: "kubeadm", K8sEndpointHost: "test-host", }, @@ -217,7 +217,7 @@ func TestKubernetes_Execute(t *testing.T) { env: v1alpha1.Environment{ Spec: v1alpha1.EnvironmentSpec{ Kubernetes: v1alpha1.Kubernetes{ - KubernetesVersion: "v1.30.0", + KubernetesVersion: "v1.32.1", KubernetesInstaller: "kind", }, ContainerRuntime: v1alpha1.ContainerRuntime{ @@ -232,7 +232,7 @@ func TestKubernetes_Execute(t *testing.T) { env: v1alpha1.Environment{ Spec: v1alpha1.EnvironmentSpec{ Kubernetes: v1alpha1.Kubernetes{ - KubernetesVersion: "v1.30.0", + KubernetesVersion: "v1.32.1", KubernetesInstaller: "microk8s", }, ContainerRuntime: v1alpha1.ContainerRuntime{ @@ -247,7 +247,7 @@ func TestKubernetes_Execute(t *testing.T) { env: v1alpha1.Environment{ Spec: v1alpha1.EnvironmentSpec{ Kubernetes: v1alpha1.Kubernetes{ - KubernetesVersion: "v1.30.0", + KubernetesVersion: "v1.32.1", KubernetesInstaller: "invalid", }, ContainerRuntime: v1alpha1.ContainerRuntime{ diff --git a/pkg/provisioner/templates/nv-driver_test.go b/pkg/provisioner/templates/nv-driver_test.go index c9ea10616..40ce51ef8 100644 --- a/pkg/provisioner/templates/nv-driver_test.go +++ b/pkg/provisioner/templates/nv-driver_test.go @@ -47,8 +47,17 @@ wget https://developer.download.nvidia.com/compute/cuda/repos/$distribution/x86_ sudo dpkg -i cuda-keyring_1.1-1_all.deb with_retry 3 10s sudo apt-get update -install_packages_with_retry cuda-drivers=123.4.5 +install_packages_with_retry nvidia-driver=123.4.5 +# Check if NVIDIA module is loaded, if not load it +if ! lsmod | grep -q "^nvidia "; then + sudo modprobe nvidia +fi + +# Start nvidia-persistenced +sudo nvidia-persistenced --persistence-mode + +# Quick check to see if the driver is installed nvidia-smi `, }, @@ -66,8 +75,17 @@ wget https://developer.download.nvidia.com/compute/cuda/repos/$distribution/x86_ sudo dpkg -i cuda-keyring_1.1-1_all.deb with_retry 3 10s sudo apt-get update -install_packages_with_retry cuda-drivers-550 +install_packages_with_retry nvidia-driver-550 + +# Check if NVIDIA module is loaded, if not load it +if ! lsmod | grep -q "^nvidia "; then + sudo modprobe nvidia +fi +# Start nvidia-persistenced +sudo nvidia-persistenced --persistence-mode + +# Quick check to see if the driver is installed nvidia-smi `, }, @@ -86,8 +104,17 @@ wget https://developer.download.nvidia.com/compute/cuda/repos/$distribution/x86_ sudo dpkg -i cuda-keyring_1.1-1_all.deb with_retry 3 10s sudo apt-get update -install_packages_with_retry cuda-drivers=123.4.5 +install_packages_with_retry nvidia-driver=123.4.5 + +# Check if NVIDIA module is loaded, if not load it +if ! lsmod | grep -q "^nvidia "; then + sudo modprobe nvidia +fi + +# Start nvidia-persistenced +sudo nvidia-persistenced --persistence-mode +# Quick check to see if the driver is installed nvidia-smi `, }, From 4fa270dc48dd290a962d1a07a4cfd5ee890a7dc4 Mon Sep 17 00:00:00 2001 From: Carlos Eduardo Arango Gutierrez Date: Mon, 26 May 2025 11:31:44 +0200 Subject: [PATCH 6/6] Add E2E_SSH_KEY ENV VAR to the E2E Signed-off-by: Carlos Eduardo Arango Gutierrez --- tests/aws_test.go | 2 ++ tests/data/test_aws.yml | 6 +++--- tests/data/test_aws_dra.yml | 6 +++--- tests/data/test_aws_kernel.yml | 6 +++--- tests/data/test_aws_legacy.yml | 6 +++--- tests/e2e_test.go | 4 ++++ 6 files changed, 18 insertions(+), 12 deletions(-) diff --git a/tests/aws_test.go b/tests/aws_test.go index 4cc5f9099..fa34d669f 100644 --- a/tests/aws_test.go +++ b/tests/aws_test.go @@ -168,6 +168,8 @@ var _ = Describe("AWS Environment", func() { }) It("should create the environment successfully", func() { + state.opts.cfg.Spec.PrivateKey = sshKey + state.opts.cfg.Spec.Username = "ubuntu" Expect(state.provider.Create()).To(Succeed(), "Failed to create environment") }) diff --git a/tests/data/test_aws.yml b/tests/data/test_aws.yml index 7f4e0c33e..e159c7bef 100644 --- a/tests/data/test_aws.yml +++ b/tests/data/test_aws.yml @@ -14,10 +14,10 @@ spec: ingressIpRanges: - 18.190.12.32/32 - 3.143.46.93/32 + - 44.230.241.223/32 + - 44.235.4.62/32 - 52.15.119.136/32 - - 35.155.108.162/32 - - 35.162.190.51/32 - - 54.201.61.24/32 + - 52.24.205.48/32 image: architecture: amd64 containerRuntime: diff --git a/tests/data/test_aws_dra.yml b/tests/data/test_aws_dra.yml index 57e157281..05ab39871 100644 --- a/tests/data/test_aws_dra.yml +++ b/tests/data/test_aws_dra.yml @@ -14,10 +14,10 @@ spec: ingressIpRanges: - 18.190.12.32/32 - 3.143.46.93/32 + - 44.230.241.223/32 + - 44.235.4.62/32 - 52.15.119.136/32 - - 35.155.108.162/32 - - 35.162.190.51/32 - - 54.201.61.24/32 + - 52.24.205.48/32 image: architecture: amd64 containerRuntime: diff --git a/tests/data/test_aws_kernel.yml b/tests/data/test_aws_kernel.yml index 37a57117e..f358b3753 100644 --- a/tests/data/test_aws_kernel.yml +++ b/tests/data/test_aws_kernel.yml @@ -14,10 +14,10 @@ spec: ingressIpRanges: - 18.190.12.32/32 - 3.143.46.93/32 + - 44.230.241.223/32 + - 44.235.4.62/32 - 52.15.119.136/32 - - 35.155.108.162/32 - - 35.162.190.51/32 - - 54.201.61.24/32 + - 52.24.205.48/32 image: architecture: amd64 kernel: diff --git a/tests/data/test_aws_legacy.yml b/tests/data/test_aws_legacy.yml index 4530a1f51..c48563fc4 100644 --- a/tests/data/test_aws_legacy.yml +++ b/tests/data/test_aws_legacy.yml @@ -14,10 +14,10 @@ spec: ingressIpRanges: - 18.190.12.32/32 - 3.143.46.93/32 + - 44.230.241.223/32 + - 44.235.4.62/32 - 52.15.119.136/32 - - 35.155.108.162/32 - - 35.162.190.51/32 - - 54.201.61.24/32 + - 52.24.205.48/32 image: architecture: amd64 containerRuntime: diff --git a/tests/e2e_test.go b/tests/e2e_test.go index 6a6cb3f78..774fad84c 100644 --- a/tests/e2e_test.go +++ b/tests/e2e_test.go @@ -30,6 +30,7 @@ var ( LogArtifactDir string cwd string packagePath string + sshKey string ) func TestMain(t *testing.T) { @@ -47,6 +48,9 @@ func getTestEnv() { LogArtifactDir = os.Getenv("LOG_ARTIFACT_DIR") + sshKey = os.Getenv("E2E_SSH_KEY") + Expect(sshKey).NotTo(BeEmpty(), "E2E_SSH_KEY is not set") + // Get current working directory cwd, err = os.Getwd() Expect(err).NotTo(HaveOccurred())