Automatically generate KindVersionInfo daily or if Kind Version for c…#24
Automatically generate KindVersionInfo daily or if Kind Version for c…#24
Conversation
…reate cluster command is not found
There was a problem hiding this comment.
Pull Request Overview
This pull request adds functionality to automatically update Kind version mapping data, improve dependency management, and introduce commands to update the cached Kind version info and list available Kubernetes versions. Key changes include dependency upgrades and configuration updates in devbox.json and csproj files, the introduction of a new KindVersionInfoService with its interface and associated commands, and modifications to existing commands to integrate the new service.
Reviewed Changes
Copilot reviewed 22 out of 22 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| devbox.json | Updated dependency version to "kind@latest". |
| cli/tests/Vdk.Tests/Vdk.Tests.csproj | Modified resource embedding for Kind version info test data. |
| cli/tests/Vdk.Tests/Models/KindVersionMapTests.cs | Updated expected SHA for a Kind version image test case. |
| cli/src/Vdk/Vdk.csproj | Upgraded and added package references including Octokit and updated IO abstractions. |
| cli/src/Vdk/Services/KindVersionInfoService.cs | Introduced a new service for updating and retrieving Kind version mappings. |
| cli/src/Vdk/Data/EmbeddedDataReader.cs | Added a constructor overload to support a reference type for resource lookups. |
| cli/src/Vdk/Commands/* | Introduced new commands for updating Kind version info and listing Kubernetes versions, and updated CreateClusterCommand accordingly. |
| cli/src/Vdk/Models/* | Added JSON annotations for serialization and updated models to support new features. |
| cli/src/Vdk/GlobalConfiguration.cs | New configuration file providing environment-specific paths and cache settings. |
| cli/src/Vdk/Constants/Defaults.cs | Added new constants for configuration directory and cache timing. |
Comments suppressed due to low confidence (1)
cli/src/Vdk/Data/EmbeddedDataReader.cs:27
- [nitpick] Consider using StringComparison.InvariantCultureIgnoreCase instead of CurrentCultureIgnoreCase for resource name matching to ensure consistent behavior regardless of the user's locale.
var name = names.FirstOrDefault(x=>x.Equals(path, StringComparison.CurrentCultureIgnoreCase))??path;
| return; | ||
| } | ||
| var image = map.FindImage(kindVersion, kubeVersion); | ||
| if (image is null) |
There was a problem hiding this comment.
[nitpick] Consider adding additional logging or clarifying comments in the fallback block to detail the recovery process when the image remains null after attempting an update.
Signed-off-by: Eddie <eddie@archetypical.software>
Update ReverseProxyClient.cs
Added code to automatically update the Kind version info.
Also added a new command to list the available kubernetes versions for the installed kind version.
Still testing/polishing -> Posting in draft as FYI and to let the team play with it.