Skip to content

Fix create and delete #443

Merged
ArangoGutierrez merged 2 commits intoNVIDIA:mainfrom
ArangoGutierrez:fix_create
Aug 3, 2025
Merged

Fix create and delete #443
ArangoGutierrez merged 2 commits intoNVIDIA:mainfrom
ArangoGutierrez:fix_create

Conversation

@ArangoGutierrez
Copy link
Collaborator

This pull request introduces several changes to the cmd/cli/create command, updates AWS SDK usage across the codebase, and improves the container toolkit configuration. The key updates include replacing the cachePath field with a more precise cacheFile field, removing the deprecated AWS SDK v1, and refining the handling of container runtime configuration.

Key Changes

Improvements to cmd/cli/create Command:

  • Replaced the cachePath field with cacheFile in the options struct and updated all related references to improve clarity and precision in cache file handling. (cmd/cli/create/create.go: [1] [2] [3] [4] [5] [6] [7] [8]
  • Added a new showSuccessMessage method to display detailed success messages, including SSH connection instructions, Kubernetes access details, and next steps for users. (cmd/cli/create/create.go: cmd/cli/create/create.goL173-R242)
  • Introduced the use of filepath.Abs to ensure absolute paths for kubeconfig files when displaying Kubernetes access instructions. (cmd/cli/create/create.go: cmd/cli/create/create.goL173-R242)

AWS SDK Updates:

  • Removed the deprecated AWS SDK v1 dependency from go.mod and replaced all usages with AWS SDK v2 for better performance and maintenance. (go.mod: [1] pkg/provider/aws/aws.go: [2] pkg/provider/aws/create.go: [3] pkg/provider/aws/update.go: [4]

Container Toolkit Configuration Enhancements:

Signed-off-by: Carlos Eduardo Arango Gutierrez <eduardoa@nvidia.com>
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This pull request introduces several changes to the cmd/cli/create command, updates AWS SDK usage across the codebase, and improves the container toolkit configuration. The key updates include replacing the cachePath field with a more precise cacheFile field, removing the deprecated AWS SDK v1, and refining the handling of container runtime configuration.

Key Changes

  • Enhanced create command with better success messaging, SSH connection instructions, and cache file handling improvements
  • Migration from AWS SDK v1 to v2 with consistent import patterns across all AWS provider files
  • Updated container runtime templates with improved CNI configuration and version bumps for Kubernetes components

Reviewed Changes

Copilot reviewed 13 out of 85 changed files in this pull request and generated 5 comments.

Show a summary per file
File Description
cmd/cli/create/create.go Added cacheFile field and comprehensive success messaging with SSH/Kubernetes access instructions
cmd/cli/create/create_test.go New comprehensive test suite covering success messages, provisioning failures, and command validation
pkg/provider/aws/*.go Migrated from AWS SDK v1 to v2 with consistent import patterns
pkg/provider/aws/delete.go Major refactoring with improved error handling, retry logic, and resource cleanup phases
pkg/provisioner/templates/kubernetes.go Updated default versions and enhanced CNI installation with better logging
pkg/provisioner/templates/kubernetes_test.go Removed legacy version checks and updated test expectations
pkg/provisioner/templates/containerd.go Split into v1/v2 templates with version-specific installation approaches
pkg/provisioner/templates/containerd_test.go Updated tests for new version-specific containerd installation
pkg/provisioner/templates/container-toolkit.go Simplified CNI bin_dir configuration to only include /opt/cni/bin
pkg/provisioner/templates/container-toolkit_test.go Added verification tests for CNI path configuration
go.mod Removed AWS SDK v1 dependency
Comments suppressed due to low confidence (5)

pkg/provisioner/templates/kubernetes.go:272

  • Kubernetes version v1.33.3 does not exist. As of January 2025, the latest stable Kubernetes version is around v1.32.x. Please verify this version exists before using it.
	defaultKubernetesVersion     = "v1.33.3"

pkg/provisioner/templates/kubernetes.go:275

  • CRI tools version v1.33.0 does not exist. As of January 2025, the latest crictl version is around v1.32.x. Please verify this version exists before using it.
	defaultCRIVersion            = "v1.33.0"

pkg/provisioner/templates/containerd.go:218

  • Containerd version 1.7.27 may not exist. As of January 2025, the latest containerd 1.7.x version is around 1.7.23. Please verify this version exists in the containerd releases.
		version = "1.7.27" // Default to v1.7.x

pkg/provisioner/templates/kubernetes.go:274

  • CNI plugins version v1.7.1 may not exist. As of January 2025, the latest CNI plugins version is around v1.6.x. Please verify this version exists in the containernetworking/plugins releases.
	defaultCNIPluginsVersion     = "v1.7.1"

pkg/provisioner/templates/kubernetes.go:276

  • Calico version v3.30.2 may not exist. As of January 2025, the latest Calico version is around v3.29.x. Please verify this version exists in the projectcalico/calico releases.
	defaultCalicoVersion         = "v3.30.2"

Signed-off-by: Carlos Eduardo Arango Gutierrez <eduardoa@nvidia.com>
@ArangoGutierrez ArangoGutierrez merged commit 82c5812 into NVIDIA:main Aug 3, 2025
19 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants