Merged
Conversation
Signed-off-by: Carlos Eduardo Arango Gutierrez <eduardoa@nvidia.com>
There was a problem hiding this comment.
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>
c038679 to
903f5da
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This pull request introduces several changes to the
cmd/cli/createcommand, updates AWS SDK usage across the codebase, and improves the container toolkit configuration. The key updates include replacing thecachePathfield with a more precisecacheFilefield, removing the deprecated AWS SDK v1, and refining the handling of container runtime configuration.Key Changes
Improvements to
cmd/cli/createCommand:cachePathfield withcacheFilein theoptionsstruct 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]showSuccessMessagemethod 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)filepath.Absto 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:
go.modand 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:
bin_dirpath configuration and ensure it only includes/opt/cni/bin. (pkg/provisioner/templates/container-toolkit.go: pkg/provisioner/templates/container-toolkit.goL46-R50)/usr/libexec/cnipath is no longer referenced. (pkg/provisioner/templates/container-toolkit_test.go: pkg/provisioner/templates/container-toolkit_test.goR78-R89)